summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
Commit message (Collapse)AuthorAgeFilesLines
* - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw2012-02-211-1/+1
| | | | | | environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.
* Merged revisions 77942,79023 via svnmerge fromEzio Melotti2010-08-021-2/+4
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77942 | ezio.melotti | 2010-02-03 07:37:26 +0200 (Wed, 03 Feb 2010) | 1 line #7092: Silence more py3k warnings. Patch by Florent Xicluna. ........ r79023 | ezio.melotti | 2010-03-17 15:52:48 +0200 (Wed, 17 Mar 2010) | 1 line #7092: silence some more py3k warnings. ........
* Merged revisions 81537 via svnmerge fromVictor Stinner2010-05-251-0/+20
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81537 | victor.stinner | 2010-05-26 00:30:32 +0200 (mer., 26 mai 2010) | 3 lines Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and error handler, instead of writing to the C stderr file in utf-8 ........
* Merged revisions 78835-78837,78870 via svnmerge fromVictor Stinner2010-03-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78835 | victor.stinner | 2010-03-11 13:34:39 +0100 (jeu., 11 mars 2010) | 7 lines Issue #7774: Set sys.executable to an empty string if argv[0] has been set to an non existent program name and Python is unable to retrieve the real program name. Fix also sysconfig: if sys.executable is an empty string, use the current working directory. ........ r78836 | victor.stinner | 2010-03-11 14:27:35 +0100 (jeu., 11 mars 2010) | 4 lines Fix test_executable introduce in previous commit (r78835): Windows is able to retrieve the absolute Python path even if argv[0] has been set to a non existent program name. ........ r78837 | victor.stinner | 2010-03-11 14:46:06 +0100 (jeu., 11 mars 2010) | 3 lines Another fix to test_executable() of test_sys: set the current working to avoid the #7774 bug. ........ r78870 | victor.stinner | 2010-03-12 15:30:26 +0100 (ven., 12 mars 2010) | 1 line NEWS: issue #7774 is related to Library (sys), not Core and Builtins ........
* Merged revisions 77989 via svnmerge fromAntoine Pitrou2010-02-051-1/+1
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77989 | antoine.pitrou | 2010-02-05 18:05:54 +0100 (ven., 05 févr. 2010) | 6 lines Issue #5677: Explicitly forbid write operations on read-only file objects, and read operations on write-only file objects. On Windows, the system C library would return a bogus result; on Solaris, it was possible to crash the interpreter. Patch by Stefan Krah. ........
* Merged revisions 77892 via svnmerge fromVictor Stinner2010-01-311-0/+4
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77892 | victor.stinner | 2010-01-31 23:32:15 +0100 (dim., 31 janv. 2010) | 4 lines Issue #7819: Check sys.call_tracing() arguments types. py3k was already patched by issue #3661. ........
* Merged revisions ↵Georg Brandl2009-04-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70866-70868,70870-70871,70893,70896,70902,70905,70907,70912,70915,70927,70933,70940,70944,70954,70963,70998,71056 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70866 | georg.brandl | 2009-03-31 21:06:57 +0200 (Di, 31 Mär 2009) | 1 line #4882: document named group behavior a bit better. ........ r70867 | georg.brandl | 2009-03-31 21:10:35 +0200 (Di, 31 Mär 2009) | 1 line #1096310: document usage of sys.__std*__ a bit better. ........ r70868 | georg.brandl | 2009-03-31 21:12:17 +0200 (Di, 31 Mär 2009) | 1 line #5190: export make_option in __all__. ........ r70870 | georg.brandl | 2009-03-31 21:26:24 +0200 (Di, 31 Mär 2009) | 1 line #4411: document mro() and __mro__. (I hope I got it right.) ........ r70871 | georg.brandl | 2009-03-31 21:30:56 +0200 (Di, 31 Mär 2009) | 1 line #5618: fix typo. ........ r70893 | georg.brandl | 2009-03-31 22:56:32 +0200 (Di, 31 Mär 2009) | 1 line #1530012: move TQS section before raw strings. ........ r70896 | georg.brandl | 2009-03-31 23:15:33 +0200 (Di, 31 Mär 2009) | 1 line #5598: document DocFileSuite *args argument. ........ r70902 | georg.brandl | 2009-03-31 23:43:03 +0200 (Di, 31 Mär 2009) | 1 line #1675026: add a note about a strange Windows problem, and remove notes about AtheOS. ........ r70905 | georg.brandl | 2009-04-01 00:03:40 +0200 (Mi, 01 Apr 2009) | 1 line #5563: more documentation for bdist_msi. ........ r70907 | georg.brandl | 2009-04-01 00:18:19 +0200 (Mi, 01 Apr 2009) | 1 line #3427: document correct return type for urlopen().info(). ........ r70912 | georg.brandl | 2009-04-01 00:35:46 +0200 (Mi, 01 Apr 2009) | 1 line #5617: add a handy function to print a unicode string to gdbinit. ........ r70915 | georg.brandl | 2009-04-01 00:40:16 +0200 (Mi, 01 Apr 2009) | 1 line #5018: remove confusing paragraph. ........ r70927 | georg.brandl | 2009-04-01 01:01:27 +0200 (Mi, 01 Apr 2009) | 1 line Dont shout to users. ........ r70933 | georg.brandl | 2009-04-01 02:04:33 +0200 (Mi, 01 Apr 2009) | 2 lines Issue #5635: Fix running test_sys with tracing enabled. ........ r70940 | georg.brandl | 2009-04-01 06:21:14 +0200 (Mi, 01 Apr 2009) | 2 lines The SimpleXMLRPCServer's CGI handler now runs like a pony. ........ r70944 | georg.brandl | 2009-04-01 06:32:39 +0200 (Mi, 01 Apr 2009) | 1 line #5631: add upload to list of possible commands, which is presented in --help-commands. ........ r70954 | georg.brandl | 2009-04-01 17:23:43 +0200 (Mi, 01 Apr 2009) | 1 line Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH. ........ r70963 | georg.brandl | 2009-04-01 19:46:01 +0200 (Mi, 01 Apr 2009) | 1 line #5655: fix docstring oversight. ........ r70998 | georg.brandl | 2009-04-01 23:54:21 +0200 (Mi, 01 Apr 2009) | 1 line In Pdb, stop assigning values to __builtin__._ which interferes with the one commonly installed by gettext. ........ r71056 | georg.brandl | 2009-04-02 19:43:07 +0200 (Do, 02 Apr 2009) | 2 lines Actually the displayhook should print the repr. ........
* Fixed test failure on Win64 machines.Robert Schuppenies2008-07-141-8/+5
|
* Added garbage collector overhead and optional default return value toRobert Schuppenies2008-07-101-0/+23
| | | | sys.getsizeof.
* Added additional __sizeof__ implementations and addressed comments made inRobert Schuppenies2008-07-101-18/+47
| | | | Issue3122.
* Fixed Issue3122 and extended sys.getsizeof tests for built-in types.Robert Schuppenies2008-07-101-67/+172
|
* remove test_compact_freelists from test_sysBenjamin Peterson2008-07-061-19/+0
|
* Corrected inconsistencies in sizeof tests and addressed issue pointedRobert Schuppenies2008-06-261-12/+12
| | | | out by Jean Brouwers.
* Issue 3147: Fixed SizeofTest failure for LLP64 systems.Robert Schuppenies2008-06-251-71/+60
|
* Revert 64424, 64438, and 64439.Raymond Hettinger2008-06-241-1/+1
|
* Make bin() implementation parallel oct() and hex() so that int/long ↵Raymond Hettinger2008-06-201-1/+1
| | | | subclasses can override or so that other classes can support.
* Issue 3048: Fixed sys.sizeof test fails with wide unicode.Robert Schuppenies2008-06-171-2/+1
|
* Fixed: sys.getsizeof does not take the actual length of the tuples into account.Robert Schuppenies2008-06-131-0/+3
|
* Issue 3048: Fixed sys.getsizeof for unicode objects.Robert Schuppenies2008-06-101-7/+28
|
* Fix test_sys.Robert Schuppenies2008-06-011-2/+0
|
* Some style nits. Also clarify in the docstrings what __sizeof__ does.Georg Brandl2008-06-011-11/+11
|
* Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.Robert Schuppenies2008-06-011-2/+149
|
* New environment variable PYTHONIOENCODING.Martin v. Löwis2008-06-011-0/+20
|
* Fix sys.flags to properly expose bytes_warning.Brett Cannon2008-05-081-1/+1
| | | | Closes issue #2790.
* Temporarily disable this test. It's been broken for a week.Raymond Hettinger2008-02-091-15/+15
|
* Small adjustments for test compact freelist test. It's no passing on Windows ↵Christian Heimes2008-02-041-5/+5
| | | | as well.
* Increase debugging to investige failing tests on some build botsChristian Heimes2008-02-041-0/+3
|
* Patch #1953Christian Heimes2008-02-041-0/+18
| | | | | I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers. The patch also renames sys._cleartypecache to sys._clear_type_cache
* Typo fixesAndrew M. Kuchling2008-01-151-1/+1
|
* Now that I've learnt about structseq objects I felt like converting ↵Christian Heimes2008-01-141-1/+1
| | | | | | sys.float_info to a structseq. It's readonly and help(sys.float_info) explains the attributes nicely.
* Applied patch #1816: sys.flags patchChristian Heimes2008-01-141-0/+12
|
* Feature #1534Christian Heimes2007-12-011-0/+2
| | | | | Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API. Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
* current_frames_with_threads(): There's actually no wayTim Peters2006-07-251-3/+4
| | | | | | | | | | | to guess /which/ line the spawned thread is in at the time sys._current_frames() is called: we know it finished enter_g.set(), but can't know whether the instruction counter has advanced to the following leave_g.wait(). The latter is overwhelming most likely, but not guaranteed, and I see that the "x86 Ubuntu dapper (icc) trunk" buildbot found it on the other line once. Changed the test so it passes in either case.
* SF bug 1524317: configure --without-threads fails to buildTim Peters2006-07-191-0/+22
| | | | | | | | | | | | | | | | | | Moved the code for _PyThread_CurrentFrames() up, so it's no longer in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in one). Changed test_sys's test_current_frames() so it passes with or without thread supported compiled in. Note that test_sys fails when Python is compiled without threads, but for an unrelated reason (the old test_exit() fails with an indirect ImportError on the `thread` module). There are also other unrelated compilation failures without threads, in extension modules (like ctypes); at least the core compiles again. Do we really support --without-threads? If so, there are several problems remaining.
* After approval from Anthony, merge the tim-current_framesTim Peters2006-07-101-0/+61
| | | | | | branch into the trunk. This adds a new sys._current_frames() function, which returns a dict mapping thread id to topmost thread stack frame.
* Add test case for #43581.Martin v. Löwis2006-04-031-0/+5
|
* Disable a few other tests, that can't work if Python is compiled withoutWalter Dörwald2005-08-031-1/+2
| | | | Unicode support.
* Whitespace normalization.Tim Peters2005-02-151-2/+2
|
* Test that SystemExits are handled properly by the exit machinery. IMichael W. Hudson2005-02-151-0/+12
| | | | | broke the "raise SystemExit(46)" case when doing new-style exceptions, but I'd much rather have found out here than in test_tempfile (growl).
* New function sys.getcheckinterval(), to complement setcheckinterval().Tim Peters2003-07-061-2/+4
|
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-3/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Reindent the new code properly.Guido van Rossum2003-03-011-22/+22
|
* - New function sys.exc_clear() clears the current exception. This isGuido van Rossum2003-03-011-0/+44
| | | | | | rarely needed, but can sometimes be useful to release objects referenced by the traceback held in sys.exc_info()[2]. (SF patch #693195.) Thanks to Kevin Jacobs!
* Whitespace normalization.Tim Peters2003-02-191-10/+10
|
* Fix SF bug #688424, 64-bit test problemsNeal Norwitz2003-02-181-1/+1
|
* Fix typo.Walter Dörwald2003-02-031-1/+1
|
* Add a new test script that tests various features of the sysWalter Dörwald2003-02-031-0/+211
module. This increases code coverage of Python/sysmodule.c from 68% to 77% (on Linux). The script doesn't exercise the error branch that handles an evil or lost sys.excepthook in Python/pythonrun.c::PyErr_PrintEx(). Also this script might not work on Jython in its current form. From SF patch #662807.