From e27b28c6b3ca8c9155bff38891189eb73deab611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 20 Nov 2023 07:38:52 +0100 Subject: Remove incorrect dependencies from `setup.cfg` Remove the `install_requires` on `setuptools`. This key is used to specify packages that are needed at runtime. SCons nowhere in its code does import `setuptools` or `pkg_resources`. Remove the `setup_requires` on `build`. `build` is a frontend package and a detail of how the build is invoked, while `setup_requires` are used to specify backend dependencies (i.e. packages that are installed after `build` is invoked). Remove the `setup_requires` on `setuptools`. It is a key specific to setuptools, so for it to be interpreted `setuptools` need to be installed already. The actual backend dependency on `setuptools` is specified in `pyproject.toml`, so the dependency is entirely redundant. --- CHANGES.txt | 5 ++--- RELEASE.txt | 2 +- setup.cfg | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f45dc9647..a55cb8f5f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,9 +9,8 @@ NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer suppo RELEASE VERSION/DATE TO BE FILLED IN LATER - From John Doe: - - - Whatever John Doe did. + From Michał Górny: + - Remove unecessary dependencies on pypi packages from setup.cfg RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700 diff --git a/RELEASE.txt b/RELEASE.txt index 6bf0d09b1..b60e75834 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -44,7 +44,7 @@ IMPROVEMENTS PACKAGING --------- -- List changes in the way SCons is packaged and/or released +- Remove unecessary dependencies on pypi packages from setup.cfg DOCUMENTATION ------------- diff --git a/setup.cfg b/setup.cfg index b6d7a5e56..40e24e298 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,10 +45,6 @@ classifiers = [options] zip_safe = False python_requires = >=3.6 -install_requires = setuptools -setup_requires = - setuptools - build include_package_data = True packages = find: -- cgit v1.2.3 From c2b2f632e9857d92a1817e0aaa872833152b4921 Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:17:33 +0100 Subject: Fixing a bug with --debug=sconscript where no exit message was emitted on exception catch --- SCons/Script/SConscript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCons/Script/SConscript.py b/SCons/Script/SConscript.py index 0d7508808..ff733dd3d 100644 --- a/SCons/Script/SConscript.py +++ b/SCons/Script/SConscript.py @@ -280,7 +280,7 @@ def _SConscript(fs, *files, **kw): if SCons.Debug.sconscript_trace: print("scons: Exiting "+str(scriptname)) except SConscriptReturn: - pass + print("scons: Exiting "+str(scriptname)) finally: if Main.print_time: elapsed = time.perf_counter() - start_time -- cgit v1.2.3 From e552f59799f8a05264f7184359cf9626fcdb9c1c Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:25:45 +0100 Subject: Update SConscript.py: typo --- SCons/Script/SConscript.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SCons/Script/SConscript.py b/SCons/Script/SConscript.py index ff733dd3d..85070ab05 100644 --- a/SCons/Script/SConscript.py +++ b/SCons/Script/SConscript.py @@ -280,7 +280,10 @@ def _SConscript(fs, *files, **kw): if SCons.Debug.sconscript_trace: print("scons: Exiting "+str(scriptname)) except SConscriptReturn: - print("scons: Exiting "+str(scriptname)) + if SCons.Debug.sconscript_trace: + print("scons: Exiting "+str(scriptname)) + else: + pass finally: if Main.print_time: elapsed = time.perf_counter() - start_time -- cgit v1.2.3 From 7668569d8c503676a49e666d5877f9c7498888ee Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:14:38 +0000 Subject: adding unit tests to the fix --- CHANGES.txt | 3 +++ test/option/debug-sconscript.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a55cb8f5f..46d0abb03 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ NOTE: The 4.0.0 Release of SCons dropped Python 2.7 Support NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported RELEASE VERSION/DATE TO BE FILLED IN LATER + From Sten Grüner: + - Fix of --debug=sconscript option to return exist statements when using return + statement with stop flag enabled From Michał Górny: - Remove unecessary dependencies on pypi packages from setup.cfg diff --git a/test/option/debug-sconscript.py b/test/option/debug-sconscript.py index 9638f7914..337a2c4e7 100644 --- a/test/option/debug-sconscript.py +++ b/test/option/debug-sconscript.py @@ -51,6 +51,18 @@ expect = [ 'scons: Exiting %s%sSConstruct' % (wpath, os.sep) ] test.must_contain_all_lines(test.stdout(), expect) + +# Ensure that reutrns with stop are handled properly + +test.write('SConstruct', """\ +foo = "bar" +Return("foo", stop=True) +print("SConstruct") +""") + +test.run(arguments="--debug=sconscript .") +test.must_contain_all_lines(test.stdout(), expect) + test.pass_test() # Local Variables: -- cgit v1.2.3 From 87ac7e8a4853d65767e0a326b561b183cbdbe517 Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:15:55 +0100 Subject: Typo in CHANGES.txt --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 46d0abb03..671fd6329 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,7 @@ NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer suppo RELEASE VERSION/DATE TO BE FILLED IN LATER From Sten Grüner: - - Fix of --debug=sconscript option to return exist statements when using return + - Fix of the --debug=sconscript option to return exist statements when using return statement with stop flag enabled From Michał Górny: -- cgit v1.2.3 From f63d08d351a42edd2ac63ef62abb9dc3ccf4071f Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:28:58 +0100 Subject: Update CHANGES.txt --- CHANGES.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 671fd6329..c0c8ed7eb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,13 +8,12 @@ NOTE: The 4.0.0 Release of SCons dropped Python 2.7 Support NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported RELEASE VERSION/DATE TO BE FILLED IN LATER - From Sten Grüner: - - Fix of the --debug=sconscript option to return exist statements when using return - statement with stop flag enabled - From Michał Górny: - Remove unecessary dependencies on pypi packages from setup.cfg + From Sten Grüner: + - Fix of the --debug=sconscript option to return exist statements when using return + statement with stop flag enabled RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700 -- cgit v1.2.3 From 83eaacb7501f2277a8963d7c23d0001f35d74609 Mon Sep 17 00:00:00 2001 From: StenGruener <69786685+StenGruener@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:29:49 +0100 Subject: Update RELEASE.txt --- RELEASE.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index b60e75834..c9da8152c 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -32,7 +32,8 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY FIXES ----- -- List fixes of outright bugs +- Fix of the --debug=sconscript option to return exist statements when using return + statement with stop flag enabled IMPROVEMENTS ------------ -- cgit v1.2.3 From f0633fcdb2fe295b9d013cf9343f1bb9c282e526 Mon Sep 17 00:00:00 2001 From: fazledyn-or Date: Tue, 5 Dec 2023 15:19:57 +0600 Subject: Replaced `NotImplementedError` with `NotImplemented` Signed-off-by: fazledyn-or --- SCons/Variables/ListVariable.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SCons/Variables/ListVariable.py b/SCons/Variables/ListVariable.py index bfa48f5eb..a0640e634 100644 --- a/SCons/Variables/ListVariable.py +++ b/SCons/Variables/ListVariable.py @@ -70,22 +70,22 @@ class _ListVariable(collections.UserList): self.allowedElems = sorted(allowedElems) def __cmp__(self, other): - raise NotImplementedError + return NotImplemented def __eq__(self, other): - raise NotImplementedError + return NotImplemented def __ge__(self, other): - raise NotImplementedError + return NotImplemented def __gt__(self, other): - raise NotImplementedError + return NotImplemented def __le__(self, other): - raise NotImplementedError + return NotImplemented def __lt__(self, other): - raise NotImplementedError + return NotImplemented def __str__(self) -> str: if not len(self): -- cgit v1.2.3 From cd2abea98da9246a8202227173c4c5782b6ba0e7 Mon Sep 17 00:00:00 2001 From: fazledyn-or Date: Wed, 6 Dec 2023 11:25:56 +0600 Subject: Added blurb to CHANGES & RELEASE Signed-off-by: fazledyn-or --- CHANGES.txt | 4 ++++ RELEASE.txt | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c0c8ed7eb..5a9d9e345 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Fix of the --debug=sconscript option to return exist statements when using return statement with stop flag enabled + From Ataf Fazledin Ahamed: + - Use of NotImplemented instead of NotImplementedError for special methods + of _ListVariable class + RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700 From Max Bachmann: diff --git a/RELEASE.txt b/RELEASE.txt index c9da8152c..7599d43fd 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -38,9 +38,8 @@ FIXES IMPROVEMENTS ------------ -- List improvements that wouldn't be visible to the user in the - documentation: performance improvements (describe the circumstances - under which they would be observed), or major code cleanups +- Use of NotImplemented instead of NotImplementedError for special methods + of _ListVariable class PACKAGING --------- -- cgit v1.2.3