summaryrefslogtreecommitdiffstats
path: root/test/Deprecated
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated BuildDir, build_dirMats Wichmann2019-12-152-586/+0
| | | | | | | | | Updates docs and code; moves tests to test/Removed/BuildDir/Old. New tests verify that these can no longer be used. Along the way a small cleanup in SConscript.py Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove deprecated env.Copy()Mats Wichmann2019-12-141-50/+0
| | | | | | | | | Method removed. Test moved to test/Removed/Copy-Method/Old, and new test added to ensure it takes an AttributeError. Deprecation warning no longer useful for this one, so removed. Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove deprecated {Source,Target}SignaturesMats Wichmann2019-10-2011-1027/+0
| | | | | | | | | | These two have been deprecated since 2010 (about SCons 2.0), commit 935e6985. Methods are removed, setoption for setting them removed, doc is removed, tests are migrated to test/Removed/*/Old with a sconstest.skip file so they don't run, and two new tests are added to confirm that using the functions and setoptions generate exceptions. Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove deprecated debug optionsMats Wichmann2019-09-124-478/+0
| | | | | | | | | | | | | | | | | These options have been deprecated since 2007. They were originally announced to be disabled in SCons 2.0.0, but that didn't happen. Left the deprecated-debug-options behavior is in, but the dictionary of such options is now empty, and there's a new dict of removed options, and presence in that dict raises an exception. The four tests that were in test/Deprecated move to a new directory test/Removed and are simplified just to make sure invocation errors scons out. (git interprets most of these as remove/add for some reason) These appear to have been already removed from docs, so no doc impact. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] test fixes for file closings, rawstringsMats Wichmann2019-04-2510-23/+26
| | | | | | | On a linux host (missing some things that may be on the Travis CI setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages. Signed-off-by: Mats Wichmann <mats@linux.com>
* Clean up some tests: use context managersMats Wichmann2019-02-141-1/+2
| | | | | | | | | Plenty of complaints coming from Python 3.8alpha on unclosed files. Targeted those areas which intersect with PyPy failures - this changeset reduces the PyPy fails by 17 on the local test environment. So this affects both Issue #3299 and the PyPy support project. Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove SCons.Options code which has long been deprecated and already removed ↵William Deegan2018-01-309-1511/+0
| | | | from documents. Also remove associated tests.
* Fix tests where the GenerateHelpText() sort function was never correct and ↵William Deegan2017-10-121-2/+2
| | | | fixing the logic broke the test because of that
* Fix tests which break when using print() and no from __future__ import ↵William Deegan2017-09-252-2/+2
| | | | print_function under python 2.7 because the print('a','b') effectively becomes printing a tuple which doesn't match the expected strings
* remove deprecated module SCons.SigWilliam Deegan2017-04-161-68/+0
|
* Remove deprecated tool SubversionWilliam Deegan2017-03-201-186/+0
|
* Remove deprecated tool SCCSWilliam Deegan2017-03-206-796/+0
|
* Remove deprecated tool RCSWilliam Deegan2017-03-207-1053/+0
|
* Remove deprecated tool CVSWilliam Deegan2017-03-203-613/+0
|
* Remove deprecated tool BitKeeperWilliam Deegan2017-03-203-664/+0
|
* remove deprecated Perforce toolWilliam Deegan2017-03-203-569/+0
|
* Merged in rodrigc/scons (pull request #409)William Deegan2017-03-132-2/+2
|\ | | | | | | Remove 'U' flag to open()
| * Remove 'U' flag to open() which is deprecated.Craig Rodrigues2017-03-112-2/+2
| |
* | no more cmp in py3, define a compare function and use it. Also specify ↵William Deegan2017-03-121-1/+14
|/ | | | DefaultEnvironment(tools=[]) to speed up the test slightly
* fix print() conversion on testWilliam Deegan2016-05-121-5/+8
|
* Fix missing right parent in print () function in generated SConstruct.William Deegan2016-05-091-1/+2
|
* Commit resolved conflicted merge.Russel Winder2016-04-1010-10/+10
|\
| * Fix for backslash being treated as an escape characterThomas Tanner2016-01-3010-10/+10
| | | | | | | | | | On my windows system, my python is in c:\apps\32\python. Theres a lot of places where that \32 gets turned into an ascii character and the unit tests don't run.
* | Some more statement to function transforms.Russel Winder2016-01-012-11/+11
| |
* | Some more print statements to functions.Russel Winder2016-01-017-29/+29
| |
* | Merged default branch into python3-port to keep it up to date.Gary Oberbrunner2014-08-2318-18/+18
|\ \ | |/ | | | | | | Hand-updated a few things to keep them python3-safe, and handled several merge conflicts.
| * fix test which was referring to tigris mailing list instead of current ↵William Deegan2014-07-291-1/+1
| | | | | | | | scons.or mailing list
| * Fix development mailing list with a new address @scons.organatoly techtonik2014-05-2818-18/+18
| |
* | Made former 2to3 changes Python 2.7 compatible (or removed unneeded changes).Stefan Zimmermann2014-03-312-0/+2
| |
* | Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.Gary Oberbrunner2013-09-223-5/+5
|/
* os.spawnv is here since Python 1.6, removing compatibility codeanatoly techtonik2012-12-121-7/+2
|
* Improve error messages for invalid EnumVariables to include legal values.Gary Oberbrunner2011-01-131-3/+3
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2365Greg Noel2010-05-282-5/+4
| | | | | Thanks to Steven Knight, the SCCS and Perforce tests have been debugged. Only the BitKeeper test remains to be debugged.
* http://scons.tigris.org/issues/show_bug.cgi?id=2365Greg Noel2010-05-2828-251/+557
| | | | | | Start the deprecation cycle for SourceCode() and its related factory functions. Deprecation messages are added to the functions. Regression tests are modified to deal with the messages being generated. Documentation is updated.
* Move tests for SourceCode() into test/Deprecated as a preliminary to beginningGreg Noel2010-05-2624-0/+3702
| | | | the deprecation cycle.
* Start the deprecation cycle for the BuildDir() method and the build_dirGreg Noel2010-05-2613-34/+135
| | | | | | | | | | | | | | | | | | | | | | keyword parameter. Several existing tests were still using BuildDir() or build_dir; they were converted to use VariantDir() and variant_dir. New tests were added to validate that the --warn=deprecated-build-dir option and the SetOption method did the right thing. This led to the discovery that a commonly-used test pattern provided by the infrastructure gobbled up too much, causing tests to succeed when they should have failed. Fixing the pattern led to other tests needing to be fixed. In the process, it was discovered that the SCONSFLAG environment variable was not getting correctly reset to its original value. Fixing this also caused additional tests to misbehave, requiring them to be updated. And test/Sig.py, which tests the deprecated SCons.Sig module, was moved to the test/Deprecated directory. All in all, quite a lot of action for what was supposed to be a simple change.
* Update deprecated features to the next life-cycle stageGreg Noel2010-05-2111-84/+82
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-241-2/+0
| | | | | | | Comb out all code that supported earlier versions of Python. Most such code is in snippets of only a few lines and can be identified by having a Python version string in it. Such snippets add up; this combing pass probably got rid of over 500 lines of code.
* Index: test/Variables/help.pyGreg Noel2010-04-193-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================================================================== --- test/Variables/help.py (revision 4792) +++ test/Variables/help.py (working copy) @@ -28,23 +28,15 @@ Test the Variables help messages. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') +import TestSCons str_True = str(True) str_False = str(False) -import TestSCons - test = TestSCons.TestSCons() - - workpath = test.workpath() qtpath = os.path.join(workpath, 'qt') libpath = os.path.join(qtpath, 'lib') Index: test/Variables/PackageVariable.py =================================================================== --- test/Variables/PackageVariable.py (revision 4792) +++ test/Variables/PackageVariable.py (working copy) @@ -28,14 +28,8 @@ Test the PackageVariable canned Variable type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons() Index: test/Variables/BoolVariable.py =================================================================== --- test/Variables/BoolVariable.py (revision 4792) +++ test/Variables/BoolVariable.py (working copy) @@ -28,14 +28,8 @@ Test the BoolVariable canned Variable type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons() Index: test/Deprecated/Options/help.py =================================================================== --- test/Deprecated/Options/help.py (revision 4792) +++ test/Deprecated/Options/help.py (working copy) @@ -28,24 +28,16 @@ Test the Options help messages. """ -import os.path +import os import re -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') +import TestSCons str_True = str(True) str_False = str(False) -import TestSCons - test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - - workpath = test.workpath() qtpath = os.path.join(workpath, 'qt') libpath = os.path.join(qtpath, 'lib') Index: test/Deprecated/Options/PackageOption.py =================================================================== --- test/Deprecated/Options/PackageOption.py (revision 4792) +++ test/Deprecated/Options/PackageOption.py (working copy) @@ -28,14 +28,8 @@ Test the PackageOption canned Option type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) Index: test/Deprecated/Options/BoolOption.py =================================================================== --- test/Deprecated/Options/BoolOption.py (revision 4792) +++ test/Deprecated/Options/BoolOption.py (working copy) @@ -28,12 +28,6 @@ Test the BoolOption canned Option type. """ -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) Index: src/script/scons-time.py =================================================================== --- src/script/scons-time.py (revision 4792) +++ src/script/scons-time.py (working copy) @@ -45,13 +45,6 @@ import time try: - True, False -except NameError: - # Pre-2.2 Python has no True or False keyword. - exec('True = not 0') - exec('False = not 1') - -try: sorted except NameError: # Pre-2.4 Python has no sorted() function. Index: src/engine/SCons/compat/_scons_builtins.py =================================================================== --- src/engine/SCons/compat/_scons_builtins.py (revision 4792) +++ src/engine/SCons/compat/_scons_builtins.py (working copy) @@ -37,13 +37,8 @@ all() any() - bool() - dict() sorted() memoryview() - True - False - zip() Implementations of functions are *NOT* guaranteed to be fully compliant with these functions in later versions of Python. We are only concerned @@ -62,22 +57,6 @@ import builtins try: - False -except NameError: - # Pre-2.2 Python has no False keyword. - exec('builtins.False = not 1') - # Assign to False in this module namespace so it shows up in pydoc output. - #False = False - -try: - True -except NameError: - # Pre-2.2 Python has no True keyword. - exec('builtins.True = not 0') - # Assign to True in this module namespace so it shows up in pydoc output. - #True = True - -try: all except NameError: # Pre-2.5 Python has no all() function. @@ -108,42 +87,6 @@ any = any try: - bool -except NameError: - # Pre-2.2 Python has no bool() function. - def bool(value): - """Demote a value to 0 or 1, depending on its truth value. - - This is not to be confused with types.BooleanType, which is - way too hard to duplicate in early Python versions to be - worth the trouble. - """ - return not not value - builtins.bool = bool - bool = bool - -try: - dict -except NameError: - # Pre-2.2 Python has no dict() keyword. - def dict(seq=[], **kwargs): - """ - New dictionary initialization. - """ - d = {} - for k, v in seq: - d[k] = v - d.update(kwargs) - return d - builtins.dict = dict - -try: - file -except NameError: - # Pre-2.2 Python has no file() function. - builtins.file = open - -try: memoryview except NameError: # Pre-2.7 doesn't have the memoryview() built-in. @@ -185,27 +128,6 @@ return result builtins.sorted = sorted -# -try: - zip -except NameError: - # Pre-2.2 Python has no zip() function. - def zip(*lists): - """ - Emulates the behavior we need from the built-in zip() function - added in Python 2.2. - - Returns a list of tuples, where each tuple contains the i-th - element rom each of the argument sequences. The returned - list is truncated in length to the length of the shortest - argument sequence. - """ - result = [] - for i in range(min(list(map(len, lists)))): - result.append(tuple([l[i] for l in lists])) - return result - builtins.zip = zip - #if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)): # def lstrip(s, c=string.whitespace): # while s and s[0] in c: Index: runtest.py =================================================================== --- runtest.py (revision 4792) +++ runtest.py (working copy) @@ -97,17 +97,6 @@ import time try: - x = True -except NameError: - True = not 0 - False = not 1 -else: - del x - -if not hasattr(os, 'WEXITSTATUS'): - os.WEXITSTATUS = lambda x: x - -try: sorted except NameError: # Pre-2.4 Python has no sorted() function. Index: QMTest/TestSCons.py =================================================================== --- QMTest/TestSCons.py (revision 4792) +++ QMTest/TestSCons.py (working copy) @@ -23,12 +23,6 @@ import sys import time -try: - True -except NameError: - exec('True = not 0') - exec('False = not 1') - from TestCommon import * from TestCommon import __all__
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-173-6/+6
| | | | | Fix the 'assignment to True or False' and the '__getitem__ not supported for exception classes' deprecation warnings.
* Move 2.0 changes collected in branches/pending back to trunk for furtherGreg Noel2010-03-259-40/+25
| | | | | development. Note that this set of changes is NOT backward-compatible; the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
* Issue 2326, change execfile() to exec ... (FIXED)Greg Noel2009-03-082-3/+2
|
* replace execfile() by equivalent exec statementGreg Noel2009-03-022-2/+3
|
* Remove more unnecessary imports from test scripts.Steven Knight2009-02-111-1/+0
|
* Add emacs and vim editing settings to the bottom of *.py files.Steven Knight2009-02-0928-0/+168
|
* Remove (lots) more unnecessary imports.Steven Knight2009-02-0611-20/+3
|
* Commonize new string-search-in-output methods:Steven Knight2009-02-062-17/+6
| | | | | | | | test.must_contain_all_lines() test.must_contain_any_line() test.must_not_contain_any_line() Update tests to use them. Remove "import string" lines where the change made them unnecessary.
* Fix use of path names in regular expression matches by running themSteven Knight2008-12-292-13/+27
| | | | | through re.escape() (specifically to avoid problems with embedded "+++" in temporary directory names on Mac OS X).
* Add warnings for use of the (already) deprecated Options objectSteven Knight2008-12-209-152/+204
| | | | and its related functions.
* Issue 2231: Add a --warn=future-deprecated option, along withSteven Knight2008-12-111-0/+58
| | | | | | | FutureDeprecatedWarning and MandatoryDeprecatedWarning subclasses. Use these to future-deprecate the Taskmaster.Task class, which we intend to turn into an abstract base class by requiring subclasses to implement the .needs_execute() method.