Commit Graph

7993 Commits

Author SHA1 Message Date
Brett Cannon b05cbe61b3 Issue #12837: Silence a Clang compiler warning on OS X.
Now makes CPython build without warnings on OS X under Clang with
-Wno-unused-value -Wno-empty-body -Qunused-arguments
-Wno-deprecated-declarations.

Thanks to David Watson for taking an initial stab at a solution.
2014-01-07 17:01:01 -05:00
Larry Hastings 61272b77b0 Issue #19273: The marker comments Argument Clinic uses have been changed
to improve readability.
2014-01-07 12:41:53 -08:00
Larry Hastings 77561cccb2 Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
format unit.
2014-01-07 12:13:13 -08:00
Larry Hastings 16c5191ab3 Issue #20144: Argument Clinic now supports simple constants as parameter
default values.  inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
2014-01-07 11:53:01 -08:00
Larry Hastings 3f144c2ad7 Issue #20142: Py_buffer variables generated by Argument Clinic are now
initialized with a default value.
2014-01-06 10:34:00 -08:00
Larry Hastings 78cf85c669 Issue #19659: Added documentation for Argument Clinic. 2014-01-04 12:44:57 -08:00
Larry Hastings 3cceb38486 Issue #19976: Argument Clinic METH_NOARGS functions now always
take two parameters.
2014-01-04 11:09:09 -08:00
Stefan Krah 41adc26708 Merge from 3.3. 2014-01-04 13:06:59 +01:00
Stefan Krah 0455c3fd28 Whitespace. 2014-01-04 13:03:48 +01:00
Martin v. Löwis 24e43308b7 * Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
Victor Stinner 5c86733c8a Issue #18294: Fix uint_converter() in zlibmodule.c, fix the "> UINT_MAX" check 2014-01-03 12:26:12 +01:00
Victor Stinner daeffd2c08 audioop: adpcm2lin() and lin2adpcm() now raises a TypeError instead of a
SystemError if the state type is invalid.
2014-01-03 03:26:47 +01:00
Victor Stinner e8794526db threading.RLock._acquire_restore() now raises a TypeError instead of a
SystemError when it is not called with 2 arguments
2014-01-02 12:47:24 +01:00
Victor Stinner f4c68db162 (Merge 3.3) parser: fix usage of Py_BuildValue() to build a parser error
Fix typo: "os" format => "Os"
2014-01-02 11:50:10 +01:00
Victor Stinner 5f8d485982 parser: fix usage of Py_BuildValue() to build a parser error
Fix typo: "os" format => "Os"
2014-01-02 11:49:27 +01:00
R David Murray 0e814634e5 whatsnew for gc.get_stats, plus doc tweaks.
Clarified the "At the moment" wording, and added the get_stats entry in the
module summary that Serhiy noted was missing at the end of issue 16351.

