Ezio Melotti
3c76aa6b23
Remove unused variabile "plain" in builtin_exec.
13 years ago
Stefan Krah
07795df683
Issue #15741 : Fix potential NULL dereference. Found by Coverity.
14 years ago
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Benjamin Peterson
8e8fbeae27
don't leak if the __class__ closure is set
14 years ago
Benjamin Peterson
0010256de4
fold into one if statement
14 years ago
Benjamin Peterson
a12d5c62f7
fix formatting
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
Alexander Belopolsky
12338ab10b
Removed 'or long integer' from bin, oct, and hex docstrings.
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
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
Benjamin Peterson
c963731bb6
refactor logic a little when no sep or end is passed
17 years ago
Benjamin Peterson
8bc5b68159
these builtins have to be initialized
17 years ago
Benjamin Peterson
f5b52246ed
ignore the coding cookie in compile(), exec(), and eval() if the source is a string #4626
17 years ago
Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
17 years ago
Mark Dickinson
f02e0aaafd
Issue #1717 : remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
17 years ago
Mark Dickinson
1124e71368
Issue #4707 : round(x, n) now returns an integer when x is an integer.
Previously it returned a float.
17 years ago
Amaury Forgeot d'Arc
f343e01c17
Merged revisions 68560 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68560 | amaury.forgeotdarc | 2009-01-13 00:36:55 +0100 (mar., 13 janv. 2009) | 6 lines
#3720 : Interpreter crashes when an evil iterator removes its own next function.
Now the slot is filled with a function that always raises.
Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
........
17 years ago
Raymond Hettinger
5d1ff00bc0
Mini-optimization: use pack/unpack functions for argument tuples.
17 years ago
Benjamin Peterson
3809026a72
#4826 exec() doesn't take a file object anymore
17 years ago
Georg Brandl
ced51db8cf
#4513 : remove traces of zip() docstring from when it was izip().
17 years ago
Christian Heimes
6a27efa2d3
Issue 3723: Fixed initialization of subinterpreters
The patch fixes several issues with Py_NewInterpreter as well as the demo for multiple subinterpreters.
Most of the patch was written by MvL with help from Benjamin, Amaury and me. Graham Dumpleton has verified that this patch fixes an issue with mod_wsgi.
17 years ago
Martin v. Löwis
04dc25c537
Issue #3187 : Add sys.setfilesystemencoding.
17 years ago
Amaury Forgeot d'Arc
d0db98fcd8
#1688 : On Windows, the input() prompt was not correctly displayed if it
contains non-ascii characters.
Reviewed by Benjamin Peterson.
18 years ago
Georg Brandl
2cabc56296
#3706 : fix error message for wrong exec() argument type. R=Guido.
18 years ago