From eaaeab30cc6a559cf458c6ee60ebc25aa919c6fc Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 18 Jan 2023 08:19:27 -0700 Subject: Doc: update msvc, add version table [skip appveyor] The changes in 4.4 didn't marke new construction variables with the now preferred version add marker, so added these. The references to different versions gets so confusing that to try to help added a version correspondence table to the MSVC_VERSION construction varaiable doc. Signed-off-by: Mats Wichmann --- RELEASE.txt | 2 + SCons/Tool/msvc.xml | 305 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 241 insertions(+), 66 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 35fd845..7b08898 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -117,6 +117,8 @@ DOCUMENTATION - Updated the User Guide chapter on variant directories with more explanation, and the introduction of terms like "out of tree" that may help in forming a mental model. +- Updated MSVC documentation - adds "version added" annotations on recently + added construction variables and provides a version-mapping table. DEVELOPMENT ----------- diff --git a/SCons/Tool/msvc.xml b/SCons/Tool/msvc.xml index c26c20d..bf2e267 100644 --- a/SCons/Tool/msvc.xml +++ b/SCons/Tool/msvc.xml @@ -1,31 +1,10 @@ -Sets construction variables for the Microsoft Visual C/C++ compiler. +Sets &consvars; for the Microsoft Visual C/C++ compiler. @@ -96,7 +75,17 @@ Sets construction variables for the Microsoft Visual C/C++ compiler. PCH PCHSTOP PDB +MSVC_VERSION +MSVC_USE_SCRIPT +MSVC_USE_SCRIPT_ARGS +MSVC_USE_SETTINGS MSVC_NOTFOUND_POLICY +MSVC_SCRIPTERROR_POLICY +MSVC_SCRIPT_ARGS +MSVC_SDK_VERSION +MSVC_TOOLSET_VERSION +MSVC_SPECTRE_LIBS + @@ -110,7 +99,7 @@ file as the second element. Normally the object file is ignored. This builder is only provided when Microsoft Visual C++ is being used as the compiler. The &b-PCH; builder is generally used in -conjunction with the &cv-link-PCH; construction variable to force object files to use +conjunction with the &cv-link-PCH; &consvar; to force object files to use the precompiled header: @@ -148,7 +137,7 @@ Options added to the compiler command line to support building with precompiled headers. The default value expands expands to the appropriate Microsoft Visual C++ command-line options -when the &cv-link-PCH; construction variable is set. +when the &cv-link-PCH; &consvar; is set. @@ -161,7 +150,7 @@ to support storing debugging information in a Microsoft Visual C++ PDB file. The default value expands expands to appropriate Microsoft Visual C++ command-line options -when the &cv-link-PDB; construction variable is set. +when the &cv-link-PDB; &consvar; is set. @@ -208,11 +197,11 @@ compilation of object files when calling the Microsoft Visual C/C++ compiler. All compilations of source files from the same source directory that generate target files in a same output directory -and were configured in SCons using the same construction environment +and were configured in SCons using the same &consenv; will be built in a single call to the compiler. Only source files that have changed since their object files were built will be passed to each compiler invocation -(via the &cv-link-CHANGED_SOURCES; construction variable). +(via the &cv-link-CHANGED_SOURCES; &consvar;). Any compilations where the object (target) file base name (minus the .obj) does not match the source file base name @@ -261,9 +250,9 @@ If this is not set, then &cv-link-PCHCOM; (the command line) is displayed. -A construction variable that, when expanded, +A &consvar; that, when expanded, adds the flag to the command line -only if the &cv-link-PDB; construction variable is set. +only if the &cv-link-PDB; &consvar; is set. @@ -324,7 +313,7 @@ The flags passed to the resource compiler by the &b-link-RES; builder. -An automatically-generated construction variable +An automatically-generated &consvar; containing the command-line options for specifying directories to be searched by the resource compiler. @@ -343,7 +332,7 @@ of each directory in &cv-link-CPPPATH;. The prefix (flag) used to specify an include directory on the resource compiler command line. This will be prepended to the beginning of each directory -in the &cv-link-CPPPATH; construction variable +in the &cv-link-CPPPATH; &consvar; when the &cv-link-RCINCFLAGS; variable is expanded. @@ -355,7 +344,7 @@ when the &cv-link-RCINCFLAGS; variable is expanded. The suffix used to specify an include directory on the resource compiler command line. This will be appended to the end of each directory -in the &cv-link-CPPPATH; construction variable +in the &cv-link-CPPPATH; &consvar; when the &cv-link-RCINCFLAGS; variable is expanded. @@ -365,12 +354,10 @@ when the &cv-link-RCINCFLAGS; variable is expanded. Sets the preferred version of Microsoft Visual C/C++ to use. - - - +If the specified version is unavailable (not installed, +or not discoverable), tool initialization will fail. If &cv-MSVC_VERSION; is not set, SCons will (by default) select the -latest version of Visual C/C++ installed on your system. If the -specified version isn't installed, tool initialization will fail. +latest version of Visual C/C++ installed on your system. @@ -383,28 +370,186 @@ loaded into the environment. -Valid values for Windows are -14.3, -14.2, -14.1, -14.1Exp, -14.0, -14.0Exp, -12.0, -12.0Exp, -11.0, -11.0Exp, -10.0, -10.0Exp, -9.0, -9.0Exp, -8.0, -8.0Exp, -7.1, -7.0, -and 6.0. -Versions ending in Exp refer to "Express" or -"Express for Desktop" editions. +The valid values for &cv-MSVC_VERSION; represent major versions +of the compiler, except that versions ending in Exp +refer to "Express" or "Express for Desktop" Visual Studio editions, +which require distict entries because they use a different +filesystem layout and have some feature limitations compared to +the full version. +The following table shows correspondence +of the selector string to various version indicators +('x' is used as a placeholder for +a single digit that can vary). +Note that it is not necessary to install Visual Studio +to build with &SCons; (for example, you can install only +Build Tools), but if Visual Studio is installed, +additional builders such as &b-link-MSVSSolution; and +&b-link-MSVSProject; become avaialable and will +correspond to the indicated versions. + + + + + + + + + + + + SCons Key + MSVC++ Version + _MSVC_VER + VS Product + MSBuild/VS Version + + + + + 14.3 + 14.3x + 193x + Visual Studio 2022 + 17.x + + + 14.2 + 14.2x + 192x + Visual Studio 2019 + 16.x, 16.1x + + + 14.1 + 14.1 or 14.1x + 191x + Visual Studio 2017 + 15.x + + + 14.1Exp + 14.1 + 1910 + Visual Studio 2017 Express + 15.0 + + + 14.0 + 14.0 + 1900 + Visual Studio 2015 + 14.0 + + + 14.0Exp + 14.0 + 1900 + Visual Studio 2015 Express + 14.0 + + + 12.0 + 12.0 + 1800 + Visual Studio 2013 + 12.0 + + + 12.0Exp + 12.0 + 1800 + Visual Studio 2013 Express + 12.0 + + + 11.0 + 11.0 + 1700 + Visual Studio 2012 + 11.0 + + + 11.0Exp + 11.0 + 1700 + Visual Studio 2012 Express + 11.0 + + + 10.0 + 10.0 + 1600 + Visual Studio 2010 + 10.0 + + + 10.0Exp + 10.0 + 1600 + Visual C++ Express 2010 + 10.0 + + + 9.0 + 9.0 + 1500 + Visual Studio 2008 + 9.0 + + + 9.0Exp + 9.0 + 1500 + Visual C++ Express 2008 + 9.0 + + + 8.0 + 8.0 + 1400 + Visual Studio 2005 + 8.0 + + + 8.0Exp + 8.0 + 1400 + Visual C++ Express 2005 + 8.0 + + + 7.1 + 7.1 + 1300 + Visual Studio .NET 2003 + 7.1 + + + 7.0 + 7.0 + 1200 + Visual Studio .NET 2002 + 7.0 + + + 6.0 + 6.0 + 1100 + Visual Studio 6.0 + 6.0 + + + + + + +The compilation environment can be further or more precisely specified through the +use of several other &consvars;: see the descriptions of +&cv-link-MSVC_TOOLSET_VERSION;, +&cv-link-MSVC_SDK_VERSION;, +&cv-link-MSVC_USE_SCRIPT;, +&cv-link-MSVC_USE_SCRIPT_ARGS;, +and &cv-link-MSVC_USE_SETTINGS;. @@ -433,7 +578,7 @@ This can be useful to force the use of a compiler version that Setting &cv-MSVC_USE_SCRIPT; to None bypasses the Visual Studio autodetection entirely; -use this if you are running SCons in a Visual Studio cmd +use this if you are running &SCons; in a Visual Studio cmd window and importing the shell's environment variables - that is, if you are sure everything is set correctly already and you don't want &SCons; to change anything. @@ -441,6 +586,12 @@ you don't want &SCons; to change anything. &cv-MSVC_USE_SCRIPT; ignores &cv-link-MSVC_VERSION; and &cv-link-TARGET_ARCH;. + +Changed in version 4.4: +new &cv-link-MSVC_USE_SCRIPT_ARGS; provides a +way to pass arguments. + + @@ -449,6 +600,9 @@ you don't want &SCons; to change anything. Provides arguments passed to the script &cv-link-MSVC_USE_SCRIPT;. + +New in version 4.4 + @@ -529,11 +683,15 @@ therefore may change at any time. The burden is on the user to ensure the dictionary contents are minimally sufficient to ensure successful builds. - + + + +New in version 4.4 + @@ -780,6 +938,8 @@ When &cv-MSVC_NOTFOUND_POLICY; is not specified, the default &scons; behavior is subject to the conditions listed above. The default &scons; behavior may change in the future. +New in version 4.4 + @@ -831,6 +991,9 @@ Issue a warning when msvc batch file errors are detected. Suppress msvc batch file error messages. + +New in version 4.4 + @@ -905,6 +1068,8 @@ when setting the script error policy to raise an exception (e.g., 'Erro +New in version 4.4 + @@ -916,8 +1081,8 @@ Pass user-defined arguments to the Visual C++ batch file determined via autodete &cv-MSVC_SCRIPT_ARGS; is available for msvc batch file arguments that do not have first-class support -via construction variables or when there is an issue with the appropriate construction variable validation. -When available, it is recommended to use the appropriate construction variables (e.g., &cv-link-MSVC_TOOLSET_VERSION;) +via &consvars; or when there is an issue with the appropriate &consvar; validation. +When available, it is recommended to use the appropriate &consvars; (e.g., &cv-link-MSVC_TOOLSET_VERSION;) rather than &cv-MSVC_SCRIPT_ARGS; arguments. @@ -1041,6 +1206,8 @@ and compatible with the version of msvc selected. +New in version 4.4 + @@ -1159,6 +1326,8 @@ specify a Windows 10 SDK (e.g., '10.0.20348.0') for the build +New in version 4.4 + @@ -1329,6 +1498,8 @@ The burden is on the user to ensure the requisite toolset target architecture bu +New in version 4.4 + @@ -1409,6 +1580,8 @@ The burden is on the user to ensure the requisite libraries with spectre mitigat +New in version 4.4 + -- cgit v0.12 From 704ad77c0648a026def09c17e99dd365300ca2a7 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 18 Jan 2023 14:12:42 -0700 Subject: Adjust the appveyor build Skip lxml install, our Windows CI doesn't need it Skip installing coverage if not a coverage run Drop an uneeded test skip Signed-off-by: Mats Wichmann --- .appveyor.yml | 47 +++++++++++++++++++++++-------------------- .appveyor/disable_msvc_10.ps1 | 5 ----- .appveyor/exclude_tests.ps1 | 8 ++++++++ .appveyor/install-cov.bat | 2 ++ .appveyor/install.bat | 12 ++++++----- 5 files changed, 42 insertions(+), 32 deletions(-) delete mode 100644 .appveyor/disable_msvc_10.ps1 create mode 100644 .appveyor/exclude_tests.ps1 create mode 100644 .appveyor/install-cov.bat diff --git a/.appveyor.yml b/.appveyor.yml index 0302122..a8db5e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,31 +17,33 @@ cache: - C:\ProgramData\chocolatey\lib -> appveyor.yml install: - # add python and python user-base to path for pip installs + # direct choco install supposed to work, but not? still doing in install.bat + #- cinst: dmd ldc swig vswhere ixsltproc winflexbison3 - cmd: .\.appveyor\install.bat + - cmd: if %COVERAGE% equ 1 .\.appveyor\install-cov.bat -# build matrix will be number of images multiplied by each '-' below, -# less any exclusions. -# split builds into sets of four jobs due to appveyor per-job time limit -# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit) -# Maybe move this one somewhere else in future to restore some flexibility. +# Build matrix will be number of images multiplied by #entries in matrix:, +# less any excludes. +# +# "Build" is kind of a misnomer - we are actually running the test suite, +# and this is slow on Windows, so keep the matrix as small as possible. +# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit). +# maybe move coverage to github in future to restore some flexibility? environment: + COVERAGE: 0 + SCONS_CACHE_MSVC_CONFIG: "true" matrix: - + # Test oldest and newest supported Pythons, and a subset in between. + # Skipping 3.7 and 3.9 at this time - WINPYTHON: "Python311" - COVERAGE: 0 - WINPYTHON: "Python310" - COVERAGE: 0 - WINPYTHON: "Python38" - COVERAGE: 0 - + - WINPYTHON: "Python36" COVERAGE: 1 - # skipping 3.7 and 3.9 at this time - # remove sets of build jobs based on criteria below # to fine tune the number and platforms tested matrix: @@ -68,21 +70,23 @@ matrix: - image: Visual Studio 2022 WINPYTHON: "Python38" -# remove some binaries we don't want to be found +# Remove some binaries we don't want to be found +# Note this is no longer needed, git-windows bin/ is quite minimal now. before_build: - ps: .\.appveyor\ignore_git_bins.ps1 build: off build_script: - - # exclude VS 10.0 because it hangs the testing until this is resolved: - # https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired - - ps: .\.appveyor\disable_msvc_10.ps1 + # Image version-based excludes: + # No excludes at the moment, but the exclude script generates the + # (possibly empty) exclude_list.txt which is used in the following step, + # so leave the scheme in place in case we need to put back excludes later. + - ps: .\.appveyor\exclude_tests.ps1 # setup coverage by creating the coverage config file, and adding coverage # to the sitecustomize so that all python processes start with coverage - - ps: .\.appveyor\coverage_setup.ps1 + - ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_setup.ps1 } # NOTE: running powershell from cmd is intended because # it formats the output correctly @@ -90,8 +94,7 @@ build_script: # run coverage even if there was a test failure on_finish: - - ps: .\.appveyor\coverage_report.ps1 - # running codecov in powershell causes an error so running in platform - # shells + - ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_report.ps1 } + # running codecov in powershell causes an error so running in cmd - cmd: if %COVERAGE% equ 1 codecov -X gcov --file coverage_xml.xml diff --git a/.appveyor/disable_msvc_10.ps1 b/.appveyor/disable_msvc_10.ps1 deleted file mode 100644 index 086f1e4..0000000 --- a/.appveyor/disable_msvc_10.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -New-Item -Name exclude_list.txt -ItemType File; -$workaround_image = "Visual Studio 2015"; -if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) { - Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py'; -} diff --git a/.appveyor/exclude_tests.ps1 b/.appveyor/exclude_tests.ps1 new file mode 100644 index 0000000..6006a5c --- /dev/null +++ b/.appveyor/exclude_tests.ps1 @@ -0,0 +1,8 @@ +New-Item -Name exclude_list.txt -ItemType File; + +# exclude VS 10.0 because it hangs the testing until this is resolved: +# https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired +$workaround_image = "Visual Studio 2015"; +if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) { + Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py'; +} diff --git a/.appveyor/install-cov.bat b/.appveyor/install-cov.bat new file mode 100644 index 0000000..7dbc945 --- /dev/null +++ b/.appveyor/install-cov.bat @@ -0,0 +1,2 @@ +for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g) +C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov diff --git a/.appveyor/install.bat b/.appveyor/install.bat index b014dc7..561faac 100644 --- a/.appveyor/install.bat +++ b/.appveyor/install.bat @@ -1,12 +1,14 @@ C:\\%WINPYTHON%\\python.exe --version for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g) REM use mingw 32 bit until #3291 is resolved +REM add python and python user-base to path for pip installs set PATH=C:\\%WINPYTHON%;C:\\%WINPYTHON%\\Scripts;C:\\ProgramData\\chocolatey\\bin;C:\\MinGW\\bin;C:\\MinGW\\msys\\1.0\\bin;C:\\cygwin\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\mingw64\\bin;%PATH% C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pip setuptools wheel -C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov -set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml -C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt -REM install 3rd party tools to test with +REM No real use for lxml on Windows (and some versions don't have it): +REM We don't install the docbook bits so those tests won't run anyway +REM The Windows builds don't attempt to make the docs +REM Adjust this as requirements-dev.txt changes. +REM C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt +C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off ninja psutil choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison3 -set SCONS_CACHE_MSVC_CONFIG=true set -- cgit v0.12 From 2b81cdb47534a9c4faf71d750e7b0baeef97fd67 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 22 Jan 2023 11:40:27 -0700 Subject: Add Python 3.12 support * Updated one testcase which now generates a warning, failing the test (which expects no stderr). * Updated ActionTests.py to know about 3.12, and uses the current bytecode sequences (these might change later in the 3.12 cycle) * Added 3.11 and 3.12 to setup.cfg so tools which query "what Pythons does SCons support" from pypi metadata won't be fooled into thinking 3.11 isn't supported (or 3.12, though that's preliminary). Signed-off-by: Mats Wichmann --- CHANGES.txt | 4 ++++ RELEASE.txt | 1 + SCons/ActionTests.py | 18 ++++++++++++++++-- setup.cfg | 2 ++ test/rebuild-generated.py | 2 +- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 279ef2e..a110bd1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -106,6 +106,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER not be cached because the emitted filename contained a '$' and when looked up through a node ended up generating a Python SyntaxError because it was passed through scons_subst(). + - Add Python 3.12 support, and indicate 3.11/3.12 support in package. + 3.12 is in alpha for this SCons release, the bytecode sequences + embedded in SCons/ActionTests.py may need to change later, but + based on what is known now, 3.12 itself should work with this release. RELEASE 4.4.0 - Sat, 30 Jul 2022 14:08:29 -0700 diff --git a/RELEASE.txt b/RELEASE.txt index 35fd845..6c4cd53 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -43,6 +43,7 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY octal modes using the modern Python syntax (0o755 rather than 0755). - Migrated logging logic for --taskmastertrace to use Python's logging module. Added logging to NewParallel Job class (Andrew Morrow's new parallel job implementation) +- Preliminary support for Python 3.12. FIXES diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py index 101953b..88bb36f 100644 --- a/SCons/ActionTests.py +++ b/SCons/ActionTests.py @@ -1541,6 +1541,7 @@ class CommandGeneratorActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } meth_matches = [ @@ -1719,6 +1720,7 @@ class FunctionActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } @@ -1730,6 +1732,7 @@ class FunctionActionTestCase(unittest.TestCase): (3, 9): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'1, 1, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'1, 1, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } def factory(act, **kw): @@ -1974,6 +1977,7 @@ class LazyActionTestCase(unittest.TestCase): (3, 9): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 10): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), (3, 11): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), + (3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()'), } meth_matches = [ @@ -2039,6 +2043,7 @@ class ActionCallerTestCase(unittest.TestCase): (3, 9): b'd\x00S\x00', (3, 10): b'd\x00S\x00', (3, 11): b'\x97\x00d\x00S\x00', + (3, 12): b'\x97\x00d\x00S\x00', } af = SCons.Action.ActionFactory(GlobalFunc, strfunc) @@ -2250,6 +2255,7 @@ class ObjectContentsTestCase(unittest.TestCase): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), ), # 3.10.1, 3.10.2 (3, 11): bytearray(b'3, 3, 0, 0,(),(),(\x97\x00|\x00S\x00),(),()'), + (3, 12): bytearray(b'3, 3, 0, 0,(),(),(\x97\x00|\x00S\x00),(),()'), } c = SCons.Action._function_contents(func1) @@ -2288,7 +2294,11 @@ class ObjectContentsTestCase(unittest.TestCase): b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}" ), (3, 11): bytearray( - b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}"), + b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}" + ), + (3, 12): bytearray( + b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x97\x00d\x01|\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x00d\x02|\x00_\x01\x00\x00\x00\x00\x00\x00\x00\x00d\x00S\x00),(),(),2, 2, 0, 0,(),(),(\x97\x00d\x00S\x00),(),()}}{{{a=a,b=b}}}" + ), } assert c == expected[sys.version_info[:2]], f"Got\n{c!r}\nExpected\n" + repr( @@ -2322,7 +2332,11 @@ class ObjectContentsTestCase(unittest.TestCase): b'0, 0, 0, 0,(Hello, World!),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)' ), (3, 11): bytearray( - b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xa6\x01\x00\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)'), + b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xa6\x01\x00\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)' + ), + (3, 12): bytearray( + b'0, 0, 0, 0,(Hello, World!),(print),(\x97\x00\x02\x00e\x00d\x00\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00d\x01S\x00)' + ), } assert c == expected[sys.version_info[:2]], f"Got\n{c!r}\nExpected\n" + repr( diff --git a/setup.cfg b/setup.cfg index 941db34..f177d6f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,8 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Environment :: Console Intended Audience :: Developers License :: OSI Approved :: MIT License diff --git a/test/rebuild-generated.py b/test/rebuild-generated.py index 0b3659e..91b4e1e 100644 --- a/test/rebuild-generated.py +++ b/test/rebuild-generated.py @@ -83,7 +83,7 @@ env = Environment() kernelDefines = env.Command("header.hh", "header.hh.in", Copy('$TARGET', '$SOURCE')) kernelImporterSource = env.Command("generated.cc", ["%s"], "%s") kernelImporter = env.Program(kernelImporterSource + ["main.cc"]) -kernelImports = env.Command("KernelImport.hh", kernelImporter, ".%s$SOURCE > $TARGET") +kernelImports = env.Command("KernelImport.hh", kernelImporter, r".%s$SOURCE > $TARGET") osLinuxModule = env.StaticObject(["target.cc"]) """ % (generator_name, kernel_action, sep)) -- cgit v0.12 From a10124dc776002f2c59ccb79923c79a930781d72 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 09:28:20 -0800 Subject: Skip lxml if using py 3.11+ and you're on windows as there's currently not a lxml binary wheel for such. Remove when this changes --- requirements-dev.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6f9855f..1b12a75 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,9 @@ # for now keep pinning "known working" lxml, # it's been a troublesome component in the past. -lxml==4.9.1 +# Skip lxml for python 3.11+ on win32 as there's no binary wheel as of 01/22/2023 +lxml==4.9.1 ; python_version < '3.11' and sys_platform != 'win32' + ninja # Needed for test/Parallel/failed-build/failed-build.py -- cgit v0.12 From dda03dbc3c35fce1b3fe5e0e65fc59d0339817a8 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 09:30:39 -0800 Subject: Skip lxml if using py 3.11+ and you're on windows as there's currently not a lxml binary wheel for such. Remove when this changes --- .appveyor/install.bat | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.appveyor/install.bat b/.appveyor/install.bat index 561faac..95f5115 100644 --- a/.appveyor/install.bat +++ b/.appveyor/install.bat @@ -4,11 +4,10 @@ REM use mingw 32 bit until #3291 is resolved REM add python and python user-base to path for pip installs set PATH=C:\\%WINPYTHON%;C:\\%WINPYTHON%\\Scripts;C:\\ProgramData\\chocolatey\\bin;C:\\MinGW\\bin;C:\\MinGW\\msys\\1.0\\bin;C:\\cygwin\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\mingw64\\bin;%PATH% C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pip setuptools wheel -REM No real use for lxml on Windows (and some versions don't have it): -REM We don't install the docbook bits so those tests won't run anyway -REM The Windows builds don't attempt to make the docs -REM Adjust this as requirements-dev.txt changes. -REM C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt -C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off ninja psutil + +REM requirements-dev.txt will skip installing lxml for windows and py 3.11+, where there's +REM no current binary wheel +C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt + choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison3 set -- cgit v0.12 From 1f2864183e491181224fc1531e3ac4cb024c33a3 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 10:34:57 -0800 Subject: set max version for sphinx to be 6.0, and bump lxml up 1 version and prohibit installing it on windows with py3.12 for now --- requirements-dev.txt | 3 ++- requirements-pkg.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 1b12a75..1a0ef84 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,8 @@ # for now keep pinning "known working" lxml, # it's been a troublesome component in the past. # Skip lxml for python 3.11+ on win32 as there's no binary wheel as of 01/22/2023 -lxml==4.9.1 ; python_version < '3.11' and sys_platform != 'win32' +lxml==4.9.2 ; python_version < '3.12' and sys_platform == 'win32' +lxml==4.9.2 ; sys_platform != 'win32' ninja diff --git a/requirements-pkg.txt b/requirements-pkg.txt index 10b5393..ae71cde 100644 --- a/requirements-pkg.txt +++ b/requirements-pkg.txt @@ -8,6 +8,6 @@ readme-renderer # sphinx pinned because it has broken several times on new releases -sphinx>=5.1.1 +sphinx < 6.0 sphinx-book-theme rst2pdf -- cgit v0.12 From a844619dc360ea95baa72369db33727a22ba5058 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 10:49:22 -0800 Subject: revise based on mwichmann's review --- requirements-dev.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 1a0ef84..e168ccb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,9 +4,8 @@ # for now keep pinning "known working" lxml, # it's been a troublesome component in the past. -# Skip lxml for python 3.11+ on win32 as there's no binary wheel as of 01/22/2023 -lxml==4.9.2 ; python_version < '3.12' and sys_platform == 'win32' -lxml==4.9.2 ; sys_platform != 'win32' +# Skip lxml for win32 as no tests which require it currently pass on win32 +lxml==4.9.2; python_version < 3.12 and sys_platform != 'win32' ninja -- cgit v0.12 From 3b3a8bd1a1927c6e1ffc7aa381eda4d8c2beae96 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 10:58:26 -0800 Subject: Quote python_version value --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e168ccb..82faa28 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ # for now keep pinning "known working" lxml, # it's been a troublesome component in the past. # Skip lxml for win32 as no tests which require it currently pass on win32 -lxml==4.9.2; python_version < 3.12 and sys_platform != 'win32' +lxml==4.9.2; python_version < '3.12' and sys_platform != 'win32' ninja -- cgit v0.12 From f293dd97feafeb9faf9ac805323d173bc8173176 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 23 Jan 2023 11:11:36 -0800 Subject: [ci skip] Add blurb to CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 279ef2e..90b0aee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -106,6 +106,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER not be cached because the emitted filename contained a '$' and when looked up through a node ended up generating a Python SyntaxError because it was passed through scons_subst(). + - Updated MSVC documentation - adds "version added" annotations on recently + added construction variables and provides a version-mapping table. + RELEASE 4.4.0 - Sat, 30 Jul 2022 14:08:29 -0700 -- cgit v0.12