summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
AgeCommit message (Collapse)AuthorLines
2011-01-05Fix count of flag fields. Being one short caused the 'quiet' option not to ↵Raymond Hettinger-2/+2
print.
2010-12-28Add sys.flags.quiet attribute for the new -q option, as noted missing by ↵Georg Brandl-1/+3
Eric in #1772833.
2010-12-04Issue #10601: sys.displayhook uses 'backslashreplace' error handler onVictor Stinner-2/+76
UnicodeEncodeError.
2010-11-30Remove redundant includes of headers that are already included by Python.h.Georg Brandl-1/+0
2010-11-30Include structseq.h in Python.h, and remove now-redundant includes in ↵Georg Brandl-1/+0
individual sources.
2010-10-25sys_update_path(): update sys.path even if argc==0Victor Stinner-2/+0
2010-10-23follow up to #9778: define and use an unsigned hash typeBenjamin Peterson-1/+1
2010-10-21Issue #10089: Add support for arbitrary -X options on the command-line.Antoine Pitrou-0/+60
They can be retrieved through a new attribute `sys._xoptions`.
2010-10-17make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson-1/+1
2010-10-16First (uncontroversial) part of issue 9807.Barry Warsaw-0/+4
* Expose the build flags to Python as sys.abiflags * Shared library libpythonX.Y<abiflags>.so * python-config --abiflags * Make two distutils tests that failed with --enable-shared (even before this patch) succeed. * Fix a few small style issues.
2010-10-07_Py_wrealpath() requires the size of the output bufferVictor Stinner-1/+1
2010-10-07Create fileutils.c/.hVictor Stinner-28/+1
* _Py_fopen() and _Py_stat() come from Python/import.c * (_Py)_wrealpath() comes from Python/sysmodule.c * _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c * (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
2010-10-07_wrealpath() and _Py_wreadlink() support surrogates (PEP 383)Victor Stinner-3/+4
Use _Py_wchar2char() to support surrogate characters in the input path.
2010-10-06Create a subfunction for PySys_SetArgvEx()Victor Stinner-78/+94
Create sys_update_path() static function. Do nothing if argc==0.
2010-09-10Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODINGVictor Stinner-21/+0
environment variable to set the filesystem encoding at Python startup. sys.setfilesystemencoding() creates inconsistencies because it is unable to reencode all filenames in all objects.
2010-09-01Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()Antoine Pitrou-20/+0
are now removed, since their effect was inexistent in 3.x (the default encoding is hardcoded to utf-8 and cannot be changed).
2010-08-17Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the ↵Nick Coghlan-3/+7
module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
2010-08-16Issue #9599: Create PySys_FormatStdout() and PySys_FormatStderr()Victor Stinner-15/+67
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and sys.stderr.
2010-07-06- sysmodule.c (get_hash_info): Define as static function.Matthias Klose-1/+1
2010-06-08sys_pyfile_write() does nothing if file is NULLVictor Stinner-0/+3
mywrite() falls back to the C file object if sys_pyfile_write() returns an error. This patch fixes a segfault is Py_FatalError() is called in an early stage of Python initialization.
2010-06-07Issue #8848: U / U# formats of Py_BuildValue() are just alias to s / s#Victor Stinner-1/+1
2010-05-23Issue #8188: Introduce a new scheme for computing hashes of numbersMark Dickinson-0/+56
(instances of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it easy to maintain the invariant that hash(x) == hash(y) whenever x and y have equal value.
2010-05-21Merged revisions 81398 via svnmerge fromAntoine Pitrou-2/+8
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81398 | antoine.pitrou | 2010-05-21 19:12:38 +0200 (ven., 21 mai 2010) | 6 lines Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders of the interpreter to set sys.argv without also modifying sys.path. This helps fix `CVE-2008-5983 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. ........
2010-05-19Issue #8589: Decode PYTHONWARNINGS environment variable with the file systemVictor Stinner-8/+13
encoding and surrogateespace error handler instead of the locale encoding to be consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-947/+947
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
2010-04-23Issue #8124: PySys_WriteStdout() and PySys_WriteStderr() don't executeVictor Stinner-2/+45
indirectly Python signal handlers anymore because mywrite() ignores exceptions (KeyboardInterrupt).
2010-03-03Merged revisions 78620 via svnmerge fromFlorent Xicluna-1/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78620 | florent.xicluna | 2010-03-03 12:49:53 +0100 (mer, 03 mar 2010) | 2 lines Revert a nonexistent docstring typo, r42805. ........
2010-01-27Merged revisions 77763 via svnmerge fromEric Smith-13/+62
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77763 | eric.smith | 2010-01-26 19:28:29 -0500 (Tue, 26 Jan 2010) | 1 line Issue #7766: Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type. ........
2009-11-10Remove obsolete comment.Antoine Pitrou-1/+0
2009-11-10Merge in the new GIL.Antoine Pitrou-2/+62
2009-07-17Merged revisions 73665,73693,73704-73705,73707,73712-73713,73824 via ↵Alexandre Vassalotti-10/+12
svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73665 | alexandre.vassalotti | 2009-06-28 21:01:51 -0400 (Sun, 28 Jun 2009) | 2 lines Update docstrings for sys.getdlopenflags() and sys.setdlopenflags(). ........ r73693 | jesse.noller | 2009-06-29 14:20:34 -0400 (Mon, 29 Jun 2009) | 1 line Bug 5906: add a documentation note for unix daemons vs. multiprocessing daemons ........ r73704 | georg.brandl | 2009-06-30 12:15:43 -0400 (Tue, 30 Jun 2009) | 1 line #6376: fix copy-n-paste oversight. ........ r73705 | georg.brandl | 2009-06-30 12:17:28 -0400 (Tue, 30 Jun 2009) | 1 line #6374: add a bit of explanation about shell=True on Windows. ........ r73707 | georg.brandl | 2009-06-30 12:35:11 -0400 (Tue, 30 Jun 2009) | 1 line #6371: fix link targets. ........ r73712 | ezio.melotti | 2009-06-30 18:51:06 -0400 (Tue, 30 Jun 2009) | 1 line Fixed defaultTestCase -> defaultTestResult ........ r73713 | ezio.melotti | 2009-06-30 18:56:16 -0400 (Tue, 30 Jun 2009) | 1 line Fixed a backslash that was not supposed to be there ........ r73824 | ezio.melotti | 2009-07-03 21:18:08 -0400 (Fri, 03 Jul 2009) | 1 line #6398 typo: versio. -> version. ........
2009-05-25Merged revisions 72907 via svnmerge fromBenjamin Peterson-4/+6
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72907 | benjamin.peterson | 2009-05-24 21:40:21 -0500 (Sun, 24 May 2009) | 1 line handle errors from _PyObject_LookupSpecial when __get__ fails ........
2009-05-23Merged revisions 72871-72872 via svnmerge fromBenjamin Peterson-1/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72871 | benjamin.peterson | 2009-05-23 14:24:37 -0500 (Sat, 23 May 2009) | 1 line support building with subversion 1.7 #6094 ........ r72872 | benjamin.peterson | 2009-05-23 14:31:02 -0500 (Sat, 23 May 2009) | 1 line reorder name ........
2009-05-09Merged revisions 72508 via svnmerge fromBenjamin Peterson-12/+8
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72508 | benjamin.peterson | 2009-05-09 11:36:39 -0500 (Sat, 09 May 2009) | 1 line convert some more special methods to use _PyObject_LookupSpecial ........
2009-04-16Issue #1580: use short float repr where possible.Mark Dickinson-0/+10
- incorporate and adapt David Gay's dtoa and strtod into the Python core - on platforms where we can use Gay's code (almost all!), repr(float) is based on the shortest sequence of decimal digits that rounds correctly. - add sys.float_repr_style attribute to indicate whether we're using Gay's code or not - add autoconf magic to detect and enable SSE2 instructions on x86/gcc - slight change to repr and str: repr switches to exponential notation at 1e16 instead of 1e17, str switches at 1e11 instead of 1e12
2009-03-18Issue #4258: Make it possible to use 30-bit digits for PyLongs:Mark Dickinson-0/+3
- new configure option --enable-big-digits - new structseq sys.int_info giving information about the internal format By default, 30-bit digits are enabled on 64-bit machines but disabled on 32-bit machines.
2009-02-06Merged revisions 69331 via svnmerge fromEric Smith-22/+79
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69331 | eric.smith | 2009-02-05 19:48:26 -0500 (Thu, 05 Feb 2009) | 2 lines Implement issue #4285, convert sys.version_info to a named tuple. Patch by Ross Light. ........
2009-01-12Merged revisions 68540 via svnmerge fromMartin v. Löwis-3/+12
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68540 | martin.v.loewis | 2009-01-12 08:57:11 +0100 (Mo, 12 Jan 2009) | 2 lines Issue #4915: Port sysmodule to Windows CE. ........
2008-10-30Issue 3723: Fixed initialization of subinterpretersChristian Heimes-1/+1
The patch fixes several issues with Py_NewInterpreter as well as the demo for multiple subinterpreters. Most of the patch was written by MvL with help from Benjamin, Amaury and me. Graham Dumpleton has verified that this patch fixes an issue with mod_wsgi.
2008-10-17Benjamin Peterson's patch to fix bug 3661, sys.call_tracing segfaults.Barry Warsaw-1/+1
2008-10-17Apply Martin's patch for bug 3685, Crash while compiling Python 3000 inBarry Warsaw-1/+1
OpenBSD 4.4.
2008-10-03Issue #3187: Add sys.setfilesystemencoding.Martin v. Löwis-0/+19
2008-07-16Merged revisions ↵Georg Brandl-17/+0
64722,64729,64753,64845-64846,64849,64871,64880-64882,64885,64888,64897,64900-64901,64915,64926-64929,64938-64941,64944,64961,64966,64973 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64722 | georg.brandl | 2008-07-05 12:13:36 +0200 (Sat, 05 Jul 2008) | 4 lines #2663: support an *ignore* argument to shutil.copytree(). Patch by Tarek Ziade. This is a new feature, but Barry authorized adding it in the beta period. ........ r64729 | mark.dickinson | 2008-07-05 13:33:52 +0200 (Sat, 05 Jul 2008) | 5 lines Issue 3188: accept float('infinity') as well as float('inf'). This makes the float constructor behave in the same way as specified by various other language standards, including C99, IEEE 754r, and the IBM Decimal standard. ........ r64753 | gregory.p.smith | 2008-07-06 05:35:58 +0200 (Sun, 06 Jul 2008) | 4 lines - Issue #2862: Make int and float freelist management consistent with other freelists. Changes their CompactFreeList apis into ClearFreeList apis and calls them via gc.collect(). ........ r64845 | raymond.hettinger | 2008-07-10 16:03:19 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3301: Bisect functions behaved badly when lo was negative. ........ r64846 | raymond.hettinger | 2008-07-10 16:34:57 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments. ........ r64849 | andrew.kuchling | 2008-07-10 16:43:31 +0200 (Thu, 10 Jul 2008) | 1 line Wording changes ........ r64871 | raymond.hettinger | 2008-07-11 14:00:21 +0200 (Fri, 11 Jul 2008) | 1 line Add cautionary note on the use of PySequence_Fast_ITEMS. ........ r64880 | amaury.forgeotdarc | 2008-07-11 23:28:25 +0200 (Fri, 11 Jul 2008) | 5 lines #3317 in zipfile module, restore the previous names of global variables: some applications relied on them. Also remove duplicated lines. ........ r64881 | amaury.forgeotdarc | 2008-07-11 23:45:06 +0200 (Fri, 11 Jul 2008) | 3 lines #3342: In tracebacks, printed source lines were not indented since r62555. #3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine. ........ r64882 | josiah.carlson | 2008-07-12 00:17:14 +0200 (Sat, 12 Jul 2008) | 2 lines Fix for the AttributeError in test_asynchat. ........ r64885 | josiah.carlson | 2008-07-12 01:26:59 +0200 (Sat, 12 Jul 2008) | 2 lines Fixed test for asyncore. ........ r64888 | matthias.klose | 2008-07-12 09:51:48 +0200 (Sat, 12 Jul 2008) | 2 lines - Fix bashisms in Tools/faqwiz/move-faqwiz.sh ........ r64897 | benjamin.peterson | 2008-07-12 22:16:19 +0200 (Sat, 12 Jul 2008) | 1 line fix various doc typos #3320 ........ r64900 | alexandre.vassalotti | 2008-07-13 00:06:53 +0200 (Sun, 13 Jul 2008) | 2 lines Fixed typo. ........ r64901 | benjamin.peterson | 2008-07-13 01:41:19 +0200 (Sun, 13 Jul 2008) | 1 line #1778443 robotparser fixes from Aristotelis Mikropoulos ........ r64915 | nick.coghlan | 2008-07-13 16:52:36 +0200 (Sun, 13 Jul 2008) | 1 line Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute) ........ r64926 | martin.v.loewis | 2008-07-13 22:31:49 +0200 (Sun, 13 Jul 2008) | 2 lines Add turtle into the module index. ........ r64927 | alexandre.vassalotti | 2008-07-13 22:42:44 +0200 (Sun, 13 Jul 2008) | 3 lines Issue #3274: Use a less common identifier for the temporary variable in Py_CLEAR(). ........ r64928 | andrew.kuchling | 2008-07-13 23:43:25 +0200 (Sun, 13 Jul 2008) | 1 line Re-word ........ r64929 | andrew.kuchling | 2008-07-13 23:43:52 +0200 (Sun, 13 Jul 2008) | 1 line Add various items; move ctypes items into a subsection of their own ........ r64938 | andrew.kuchling | 2008-07-14 02:35:32 +0200 (Mon, 14 Jul 2008) | 1 line Typo fixes ........ r64939 | andrew.kuchling | 2008-07-14 02:40:55 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64940 | andrew.kuchling | 2008-07-14 03:18:16 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64941 | andrew.kuchling | 2008-07-14 03:18:31 +0200 (Mon, 14 Jul 2008) | 1 line Expand the multiprocessing section ........ r64944 | gregory.p.smith | 2008-07-14 08:06:48 +0200 (Mon, 14 Jul 2008) | 7 lines Fix posix.fork1() / os.fork1() to only call PyOS_AfterFork() in the child process rather than both parent and child. Does anyone actually use fork1()? It appears to be a Solaris thing but if Python is built with pthreads on Solaris, fork1() and fork() should be the same. ........ r64961 | jesse.noller | 2008-07-15 15:47:33 +0200 (Tue, 15 Jul 2008) | 1 line multiprocessing/connection.py patch to remove fqdn oddness for issue 3270 ........ r64966 | nick.coghlan | 2008-07-15 17:40:22 +0200 (Tue, 15 Jul 2008) | 1 line Add missing NEWS entry for r64962 ........ r64973 | jesse.noller | 2008-07-15 20:29:18 +0200 (Tue, 15 Jul 2008) | 1 line Revert 3270 patch: self._address is in pretty widespread use, need to revisit ........
2008-07-15Make these files to compile again under Windows.Thomas Heller-1/+2
2008-07-15correct docstringBenjamin Peterson-1/+1
2008-07-14Merged revisions 64842,64853,64856,64945 via svnmerge fromRobert Schuppenies-16/+47
svn+ssh://pythondev@svn.python.org/python/trunk ........ r64842 | robert.schuppenies | 2008-07-10 15:43:26 +0200 (Thu, 10 Jul 2008) | 2 lines Fixed Issue3122 and extended sys.getsizeof tests for built-in types. ........ r64853 | robert.schuppenies | 2008-07-10 17:24:04 +0200 (Thu, 10 Jul 2008) | 3 lines Added additional __sizeof__ implementations and addressed comments made in Issue3122. ........ r64856 | robert.schuppenies | 2008-07-10 19:13:55 +0200 (Thu, 10 Jul 2008) | 3 lines Added garbage collector overhead and optional default return value to sys.getsizeof. ........ r64945 | robert.schuppenies | 2008-07-14 10:42:18 +0200 (Mon, 14 Jul 2008) | 2 lines Fixed test failure on Win64 machines. ........
2008-06-11Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis-1/+15
2008-06-06Fix sys.flags sequence behavior and add a test case.Georg Brandl-2/+2
2008-06-04Merged revisions 63856-63857,63859-63860 via svnmerge fromMartin v. Löwis-0/+35
svn+ssh://pythondev@svn.python.org/python/trunk ........ r63856 | robert.schuppenies | 2008-06-01 18:16:17 +0200 (So, 01 Jun 2008) | 2 lines Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes. ........ r63859 | georg.brandl | 2008-06-01 18:42:16 +0200 (So, 01 Jun 2008) | 2 lines Some style nits. Also clarify in the docstrings what __sizeof__ does. ........ r63860 | georg.brandl | 2008-06-01 19:05:56 +0200 (So, 01 Jun 2008) | 2 lines Fix test_descrtut. ........
2008-06-04Remove meaning of -ttt, but still accept -t option on cmdline for compatibility.Georg Brandl-4/+2