Christian Heimes
985ecdcfc2
ssue #19183 : Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
12 years ago
Victor Stinner
2384714819
sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size of
the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or
MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
12 years ago
Victor Stinner
bd303c165b
Issue #19512 , #19515 : remove shared identifiers, move identifiers where they
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
12 years ago
Victor Stinner
090543736f
Issue #19512 : add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
12 years ago
Victor Stinner
d67bd45537
Issue #19512 : Add _PySys_GetObjectId() and _PySys_SetObjectId() functions
12 years ago
Victor Stinner
d02fbb8f71
Issue #19512 : sys_displayhook() now uses an identifier for "builtins"
dictionary key and only decodes "\n" string once to write a newline.
So "builtins" and "\n" are only decoded once from UTF-8, at the first call.
12 years ago
Victor Stinner
41bb43a71e
Issue #18408 : Add a new PyFrame_FastToLocalsWithError() function to handle
exceptions when merging fast locals into f_locals of a frame.
PyEval_GetLocals() now raises an exception and return NULL on failure.
12 years ago
Victor Stinner
8fea252a50
Issue #18520 : fix reference leak in _PySys_Init()
12 years ago
Ezio Melotti
4af4d273bd
#18839 : document that sys.exit() will not accept a non-integer numeric value as exit status.
13 years ago
Christian Heimes
ad73a9cf97
Issue #16400 : Add command line option for isolated mode.
-I
Run Python in isolated mode. This also implies -E and -s. In isolated mode
sys.path contains neither the script’s directory nor the user’s
site-packages directory. All PYTHON* environment variables are ignored,
too. Further restrictions may be imposed to prevent the user from
injecting malicious code.
13 years ago
Victor Stinner
580496005d
Issue #18520 : Fix _PySys_Init(), handle PyDict_SetItemString() errors
13 years ago
Victor Stinner
1c8f059019
Issue #18520 : Add a new PyStructSequence_InitType2() function, same than
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
13 years ago
Christian Heimes
60a6067709
Issue #15905 : Fix theoretical buffer overflow in handling of sys.argv[0],
prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
13 years ago
Andrew Kuchling
c61b913078
#13226 : update references from ctypes/DLFCN modules to os module
13 years ago
Antoine Pitrou
f9d0b1256f
Issue #13390 : New function :func:`sys.getallocatedblocks()` returns the number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
13 years ago
Christian Heimes
5c1c831211
RISCOS support has been removed a long time ago. Remove last remains in sys.flags code. #16501 can be closed, too.
13 years ago
Christian Heimes
743e0cd6b5
Issue #16166 : Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
13 years ago
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