Benjamin Peterson
0010256de4
fold into one if statement
14 years ago
Benjamin Peterson
a12d5c62f7
fix formatting
14 years ago
Georg Brandl
bc3b682923
Closes #13761 : add a "flush" keyword argument to print().
14 years ago
Victor Stinner
63ab875cfe
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
14 years ago
Philip Jenvey
50add04836
quote the type name for improved readability
14 years ago
Antoine Pitrou
0d776b1ce8
Issue #13342 : input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
14 years ago
Florent Xicluna
4d46c2a722
Remove unused variable.
14 years ago
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
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
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
Benjamin Peterson
ea281a54f3
include header with PyAST_Validate
15 years ago
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
15 years ago
Benjamin Peterson
405f32c14c
plug refleak
15 years ago
Benjamin Peterson
4f921c2e06
bytes -> bytearray
15 years ago
Benjamin Peterson
ce071ca4e7
bytes should be verboten in sum() ( fixes #12654 )
15 years ago
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
Add a new HAVE_MBCS define.
15 years ago
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.
15 years ago
Alexander Belopolsky
12338ab10b
Removed 'or long integer' from bin, oct, and hex docstrings.
15 years ago
Victor Stinner
fe93faf98c
Issue #3080 : Add PyImport_ImportModuleLevelObject() function
Use it for the builtin __import__ function.
15 years ago
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
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
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').
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
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
e71362d3de
Issue #10518 : Bring back the callable() builtin.
Approved by Guido (BDFL) and Georg (RM).
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
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
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
Brett Cannon
5305a998d5
Since __import__ is not designed for general use, have its docstring point
people towards importlib.import_module().
Closes issue #7397 .
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
Benjamin Peterson
17689991e6
only catch AttributeError in hasattr() #9666
16 years ago
Victor Stinner
306f0100f3
Issue #6697 : Fix a crash if sys.stdin or sys.stdout encoding contain a surrogate
This is *very* unlikely :-)
16 years ago
Victor Stinner
b744ba1d14
Issue #8610 : Load file system codec at startup, and display a fatal error on
failure. Set the file system encoding to utf-8 (instead of None) if getting
the locale encoding failed, or if nl_langinfo(CODESET) function is missing.
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
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.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
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.
........
16 years ago
Victor Stinner
d8805b2bb8
Merged revisions 79393 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r79393 | victor.stinner | 2010-03-25 01:30:28 +0100 (jeu., 25 mars 2010) | 3 lines
Issue #8226 : sys.setfilesystemencoding() raises a LookupError if the encoding
is unknown.
........
16 years ago
Victor Stinner
120c21227a
Issue #8226 : sys.setfilesystemencoding() raises a LookupError if the encoding
is unknown.
16 years ago
Benjamin Peterson
1ca73ede26
Merged revisions 78505-78506 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r78505 | benjamin.peterson | 2010-02-27 11:40:01 -0600 (Sat, 27 Feb 2010) | 1 line
only accept AttributeError as indicating no __prepare__ attribute on a metaclass, allowing lookup errors to propogate
........
r78506 | benjamin.peterson | 2010-02-27 11:41:13 -0600 (Sat, 27 Feb 2010) | 1 line
check PyDict_New() for error
........
16 years ago
Benjamin Peterson
09259e2043
check PyDict_New() for error
16 years ago
Benjamin Peterson
23e018ab98
only accept AttributeError as indicating no __prepare__ attribute on a metaclass, allowing lookup errors to propogate
16 years ago
Mark Dickinson
188aace8d8
Merged revisions 76902 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r76902 | mark.dickinson | 2009-12-19 21:19:35 +0000 (Sat, 19 Dec 2009) | 1 line
Fix typo (reported by terlop on IRC)
........
16 years ago
Mark Dickinson
480e8e38a0
Fix typo (reported by terlop on IRC)
16 years ago
Benjamin Peterson
fc431270ac
Merged revisions 76776 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r76776 | benjamin.peterson | 2009-12-12 19:23:39 -0600 (Sat, 12 Dec 2009) | 25 lines
Merged revisions 76534,76538,76628,76701,76774 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76534 | martin.v.loewis | 2009-11-26 02:42:05 -0600 (Thu, 26 Nov 2009) | 2 lines
Fix typo.
........
r76538 | georg.brandl | 2009-11-26 14:48:25 -0600 (Thu, 26 Nov 2009) | 1 line
#7400 : typo.
........
r76628 | andrew.kuchling | 2009-12-02 08:27:11 -0600 (Wed, 02 Dec 2009) | 1 line
Markup fixes
........
r76701 | andrew.kuchling | 2009-12-07 20:37:05 -0600 (Mon, 07 Dec 2009) | 1 line
Typo fix; grammar fix
........
r76774 | benjamin.peterson | 2009-12-12 18:54:15 -0600 (Sat, 12 Dec 2009) | 1 line
account for PyObject_IsInstance's new ability to fail
........
................
16 years ago
Benjamin Peterson
97dd987ae2
Merged revisions 76534,76538,76628,76701,76774 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76534 | martin.v.loewis | 2009-11-26 02:42:05 -0600 (Thu, 26 Nov 2009) | 2 lines
Fix typo.
........
r76538 | georg.brandl | 2009-11-26 14:48:25 -0600 (Thu, 26 Nov 2009) | 1 line
#7400 : typo.
........
r76628 | andrew.kuchling | 2009-12-02 08:27:11 -0600 (Wed, 02 Dec 2009) | 1 line
Markup fixes
........
r76701 | andrew.kuchling | 2009-12-07 20:37:05 -0600 (Mon, 07 Dec 2009) | 1 line
Typo fix; grammar fix
........
r76774 | benjamin.peterson | 2009-12-12 18:54:15 -0600 (Sat, 12 Dec 2009) | 1 line
account for PyObject_IsInstance's new ability to fail
........
16 years ago
Mark Dickinson
9acadc54e0
Merged revisions 75714 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75714 | mark.dickinson | 2009-10-26 14:18:44 +0000 (Mon, 26 Oct 2009) | 1 line
Warn against replacing PyNumber_Add with PyNumber_InPlaceAdd in sum
........
16 years ago
Skip Montanaro
ba1e0f46ab
Issue 7147 - remove ability to attempt to build Python without complex number support (was broken anyway)
16 years ago