Commit Graph

421 Commits

Author SHA1 Message Date
Florent Xicluna aa6c1d240f Issue #13575: there is only one class type. 2011-12-12 18:54:29 +01:00
Antoine Pitrou 39a73a4cfa 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).
2011-11-28 19:09:45 +01:00
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).
2011-11-28 19:08:36 +01:00
Antoine Pitrou 5604ef3e36 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.
2011-11-26 22:02:29 +01:00
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.
2011-11-26 21:59:36 +01:00
Victor Stinner e251d6d69d print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize() 2011-11-20 19:20:00 +01:00
Antoine Pitrou f34a0cdc6c Issue #10227: Add an allocation cache for a single slice object.
Patch by Stefan Behnel.
2011-11-18 20:14:34 +01:00
Victor Stinner 3a50e7056e Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
2011-10-18 21:21:00 +02:00
Martin v. Löwis 1c67dd9b15 Port SetAttrString/HasAttrString to SetAttrId/GetAttrId. 2011-10-14 15:16:45 +02:00
Martin v. Löwis bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
Martin v. Löwis 1ee1b6fe0d Use identifier API for PyObject_GetAttrString. 2011-10-10 18:11:30 +02:00
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.
2011-10-09 10:38:36 +02:00
Barry Warsaw a80b14cc5f - Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
2011-09-20 14:58:01 -04:00
Barry Warsaw 916048d780 - Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
2011-09-20 14:45:44 -04:00
Victor Stinner d64e8a75e5 Issue #9642: Fix filesystem encoding initialization: use the ANSI code page on
Windows if the mbcs codec is not available, and fail with a fatal error if we
cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
instead of using UTF-8.
2011-07-04 13:48:30 +02:00
Victor Stinner 13b21bd749 print_exception(): handle correctly PyObject_GetAttrString() failure
Bug found by the Clang Static Analyzer.
2011-05-26 14:25:13 +02:00
Georg Brandl 1a4de20d95 Merge #6498 fix from 3.2. 2011-05-15 08:49:38 +02:00
Georg Brandl 318e62153b Merge #6498 fix from 3.1. 2011-05-15 08:49:29 +02:00
Georg Brandl 0b2489e986 Closes #6498: fix several misspellings of "SystemExit" as "SystemError". 2011-05-15 08:49:12 +02:00
Victor Stinner 7bba62fd68 faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True
 * Py_FatalError() dumps all threads, instead of only the current thread

Dump only the current thread is not reliable. In some cases, Python is unable
to retrieve the state of the current thread and so is unable to dump the
traceback. faulthandler keeps a reference to the interpreter and so is always
able to dump the traceback of all threads.
2011-05-07 12:43:00 +02:00
Antoine Pitrou fc20b0c65c 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.
2011-05-04 20:04:29 +02:00
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.
2011-05-04 20:02:30 +02:00
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.
2011-04-27 00:24:21 +02:00
Victor Stinner 793b531756 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.
2011-04-27 00:24:21 +02:00
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.
2011-04-27 00:20:27 +02:00
Victor Stinner c40a350db0 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.
2011-04-27 00:20:27 +02:00
Victor Stinner 7f2fee3640 Issue #10785: Store the filename as Unicode in the Python parser. 2011-04-05 00:39:01 +02:00
Victor Stinner d727e23243 Issue #11393: The fault handler handles also SIGABRT 2011-04-01 12:13:55 +02:00
Victor Stinner 024e37adcc Issue #11393: Add the new faulthandler module 2011-03-31 01:31:06 +02:00
Victor Stinner 9c4efe571d Fix #11586: typo in initfsencoding()
Patch written by Ray Allen.
2011-03-20 23:23:22 +01:00
Victor Stinner 4ca2809b5c Fix #11586: typo in initfsencoding()
Patch written by Ray Allen.
2011-03-20 23:09:03 +01:00
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').
........
2011-02-23 12:10:23 +00:00
Victor Stinner c0f1a1afae 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').
2011-02-23 12:07:37 +00:00
Victor Stinner 0fcab4a3ed Issue #9566: use Py_ssize_t instead of int 2011-01-04 12:59:15 +00:00
Georg Brandl 8aa7e999b5 Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833. 2010-12-28 18:30:18 +00:00
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. 2010-12-04 10:26:46 +00:00
Martin v. Löwis 4d0d471a80 Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
Georg Brandl e5b99f0fb3 Remove redundant includes of headers that are already included by Python.h. 2010-11-30 09:41:01 +00:00
Antoine Pitrou 5a96b5241f Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
2010-11-20 19:50:57 +00:00
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.
2010-11-10 13:55:25 +00:00
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.
........
2010-10-30 15:43:30 +00:00
Hirokazu Yamamoto daf83acf00 Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah. 2010-10-30 15:08:15 +00:00
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)
........
2010-10-29 04:02:30 +00:00
Benjamin Peterson a95e977e41 decrement offset when it points to a newline (#10186 followup) 2010-10-29 03:28:14 +00:00
Benjamin Peterson d4519c14ca tighten loop 2010-10-24 03:41:46 +00:00
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
........
2010-10-24 02:57:31 +00:00
Benjamin Peterson 503d6c5ae9 remove broken code accounting an offset the size of the line #10186 2010-10-24 02:52:05 +00:00
Victor Stinner 3aa6cea861 Issue #10077: Fix logging of site module errors at startup. 2010-10-23 08:50:36 +00:00
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).
........
2010-10-19 01:22:07 +00:00
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.
2010-10-19 00:05:51 +00:00