Skip to content

Commit 8499009

Browse files
authored
Merge branch 'main' into fix/148740-uuid-cli-usage
2 parents 7ddf95a + 983c746 commit 8499009

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

Doc/library/calendar.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
5454

5555
.. method:: setfirstweekday(firstweekday)
5656

57-
Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)
57+
Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6).
5858

5959
Identical to setting the :attr:`~Calendar.firstweekday` property.
6060

6161
.. method:: iterweekdays()
6262

63-
Return an iterator for the week day numbers that will be used for one
63+
Return an iterator for the weekday numbers that will be used for one
6464
week. The first value from the iterator will be the same as the value of
6565
the :attr:`~Calendar.firstweekday` property.
6666

@@ -86,7 +86,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
8686
Return an iterator for the month *month* in the year *year* similar to
8787
:meth:`itermonthdates`, but not restricted by the :class:`datetime.date`
8888
range. Days returned will be tuples consisting of a day of the month
89-
number and a week day number.
89+
number and a weekday number.
9090

9191

9292
.. method:: itermonthdays3(year, month)
@@ -408,7 +408,7 @@ For simple text calendars this module provides the following functions.
408408

409409
.. function:: monthrange(year, month)
410410

411-
Returns weekday of first day of the month and number of days in month, for the
411+
Returns weekday of first day of the month and number of days in month, for the
412412
specified *year* and *month*.
413413

414414

@@ -446,7 +446,7 @@ For simple text calendars this module provides the following functions.
446446
An unrelated but handy function that takes a time tuple such as returned by
447447
the :func:`~time.gmtime` function in the :mod:`time` module, and returns the
448448
corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX
449-
encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others'
449+
encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each other's
450450
inverse.
451451

452452

Include/internal/pycore_stackref.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ static const _PyStackRef PyStackRef_NULL = { .index = 0 };
7171
static const _PyStackRef PyStackRef_ERROR = { .index = (1 << Py_TAGGED_SHIFT) };
7272

7373
#define PyStackRef_None ((_PyStackRef){ .index = (2 << Py_TAGGED_SHIFT) } )
74-
#define PyStackRef_False ((_PyStackRef){ .index = (3 << Py_TAGGED_SHIFT) })
75-
#define PyStackRef_True ((_PyStackRef){ .index = (4 << Py_TAGGED_SHIFT) })
74+
#define _Py_STACKREF_FALSE_INDEX (3 << Py_TAGGED_SHIFT)
75+
#define _Py_STACKREF_TRUE_INDEX (4 << Py_TAGGED_SHIFT)
76+
#define PyStackRef_False ((_PyStackRef){ .index = _Py_STACKREF_FALSE_INDEX })
77+
#define PyStackRef_True ((_PyStackRef){ .index = _Py_STACKREF_TRUE_INDEX })
7678

7779
#define INITIAL_STACKREF_INDEX (5 << Py_TAGGED_SHIFT)
7880

Lib/test/support/strace_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def sections(self):
7474
def _filter_memory_call(call):
7575
# mmap can operate on a fd or "MAP_ANONYMOUS" which gives a block of memory.
7676
# Ignore "MAP_ANONYMOUS + the "MAP_ANON" alias.
77-
if call.syscall == "mmap" and "MAP_ANON" in call.args[3]:
77+
if call.syscall in ("mmap", "mmap2") and "MAP_ANON" in call.args[3]:
7878
return True
7979

8080
if call.syscall in ("munmap", "mprotect"):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Errors during the PGO training job on Windows are no longer ignored, and a non-zero return code will cause the build to fail.

PCbuild/build.bat

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,20 @@ if "%do_pgo%"=="true" (
170170
del /s "%dir%\*.pgc"
171171
del /s "%dir%\..\Lib\*.pyc"
172172
set conf=PGUpdate
173-
if "%clean%"=="false" (
174-
echo on
175-
call "%dir%\..\python.bat" %pgo_job%
176-
@echo off
177-
call :Kill
178-
set target=Build
179-
)
173+
if "%clean%"=="false" goto :RunPgoJob
180174
)
181175
goto :Build
182176

177+
:RunPgoJob
178+
echo on
179+
call "%dir%\..\python.bat" %pgo_job%
180+
@echo off
181+
set pgo_errorlevel=%ERRORLEVEL%
182+
call :Kill
183+
if %pgo_errorlevel% NEQ 0 exit /B %pgo_errorlevel%
184+
set target=Build
185+
goto :Build
186+
183187
:Kill
184188
echo on
185189
%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^

Python/pylifecycle.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,18 +1641,12 @@ Py_InitializeFromConfig(const PyConfig *config)
16411641
void
16421642
Py_InitializeEx(int install_sigs)
16431643
{
1644-
PyStatus status;
1645-
1646-
status = _PyRuntime_Initialize();
1647-
if (_PyStatus_EXCEPTION(status)) {
1648-
Py_ExitStatusException(status);
1649-
}
1650-
16511644
if (Py_IsInitialized()) {
16521645
/* bpo-33932: Calling Py_Initialize() twice does nothing. */
16531646
return;
16541647
}
16551648

1649+
PyStatus status;
16561650
PyConfig config;
16571651
_PyConfig_InitCompatConfig(&config);
16581652

0 commit comments

Comments
 (0)