Antoine Pitrou
01cca5e451
Issue #15020 : The program name used to search for Python's path is now "python3" under Unix, not "python".
14 years ago
Benjamin Peterson
80d50428ce
fix parse_syntax_error to clean up its resources
14 years ago
Antoine Pitrou
86838b02f0
Fix test failure in test_cmd_line by initializing the hash secret at the earliest point.
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
Antoine Pitrou
2fabface50
Fix a memory leak when initializing the standard I/O streams.
14 years ago
Antoine Pitrou
11942a58a1
Issue #7111 : Python can now be run without a stdin, stdout or stderr stream.
It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
14 years ago
Antoine Pitrou
d7c8fbf89e
Issue #13444 : When stdout has been closed explicitly, we should not attempt to flush it at shutdown and print an error.
This also adds a test for issue #5319 , whose resolution introduced the issue.
14 years ago
Barry Warsaw
916048d780
- Issue #13021 : Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
14 years ago
Georg Brandl
0b2489e986
Closes #6498 : fix several misspellings of "SystemExit" as "SystemError".
15 years ago
Antoine Pitrou
0d5e52d346
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
15 years ago
Victor Stinner
3cbf14bfb1
Issue #10914 : Initialize correctly the filesystem codec when creating a new
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
Add fscodec_initialized attribute to the PyInterpreterState structure.
15 years ago
Victor Stinner
1188935af9
Issue #10914 : Py_NewInterpreter() uses PyErr_PrintEx(0)
... instead of PyErr_Print() because we don't need to set sys attributes,
the sys module is destroyed just after printing the error.
15 years ago
Victor Stinner
9c4efe571d
Fix #11586 : typo in initfsencoding()
Patch written by Ray Allen.
15 years ago
Victor Stinner
02bfdb3f79
Merged revisions 88530 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88530 | victor.stinner | 2011-02-23 13:07:37 +0100 (mer., 23 févr. 2011) | 4 lines
Issue #11272 : Fix input() and sys.stdin for Windows newline
On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses
universal newline (replace '\r\n' by '\n').
........
15 years ago
Victor Stinner
0fcab4a3ed
Issue #9566 : use Py_ssize_t instead of int
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
Georg Brandl
8334fd9285
Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
15 years ago
Antoine Pitrou
5a96b5241f
Issue #10255 : Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
15 years ago
Antoine Pitrou
cf9f98034a
Issue #10372 : Import the warnings module only after the IO library is
initialized, so as to avoid bootstrap issues with the '-W' option.
15 years ago
Hirokazu Yamamoto
3d89751c7a
Merged revisions 85980 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85980 | hirokazu.yamamoto | 2010-10-31 00:08:15 +0900 | 1 line
Issue #10157 : Fixed refleaks in pythonrun.c. Patch by Stefan Krah.
........
15 years ago
Hirokazu Yamamoto
daf83acf00
Issue #10157 : Fixed refleaks in pythonrun.c. Patch by Stefan Krah.
15 years ago
Benjamin Peterson
c8850d0771
Merged revisions 85817,85904 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85817 | benjamin.peterson | 2010-10-23 22:41:46 -0500 (Sat, 23 Oct 2010) | 1 line
tighten loop
........
r85904 | benjamin.peterson | 2010-10-28 22:28:14 -0500 (Thu, 28 Oct 2010) | 1 line
decrement offset when it points to a newline (#10186 followup)
........
15 years ago
Benjamin Peterson
a95e977e41
decrement offset when it points to a newline ( #10186 followup)
15 years ago
Benjamin Peterson
d4519c14ca
tighten loop
15 years ago
Benjamin Peterson
9831611865
Merged revisions 85814 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line
remove broken code accounting an offset the size of the line #10186
........
15 years ago
Benjamin Peterson
503d6c5ae9
remove broken code accounting an offset the size of the line #10186
15 years ago
Victor Stinner
3aa6cea861
Issue #10077 : Fix logging of site module errors at startup.
15 years ago
Victor Stinner
15244f7b12
Recorded merge of revisions 85569-85570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
........
r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
........
15 years ago
Victor Stinner
e474309bb7
initfsencoding(): get_codeset() failure is now a fatal error
Don't fallback to utf-8 anymore to avoid mojibake. I never got any error from
his function.
15 years ago
Victor Stinner
49d3f2514b
_PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encoding
* Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode():
the filename becomes a Unicode object instead of byte string
* Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode():
the filename becomes a Unicode object instead of byte string
15 years ago
Victor Stinner
2f2ed1f36c
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
15 years ago
Victor Stinner
4c7c8c3023
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
15 years ago
Victor Stinner
f3170ccef8
Use locale encoding if Py_FileSystemDefaultEncoding is not set
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if
Py_FileSystemDefaultEncoding is NULL
* redecode_filenames() functions and _Py_code_object_list (issue #9630 )
are no more needed: remove them
15 years ago
Victor Stinner
6a4aff10f0
redecode_filename(): don't need to initialize variables
15 years ago
Victor Stinner
8f6b6b0cc3
Issue #9992 : Remove PYTHONFSENCODING environment variable.
15 years ago
Victor Stinner
c39211f51e
Issue #9630 : Redecode filenames when setting the filesystem encoding
Redecode the filenames of:
- all modules: __file__ and __path__ attributes
- all code objects: co_filename attribute
- sys.path
- sys.meta_path
- sys.executable
- sys.path_importer_cache (keys)
Keep weak references to all code objects until initfsencoding() is called, to
be able to redecode co_filename attribute of all code objects.
15 years ago
Antoine Pitrou
b0b384b7c0
Issue #9901 : Destroying the GIL in Py_Finalize() can fail if some other
threads are still running. Instead, reinitialize the GIL on a second
call to Py_Initialize().
15 years ago
Antoine Pitrou
1df1536fb9
Issue #9828 : Destroy the GIL in Py_Finalize(), so that it gets properly
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
16 years ago
Victor Stinner
94908bbc15
Issue #8622 : Add PYTHONFSENCODING environment variable to override the
filesystem encoding.
initfsencoding() displays also a better error message if get_codeset() failed.
16 years ago
Victor Stinner
6961bd690e
Issue #8063 : Call _PyGILState_Init() earlier in Py_InitializeEx().
16 years ago
Antoine Pitrou
696e03553b
Issue #477863 : Print a warning at shutdown if gc.garbage is not empty.
16 years ago
Antoine Pitrou
b61d5c9758
Merged revisions 83854 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83854 | antoine.pitrou | 2010-08-08 22:46:42 +0200 (dim., 08 août 2010) | 4 lines
Issue #5319 : Print an error if flushing stdout fails at interpreter
shutdown.
........
16 years ago
Antoine Pitrou
bddc9fe22b
Issue #5319 : Print an error if flushing stdout fails at interpreter
shutdown.
16 years ago
Alexander Belopolsky
6fc4ade2bb
Issue #9079 : Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C API
exposed in Python.h. This function is similar to POSIX
gettimeofday(struct timeval *tp), but available on platforms without
gettimeofday().
16 years ago
Victor Stinner
25bb0fdb67
Merged revisions 82059,82061 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82059 | victor.stinner | 2010-06-18 01:08:50 +0200 (ven., 18 juin 2010) | 5 lines
Issue #6543 : Write the traceback in the terminal encoding instead of utf-8.
Fix the encoding of the modules filename.
Reindent also traceback.h, just because I hate tabs :-)
........
r82061 | victor.stinner | 2010-06-18 01:17:37 +0200 (ven., 18 juin 2010) | 2 lines
Issue #6543 : Mention the author of the patch, Amaury Forgeot d'Arc
........
16 years ago
Victor Stinner
0fe25a445d
Issue #6543 : Write the traceback in the terminal encoding instead of utf-8.
Fix the encoding of the modules filename.
Reindent also traceback.h, just because I hate tabs :-)
16 years ago
Victor Stinner
7f84ab5952
Issue #8965 : initfsencoding() doesn't change the encoding on Mac OS X
File system encoding have to be hardcoded to "utf-8" on Mac OS X. r81190
introduced a regression: the encoding was changed depending on the locale.
16 years ago
Victor Stinner
93362d4e6b
Merged revisions 81844 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81844 | victor.stinner | 2010-06-08 23:00:13 +0200 (mar., 08 juin 2010) | 6 lines
Py_FatalError(): don't sys sys.last_xxx variables
Call PyErr_PrintEx(0) instead of PyErr_Print() to avoid a crash if
Py_FatalError() is called in an early stage of Python initialization (if PySys
is not yet initialized).
........
16 years ago