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
Raymond Hettinger
39540a0226
Improve docstring for divmod()
15 years ago
Victor Stinner
ba8b3a2ca7
Close #12501 : Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
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
Antoine Pitrou
c7c96a90bc
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
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago
Mark Dickinson
e02c9d22f6
Merged revisions 80758 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80758 | mark.dickinson | 2010-05-04 17:18:25 +0100 (Tue, 04 May 2010) | 9 lines
Issue #1533 : fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method. Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.
Patch by Alexander Belopolsky (with minor modifications).
........
16 years ago
Mark Dickinson
ef9b4abfea
Fix trailing whitespace.
16 years ago
Mark Dickinson
a8d2668818
Issue #1533 : fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method. Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.
Patch by Alexander Belopolsky (with minor modifications).
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
Benjamin Peterson
011e9f1726
Merged revisions 76774 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
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
5f429e0227
account for PyObject_IsInstance's new ability to fail
16 years ago
Mark Dickinson
3dc254181a
Issue #6985 : number of range() items should be constrained to lie
in a Py_ssize_t, not an int.
16 years ago
Mark Dickinson
bce783757f
round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this.
16 years ago
Mark Dickinson
bd15a06fd3
Issue #7117 , continued: Change round implementation to use the correctly-rounded
string <-> float conversions; this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
16 years ago