Brett Cannon
3adc7b75a5
Issue #15242 : Have PyImport_GetMagicTag() return a const char *
defined in sysmodule.c instead of straight out of a Unicode object.
Thanks to Amaury Forgeot d'Arc for noticing the bug and Eric Snow for
writing the patch.
14 years ago
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
14 years ago
Barry Warsaw
409da157d7
Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
14 years ago
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
14 years ago
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
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.
14 years ago
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
14 years ago
Petri Lehtinen
fe6f9d0edc
Document absoluteness of sys.executable
Closes #13402 .
14 years ago
Petri Lehtinen
9713321f46
Document absoluteness of sys.executable
Closes #13402 .
14 years ago
Benjamin Peterson
ce79852077
use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
14 years ago
Victor Stinner
f4afa43fd4
Issue #13226 : Update sys.setdlopenflags() docstring
Refer to os.RTLD_xxx constants instead of ctypes and DLFCN modules.
14 years ago
Martin v. Löwis
1c67dd9b15
Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Victor Stinner
639418812f
Use the new Py_ARRAY_LENGTH macro
14 years ago
Ezio Melotti
48a2f8fd97
#13054 : sys.maxunicode is now always 0x10FFFF.
14 years ago
Raymond Hettinger
19b851d11b
sys.checkinterval() now refreshes the current countdown ticker.
15 years ago
Victor Stinner
d5c355ccc7
Issue #11223 : Replace threading._info() by sys.thread_info
15 years ago
Jesus Cea
1d4ae84e53
Up-port changeset 5cf8f6da8743 ( closes #11890 )
15 years ago
Victor Stinner
27181ac778
sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
called yet: detect bootstrap (startup) issues earlier.
15 years ago
Éric Araujo
be3bd57ba2
Remove traces of division_warning left over from Python 2 ( #10998 )
15 years ago
Benjamin Peterson
7859d4098c
remove this dead subversion code
15 years ago
Martin v. Löwis
ce5d0e22fc
Set subversion version identification to empty strings if this is not a subversion
checkout (but a mercurial one). Closes #11579 . Closes #11421 .
Patch by Senthil Kumaran.
15 years ago
Ezio Melotti
24b07bcba3
#11515 : fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Georg Brandl
3a5508e2c0
Port build identification from default branch.
15 years ago
Georg Brandl
776e586114
Remove sys.subversion and svn build identification leftovers.
15 years ago
Georg Brandl
1ca2e7965c
Commit the hg build identification patch from the pymigr repo.
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Raymond Hettinger
90e8f8cd9b
Fix count of flag fields. Being one short caused the 'quiet' option not to print.
15 years ago
Georg Brandl
8aa7e999b5
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833 .
15 years ago
Victor Stinner
13d49ee7d6
Issue #10601 : sys.displayhook uses 'backslashreplace' error handler on
UnicodeEncodeError.
15 years ago
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
15 years ago
Georg Brandl
71c23d4473
Include structseq.h in Python.h, and remove now-redundant includes in individual sources.
15 years ago
Victor Stinner
07e4f1565b
sys_update_path(): update sys.path even if argc==0
15 years ago
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
15 years ago
Antoine Pitrou
9583cac633
Issue #10089 : Add support for arbitrary -X options on the command-line.
They can be retrieved through a new attribute `sys._xoptions`.
15 years ago
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
15 years ago
Barry Warsaw
8cf4eae522
First (uncontroversial) part of issue 9807.
* 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.
15 years ago
Victor Stinner
015f4d87ab
_Py_wrealpath() requires the size of the output buffer
15 years ago
Victor Stinner
4e31443c4d
Create fileutils.c/.h
* _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
15 years ago
Victor Stinner
7ae7c87b05
_wrealpath() and _Py_wreadlink() support surrogates (PEP 383)
Use _Py_wchar2char() to support surrogate characters in the input path.
15 years ago
Victor Stinner
c08ec9fdba
Create a subfunction for PySys_SetArgvEx()
Create sys_update_path() static function. Do nothing if argc==0.
15 years ago
Victor Stinner
5b519e0201
Issue #9632 : Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
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.
16 years ago
Antoine Pitrou
fce7fd6426
Issue #9549 : sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
16 years ago
Nick Coghlan
d26c18adcc
Issue #8202 : Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
16 years ago
Victor Stinner
79766636b6
Issue #9599 : Create PySys_FormatStdout() and PySys_FormatStderr()
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
sys.stderr.
16 years ago
Matthias Klose
d885e95be4
- sysmodule.c (get_hash_info): Define as static function.
16 years ago
Victor Stinner
a01c6b3c9e
Merged revisions 81841 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81841 | victor.stinner | 2010-06-08 22:46:00 +0200 (mar., 08 juin 2010) | 6 lines
sys_pyfile_write() does nothing if file is NULL
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.
........
16 years ago
Victor Stinner
ecccc4f9b8
sys_pyfile_write() does nothing if file is NULL
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.
16 years ago
Victor Stinner
7eeb5b5e50
Issue #8848 : U / U# formats of Py_BuildValue() are just alias to s / s#
16 years ago