Given that pydoc lists all the function docstrings, I'm not sure that module
summary section is actually needed; but, it is probably better to address that
when the module is converted to use Argument Clinic.  In the meantime we
should keep the list complete.
2013-12-26 15:11:28 -05:00
Christian Heimes 266772abe9 merge 2013-12-21 16:19:57 +01:00
Christian Heimes af01f66817 Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
Antoine Pitrou 712cb734bd Issue #20037: Avoid crashes when doing text I/O late at interpreter shutdown. 2013-12-21 15:51:54 +01:00
Victor Stinner 36e96b8716 (Merge 3.3) Issue #20025: ssl.RAND_bytes() and ssl.RAND_pseudo_bytes() now
raise a ValueError if num is negative (instead of raising a SystemError).
2013-12-19 16:47:25 +01:00
Victor Stinner 1e81a399a2 Issue #20025: ssl.RAND_bytes() and ssl.RAND_pseudo_bytes() now raise a
ValueError if num is negative (instead of raising a SystemError).
2013-12-19 16:47:04 +01:00
Victor Stinner 08263f10f8 (Merge 3.3) Issue #20026: Fix the sqlite module to handle correctly invalid
isolation level (wrong type).
2013-12-19 16:39:00 +01:00
Victor Stinner cb1f74ec40 Issue #20026: Fix the sqlite module to handle correctly invalid isolation level
(wrong type).
2013-12-19 16:38:03 +01:00
Serhiy Storchaka cf58fb5e29 Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields.  Original patch by Vajrasky Kok.
2013-12-19 16:28:04 +02:00
Serhiy Storchaka cac23a50ee Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields.  Original patch by Vajrasky Kok.
2013-12-19 16:27:18 +02:00
Victor Stinner f326665fe7 Fix os.listdir(): _Py_dup() already raises an exception on error, no need to
raise a new exception
2013-12-19 13:24:49 +01:00
Gregory P. Smith b1792d9503 remove trailing spaces. 2013-12-18 11:27:05 -08:00
Serhiy Storchaka 85c2497950 Issue #16404: Add checks for return value of PyLong_FromLong() in
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:12:46 +02:00
Serhiy Storchaka 48d761e2b4 Issue #16404: Add checks for return value of PyLong_FromLong() in
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:11:24 +02:00
Victor Stinner 711e27cd50 tracemalloc: fix usage of strtol(), value can be LONG_MIN or LONG_MAX on ERANGE 2013-12-16 23:06:19 +01:00
Victor Stinner 4d8c29cd57 tracemalloc: only use unsigned types to compute hash
Commit to simplify the backport to python 2.7 and to make the code more
consistent.
2013-12-16 23:05:13 +01:00
Stefan Krah ae01a8bcdf Merge from 3.3. 2013-12-15 20:52:08 +01:00
Stefan Krah 1f1ec12db9 Issue #19986: Avoid an incorrect warning of older gcc versions. 2013-12-15 20:45:08 +01:00
Serhiy Storchaka 03241e8017 Issue #17919: Fixed integer overflow in the eventmask parameter. 2013-12-14 19:18:39 +02:00
Serhiy Storchaka 5da107ac72 Issue #17919: Fixed integer overflow in the eventmask parameter. 2013-12-14 19:12:02 +02:00
Stefan Krah f483b0f3a9 Issue #19972: Add rarely used freefunc. This fixes a leak if sys.exit()
is used in a program.
2013-12-14 13:43:10 +01:00
Stefan Krah 7ab9f72519 Merge from 3.3. 2013-12-14 12:58:59 +01:00
Stefan Krah 01e5f800b4 Fix C++ header usage. This __STDC_LIMIT_MACROS scheme can still be subverted
by including stdint.h before mpdecimal.h.  In that case the only option left
is to compile with -D_STDC_LIMIT_MACROS.
2013-12-14 12:58:09 +01:00
R David Murray 3c2a178af2 Merge: #19970: Fix some comment typos. 2013-12-13 20:53:26 -05:00
R David Murray fc06999e0b #19970: Fix some comment typos.
Report and patch by Vajrasky Kok.
2013-12-13 20:52:19 -05:00
Victor Stinner 590cebe391 Issue #19787: PyThread_set_key_value() now always set the value
In Python 3.3, PyThread_set_key_value() did nothing if the key already exists
(if the current value is a non-NULL pointer).

When _PyGILState_NoteThreadState() is called twice on the same thread with a
different Python thread state, it still keeps the old Python thread state to
keep the old behaviour. Replacing the Python thread state with the new state
introduces new bugs: see issues #10915 and #15751.
2013-12-13 11:08:56 +01:00
Serhiy Storchaka cb1c4c8c22 Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX. 2013-12-13 12:08:55 +02:00
Serhiy Storchaka 3ad2d70947 Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX. 2013-12-13 12:08:01 +02:00
Victor Stinner 441adb8c57 Backout changeset 46393019b650
test_capi is failing and the fix is not trivial, I prefer to revert
2013-12-13 04:14:41 +01:00
Victor Stinner cd0cb8ccd3 Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,
the function did nothing if the key already exists (if the current value is a
non-NULL pointer).

_testcapi.run_in_subinterp() now correctly sets the new Python thread state of
the current thread when a subinterpreter is created.
2013-12-13 03:22:00 +01:00
Victor Stinner 2aeb070e4c (Merge 3.3) Issue #14432: Fix compilation when thread support is disabled 2013-12-13 02:32:37 +01:00
Victor Stinner 258e4d372f Issue #14432: Fix compilation when thread support is disabled 2013-12-13 02:30:12 +01:00
Victor Stinner 1310510793 Issue #14432: Generator now clears the borrowed reference to the thread state
Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
2013-12-13 02:17:29 +01:00
Victor Stinner fdeb6ec45a Issue #14432: Remove the thread state field from the frame structure. Fix a
crash when a generator is created in a C thread that is destroyed while the
generator is still used. The issue was that a generator contains a frame, and
the frame kept a reference to the Python state of the destroyed C thread. The
crash occurs when a trace function is setup.
2013-12-13 02:01:38 +01:00
Stefan Krah 5bf91dc417 Merge from 3.3. 2013-12-12 19:05:08 +01:00