Skip to content

Commit 351c604

Browse files
authored
Merge pull request SCons#4488 from mwichmann/maint/warnings
Cleanup Warnings module
2 parents 3b168f5 + d1e3109 commit 351c604

File tree

8 files changed

+253
-157
lines changed

8 files changed

+253
-157
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
9999
describe the Microsoft C++ compiler. Update the version table slightly.
100100
Amplified the usage of MSVC_VERSION.
101101
- Improve SharedLibrary docs a bit.
102+
- Update warnings module: adds docstrings, drop three unused warnings
103+
(DeprecatedSourceCodeWarning, TaskmasterNeedsExecuteWarning,
104+
DeprecatedMissingSConscriptWarning) add two warnings to manpage
105+
(cache-cleanup-error, future-reserved-variable), improve unittest, tweak
106+
Sphinx build.
102107

103108

104109
RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700

RELEASE.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
3434
prototype when including a header file. Fixes GH Issue #4320
3535
- Now supports pre-release Python 3.13
3636
- Support for Python versions without support for the `threading` package has been removed
37+
- Dropped three unused warning classes: DeprecatedSourceCodeWarning,
38+
TaskmasterNeedsExecuteWarning, DeprecatedMissingSConscriptWarning.
39+
* Two warning classes that are actually used were added to manpage section on
40+
enabling warnings (cache-cleanup-error, future-reserved-variable).
3741

3842
FIXES
3943
-----
@@ -90,6 +94,8 @@ DOCUMENTATION
9094
the Scanner Objects section of the manpage.
9195
- The manpage entry for Pseudo was clarified.
9296
- The manpage entry for SharedLibrary was clarified.
97+
- Update API docs for Warnings framework; add two warns to manpage
98+
enable/disable control.
9399

94100
DEVELOPMENT
95101
-----------

SCons/Script/SConsOptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,9 @@ def experimental_callback(option, opt, value, parser):
875875

876876
def warn_md5_chunksize_deprecated(option, opt, value, parser) -> None:
877877
if opt == '--md5-chunksize':
878-
SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning,
879-
"Parameter %s is deprecated. Use "
880-
"--hash-chunksize instead." % opt)
878+
SCons.Warnings.warn(SCons.Warnings.DeprecatedOptionsWarning,
879+
f"Option {opt} is deprecated. "
880+
"Use --hash-chunksize instead.")
881881

882882
setattr(parser.values, option.dest, value)
883883

0 commit comments

Comments
 (0)