Martin Panter
ca56dd4767
Issue #28139 : Fix messed up indentation
...
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
2016-09-17 07:54:55 +00:00
sashk
fd2f85d6e4
Issue #27806 : Fix 32-bit builds on macOS Sierra 10.12 broken by removal of
...
deprecated QuickTime/QuickTime.h header file. Patch by sashk.
2016-09-16 09:08:45 -04:00
Martin Panter
5f75502a2e
Issue #24366 : Fix indentation
...
Backports changes by Victor Stinner, Hirokazu Yamamoto, li4ick and Benjamin
Peterson.
2016-09-15 01:50:53 +00:00
Benjamin Peterson
e4668aade9
fix misleading indentation ( closes #28139 )
2016-09-13 21:48:57 -07:00
Raymond Hettinger
e62a694fee
Issue #26020 : Fix evaluation order for set literals
2016-09-08 15:25:19 -07:00
Eric Snow
bf00bc783f
Issue #15578 : Correctly incref the parent module while importing.
2016-09-07 19:08:02 -07:00
Martin Panter
3d36f0f712
Spelling and grammar fixes in code comments and documentation
2016-07-28 02:37:04 +00:00
Benjamin Peterson
6c4fa70da6
make too many nested blocks be a SyntaxError instead of a SystemError ( closes #27514 )
...
Patch by Ammar Askar.
2016-07-14 22:00:03 -07:00
Martin Panter
b362f75f6e
Issue #25523 : Correct "a" article to "an" article
...
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.
2015-11-02 03:37:02 +00:00
Benjamin Peterson
64c82753de
reduce marshal stack size in debug mode on windows ( closes #27019 )
2016-07-06 23:37:02 -07:00
Serhiy Storchaka
3c9ce74c21
Issue #23908 : os functions, open() and the io.FileIO constructor now reject
...
unicode paths with embedded null character on Windows instead of silently
truncate them.
2016-07-01 23:34:44 +03:00
Serhiy Storchaka
34cb3f026b
Issue #27301 : Fixed incorrect return code for error in compile.c.
2016-06-15 20:06:29 +03:00
Martin Panter
7740c406bc
Fix typo in comment
2016-06-10 08:07:11 +00:00
Martin Panter
b5f487a090
Fix typo in code comment
2016-06-04 04:57:19 +00:00
Martin Panter
b1d867f149
Issue #27076 : Doc, comment and test function name spelling fixes
...
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:28:50 +00:00
Serhiy Storchaka
12cf60c7fa
Issue #26168 : Fixed possible refleaks in failing Py_BuildValue() with the "N"
...
format unit.
2016-05-20 22:31:24 +03:00
Zachary Ware
fd58349556
Issue #26874 : Simplify the divmod docstring.
...
Now it actually matches the prose docs.
2016-04-28 14:38:48 -05:00
Zachary Ware
64f8c7ec4f
Issue #26874 : Make divmod docstring and full doc match
2016-04-28 14:23:48 -05:00
Serhiy Storchaka
9a118f1dc3
Issue #26778 : Fixed "a/an/and" typos in code comment and documentation.
2016-04-17 09:37:36 +03:00
Martin Panter
0bb165ecc1
Issue #4806 : Avoid masking TypeError when *-unpacking a generator
...
Based on patch by Hagen Fürstenau.
2016-01-31 06:30:56 +00:00
Martin Panter
6a8163a928
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
...
This affects documentation and code comments.
2016-04-15 02:14:19 +00:00
Serhiy Storchaka
763a61ca95
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka
bc62af1bbe
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:51:18 +03:00
Serhiy Storchaka
79f657c6e7
Issue #26476 : Fixed compilation error when use PyErr_BadInternalCall() in C++.
...
Patch by Jeroen Demeyer.
2016-03-03 18:16:27 +02:00
Martin Panter
ef85a1ac15
Issue #22836 : Keep exception reports sensible despite errors
2016-02-28 00:18:43 +00:00
Serhiy Storchaka
1c496178d2
Issue #25698 : Importing module if the stack is too deep no longer replaces
...
imported module with the empty one.
2016-02-10 10:28:06 +02:00
Serhiy Storchaka
36ae29c759
Issue #26198 : Fixed error messages for some argument parsing errors.
...
Fixed the documented about buffer overflow error for "es#" and "et#" format
units.
2016-02-08 01:05:48 +02:00
Victor Stinner
7791165fb3
code_richcompare() now uses the constants types
...
Issue #25843 : When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.
Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Senthil Kumaran
0f3a71dab1
Issue24733 - Remove unreachable code in traceback.c
2016-01-04 22:40:39 -08:00
Benjamin Peterson
1f40ece2d7
2016 will be another year of writing copyrighted code
2016-01-01 10:23:45 -06:00
Serhiy Storchaka
2e6c829681
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:41:58 +02:00
Serhiy Storchaka
5951f2300f
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Serhiy Storchaka
6156560e4b
Issue #25678 : Copy buffer objects to null-terminated strings.
...
Avoid buffer overreads when int(), long(), float(), and compile()
are passed buffer objects. Similar code is removed from the
complex() constructor, where it was not reachable.
Patch backported from issue #24802 by Eryk Sun.
2015-11-20 21:56:21 +02:00
Victor Stinner
a87633e596
Issue #25003 : os.urandom() doesn't use getentropy() on Solaris because
...
getentropy() is blocking, whereas os.urandom() should not block. getentropy()
is supported since Solaris 11.3.
2015-10-01 09:57:26 +02:00
Benjamin Peterson
14462d486b
remove tabs from ceval.c ( closes #24895 )
2015-08-19 20:38:39 -07:00
Benjamin Peterson
0287f2f7cb
check return value of PyString_FromStringAndSize for NULL ( closes #24734 )
...
Patch by Pankaj Sharma.
2015-07-27 07:47:21 -07:00
Serhiy Storchaka
1670af6c33
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
2015-06-21 16:26:28 +03:00
Serhiy Storchaka
f0aa88f6e8
Fixed indentation of Python examples in C comments.
2015-06-11 00:06:27 +03:00
Benjamin Peterson
cc06dbfc73
sync opcode prediction code with python 3
2015-06-01 18:24:31 -05:00
Serhiy Storchaka
c7797dc748
Issue #19543 : Emit deprecation warning for known non-text encodings.
...
Backported issues #19619 : encode() and decode() methods and constructors
of str, unicode and bytearray classes now emit deprecation warning for known
non-text encodings when Python is ran with the -3 option.
Backported issues #20404 : io.TextIOWrapper (and hence io.open()) now uses the
internal codec marking system added to emit deprecation warning for known non-text
encodings at stream construction time when Python is ran with the -3 option.
2015-05-31 20:21:00 +03:00
Serhiy Storchaka
5127ed727c
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
...
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:45:12 +03:00
Benjamin Peterson
2c992a0788
backport computed gotos ( #4753 )
2015-05-28 12:45:31 -05:00
Serhiy Storchaka
14e10a19f7
Issue #24102 : Fixed exception type checking in standard error handlers.
2015-05-18 16:08:38 +03:00
Christian Heimes
3ce7873fdd
Issue #23998 : PyImport_ReInitLock() now checks for lock allocation error
2015-04-19 21:08:28 +02:00
Victor Stinner
e9932451ae
Issue #23115 : os.urandom() now releases the GIL when the getentropy() is used
...
(OpenBSD 5.6+).
2015-03-30 11:22:13 +02:00
Serhiy Storchaka
aa64c46ac9
Issue #23781 : Add private helper function _PyErr_ReplaceException() that
...
corresponds _PyErr_ChainExceptions() in Python 3 to help porting patches
from Python 3.
2015-03-30 09:48:42 +03:00
Victor Stinner
e0a0bd6eaa
Issue #23458 : On POSIX, the file descriptor kept open by os.urandom() is now
...
set to non inheritable
2015-02-24 14:30:43 +01:00
Serhiy Storchaka
a2269d074b
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
...
overflows. Added few missed PyErr_NoMemory().
2015-02-16 13:16:07 +02:00
Serhiy Storchaka
e8d750c05b
Issue #23115 : Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7).
2015-02-16 08:05:10 +02:00
Benjamin Peterson
4cc93db9b3
avoid reading unallocated memory when argc == 0 ( closes #22633 )
2015-02-14 15:17:25 -05:00
Benjamin Peterson
dd87637d04
update for copyright for 2015
2014-12-31 18:09:36 -06:00
Benjamin Peterson
27c269a1fe
use getentropy when available (backport of 75ede5bec8db) ( closes #23115 )
2014-12-26 11:09:00 -06:00
Benjamin Peterson
7a6a97352d
pop the loop block even for infinite while loops ( closes #23048 )
2014-12-13 16:06:19 -05:00
Victor Stinner
2b565bb6f3
Issue #18028 : Fix aliasing issue in READ_TIMESTAMP() of ceval.c on x86_64,
...
when Python is configure with --with-tsc. Patch written by Christian Heimes.
2014-12-12 13:19:00 +01:00
Serhiy Storchaka
0f8f784a77
Removed duplicated words in in comments and docs.
2014-12-01 18:16:30 +02:00
Antoine Pitrou
b9a4501179
Issue #21963 : backout issue #1856 patch (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), as it seems
to break some existing code.
2014-11-21 02:04:21 +01:00
Serhiy Storchaka
a86c091a73
Issue #22453 : Fexed reference leaks when format error messages in ceval.c.
...
Warn against the use of leaking macro PyObject_REPR().
2014-11-19 00:11:05 +02:00
Serhiy Storchaka
f9b2aa2efe
Issue #22193 : Fixed integer overflow error in sys.getsizeof().
...
Fixed an error in _PySys_GetSizeOf declaration.
2014-11-15 13:21:01 +02:00
Serhiy Storchaka
fb7c38040e
Fixed compilation error introduced in 3f7519f633ed (issue #22518 ).
2014-10-04 14:51:44 +03:00
Serhiy Storchaka
d524922bdc
Issue #22518 : Fixed integer overflow issues in "backslashreplace" and
...
"xmlcharrefreplace" error handlers.
2014-10-04 14:14:41 +03:00
Serhiy Storchaka
7d96a09aca
Fixed reference leak in the "backslashreplace" error handler.
2014-09-23 19:58:57 +03:00
Benjamin Peterson
57057a6624
PEP 466: backport persistent urandom fd ( closes #21305 )
...
Patch from Alex Gaynor.
2014-08-28 12:30:00 -04:00
Serhiy Storchaka
c95f51a953
Issue #22193 : Added private function _PySys_GetSizeOf() needed to implement
...
some __sizeof__() methods.
2014-08-14 22:20:23 +03:00
Benjamin Peterson
b6f0d0531b
remove casts
2014-08-09 19:39:55 -07:00
Benjamin Peterson
d2903bd682
restore runtime exec test ( #21591 )
2014-08-09 19:39:36 -07:00
Dirkjan Ochtman
9b1d670361
Issue #21591 : Handle exec backwards compatibility in the AST builder.
...
Instead of deferring until runtime. This makes sure we hit the right
conditions in dealing with unqualified exec statements.
Reviewed by Victor Stinner. Test follows in a later commit.
2014-07-29 17:21:39 +02:00
Benjamin Peterson
0fb88f7c51
correct ref counting of default_action ( closes #22017 )
2014-07-20 13:04:11 -07:00
Benjamin Peterson
ee5729dbf9
add missing 'because' ( closes #22008 )
...
Patch from A Kaptur.
2014-07-18 16:25:13 -07:00
Benjamin Peterson
3232384e1e
revert tstate_delete_common, since it's pretty much wrong
2014-06-17 00:34:14 -07:00
Benjamin Peterson
81669697aa
avoid a deadlock with the interpreter head lock and the GIL during finalization
2014-06-16 23:07:49 -07:00
Benjamin Peterson
1c78e6d96f
check if the thread is finalizing after retaking the GIL
2014-06-16 22:59:07 -07:00
Benjamin Peterson
c0bc4eff50
avoid crashes and lockups from daemon threads during interpreter shutdown ( #1856 )
2014-06-16 19:39:18 -07:00
Terry Jan Reedy
9f2dcd227c
Issue #19362 : Tweek len() doc and docstring to expand the indicated range of
...
arguments. Original patch by Gareth Rees.
2014-06-16 03:05:30 -04:00
Serhiy Storchaka
79fa98af9e
Issue #19656 : Running Python with the -3 option now also warns about
...
non-ascii bytes literals.
2014-06-01 22:13:39 +03:00
Antoine Pitrou
ab4a69158b
Issue #21523 : Fix over-pessimistic computation of the stack effect of some opcodes in the compiler.
...
This also fixes a quadratic compilation time issue noticeable when compiling
code with a large number of "and" and "or" operators.
2014-05-23 11:46:03 +02:00
Serhiy Storchaka
98a9722e4a
Issue #20437 : Fixed 43 potential bugs when deleting objects references.
2014-02-09 13:14:04 +02:00
Benjamin Peterson
8363f77795
fix error check
2014-01-16 16:56:22 -05:00
Benjamin Peterson
1aeb8cfcfd
update copyright year
2013-12-31 22:02:22 -06:00
Serhiy Storchaka
15df36bb14
Issue #16404 : Add checks for return value of PyInt_FromLong() in
...
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:09:45 +02:00
Serhiy Storchaka
0585418b0d
Fixed leak in sys.flags initialization.
2013-12-17 14:59:29 +02:00
Mark Dickinson
c2f8c81af0
Issue #19638 : Raise ValueError instead of crashing when converting billion character strings to float.
2013-11-26 16:38:25 +00:00
Christian Heimes
51c4d72d43
Issue #18603 : Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
...
Python executable and not removed by the linker's optimizer.
2013-10-22 10:22:29 +02:00
Georg Brandl
c0edadee84
Closes #15213 : update comment for _PyOS_URandom
2013-10-06 18:43:19 +02:00
Ezio Melotti
08350fb639
#18839 : document that sys.exit() will not accept a non-integer numeric value as exit status.
2013-08-26 14:00:39 +03:00
Serhiy Storchaka
a9885e93ee
Issue #13461 : Fix a crash in the TextIOWrapper.tell method and in the "replace"
...
error handler on 64-bit platforms. Patch by Yogesh Chaudhari.
2013-08-20 20:08:53 +03:00
Antoine Pitrou
f48a67b317
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
2013-08-16 20:44:38 +02:00
Serhiy Storchaka
e822b034e7
Issue #15866 : The xmlcharrefreplace error handler no more produces two XML
...
entities for a non-BMP character on narrow build.
2013-08-06 16:56:26 +03:00
Serhiy Storchaka
fe2e839565
Fix reference leaks introduced by the patch for issue #5308 .
2013-07-11 19:14:07 +03:00
R David Murray
f7c8584545
#18424 : PEP8ify the tense of the sum docstring.
2013-07-10 16:23:15 -04:00
Antoine Pitrou
7e9cec04ab
Issue #18256 : Compilation fix for recent AIX releases. Patch by David Edelsohn.
2013-06-18 22:17:48 +02:00
Antoine Pitrou
022db598ac
Issue #17645 : convert an assert() into a proper exception in _Py_Mangle().
2013-04-06 21:21:04 +02:00
Ezio Melotti
94bf697b01
#17178 : update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
2013-02-15 23:35:14 +02:00
Serhiy Storchaka
34fe1b7a3d
Issue #5308 : Raise ValueError when marshalling too large object (a sequence
...
with size >= 2**31), instead of producing illegal marshal data.
2013-02-13 12:07:43 +02:00
Benjamin Peterson
6b78bffa20
remove unnecessary clearing of list
2013-01-19 14:58:38 -05:00
Benjamin Peterson
1f7df8f207
merge heads
2012-12-31 21:40:42 -06:00
Benjamin Peterson
b25d611f8d
bring Python into 2013
2012-12-31 21:37:21 -06:00
Mark Dickinson
9fade768c8
Issue #13863 : fix incorrect .pyc timestamps on Windows / NTFS (apparently due to buggy fstat)
2012-12-24 16:33:18 +00:00
Trent Nelson
25a48610a8
Make PyAST_obj2mod C89 compliant. (Follow-up commit from asdl_c.py.)
2012-12-13 07:22:16 +00:00
Jesus Cea
7ddd9c21da
Closes #16588 : Silence unused-but-set warnings in Python/thread_pthread.h
2012-12-05 14:41:11 +01:00
Mark Dickinson
b1cc6aa2df
Issue #9011 : AST creation no longer modifies CST for negated numeric literals.
2012-11-25 17:11:33 +00:00