Serhiy Storchaka
121be0d64b
Issue #22193 : Added private function _PySys_GetSizeOf() needed to implement
...
some __sizeof__() methods.
2014-08-14 22:22:35 +03:00
Serhiy Storchaka
547d3bc3a6
Issue #22193 : Added private function _PySys_GetSizeOf() needed to implement
...
some __sizeof__() methods.
2014-08-14 22:21:18 +03:00
Zachary Ware
1151c8b7bf
Closes #22146 : Merge with 3.4
2014-08-05 14:02:11 -05:00
Zachary Ware
9b33872812
Issue #22146 : Fix typo in __build_class__ error message
2014-08-05 14:01:10 -05:00
Victor Stinner
f6a271ae98
Issue #18395 : Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, rename
...
``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these
functions.
2014-08-01 12:28:48 +02:00
Victor Stinner
1db9e7bb19
Issue #22054 : Add os.get_blocking() and os.set_blocking() functions to get and
...
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
2014-07-29 22:32:47 +02:00
Nick Coghlan
973fe0ba7a
Issue #18093 : Factor out the programs that embed the runtime
2014-07-25 21:52:14 +10:00
Berker Peksag
d8089e0d04
Issue #16382 : Improve exception message of warnings.warn() for bad category.
...
Initial patch by Phil Elson.
2014-07-11 19:50:25 +03:00
Victor Stinner
ac7d80c7d0
(Merge 3.4) Issue #21925 : PyImport_Cleanup(): Remove unused parameter in
...
PySys_FormatStderr() call
2014-07-07 23:07:27 +02:00
Victor Stinner
ab826d11a3
Issue #21925 : PyImport_Cleanup(): Remove unused parameter in
...
PySys_FormatStderr() call
2014-07-07 23:06:15 +02:00
Ned Deily
744a1193aa
Issue #21891 : remove extraneous semicolon.
2014-06-30 23:31:33 -07:00
Ned Deily
529ea5d184
Issue #21891 : remove extraneous semicolon.
2014-06-30 23:31:14 -07:00
Benjamin Peterson
450c1586c0
merge 3.4
2014-06-17 00:34:56 -07:00
Benjamin Peterson
59830b6ec4
revert tstate_delete_common, since it's pretty much wrong
2014-06-17 00:34:46 -07:00
Benjamin Peterson
89cef795eb
merge 3.4
2014-06-16 23:49:09 -07:00
Benjamin Peterson
95d75194ac
remove extra call to tstate_delete_common (merge artifact)
2014-06-16 23:49:02 -07:00
Benjamin Peterson
7258e6da3b
merge 3.4
2014-06-16 23:08:29 -07:00
Benjamin Peterson
068f81e115
avoid a deadlock with the interpreter head lock and the GIL during finalization
2014-06-16 23:07:49 -07:00
Benjamin Peterson
e6bfdb9ca5
merge 3.4
2014-06-16 23:07:15 -07:00
Benjamin Peterson
17548dda51
check if the thread is finalizing after retaking the GIL
2014-06-16 22:59:07 -07:00
Victor Stinner
40ee30181f
Issue #21205 : Add a new ``__qualname__`` attribute to generator, the qualified
...
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
Terry Jan Reedy
4a518f02e2
Merge with 3.4
2014-06-16 03:05:53 -04:00
Terry Jan Reedy
f2fb73f675
Issue #19362 : Tweek len() doc and docstring to expand the indicated range of
...
arguments. Original patch by Gareth Rees.
2014-06-16 03:05:37 -04:00
Brett Cannon
42535f0104
Fix a parameter name to make sense again
2014-05-30 16:28:00 -04:00
Brett Cannon
2a17bde930
Issue #20383 : Introduce importlib.util.module_from_spec().
...
Along the way, dismantle importlib._bootstrap._SpecMethods as it was
no longer relevant and constructing the new function required
partially dismantling the class anyway.
2014-05-30 14:55:29 -04:00
Brett Cannon
fd4d0504df
Move import.c to use Clinic file output.
2014-05-30 11:21:14 -04:00
Eric Snow
12c5247be9
Issue #21226 : Merge from 3.4.
2014-05-29 12:32:39 -06:00
Eric Snow
58cfdd8af8
Issue #21226 : fix a ref leak.
2014-05-29 12:31:39 -06:00
Antoine Pitrou
5c8008e59d
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:47:32 +02:00
Antoine Pitrou
9961405ed1
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
Raymond Hettinger
d4d84accb3
merge
2014-05-19 22:21:24 +01:00
Raymond Hettinger
2a54582d72
Issue 20620: Update the min()/max() docs for the new default argument.
...
Patch provided by Berker Peksag.
2014-05-19 22:20:52 +01:00
Victor Stinner
0d4e01ca07
Issue #13916 : Fix surrogatepass error handler on Windows
2014-05-16 14:46:20 +02:00
Serhiy Storchaka
88d8fb6af6
Issue #13916 : Disallowed the surrogatepass error handler for non UTF-*
...
encodings.
2014-05-15 14:37:42 +03:00
Victor Stinner
45e8e2f218
Issue #21490 : Add new C macros: Py_ABS() and Py_STRINGIFY()
...
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
2014-05-14 17:24:35 +02:00
Eric Snow
b7f1be309e
Merge from 3.4 (for #21226 ).
2014-05-12 18:25:00 -06:00
Eric Snow
08197a4616
Issue #21226 : Set all attrs in PyImport_ExecCodeModuleObject.
2014-05-12 17:54:55 -06:00
Antoine Pitrou
1c33280c95
Issue #21425 : Fix flushing of standard streams in the interactive interpreter.
2014-05-11 13:43:31 +02:00
Antoine Pitrou
9845c7ebc5
Issue #21425 : Fix flushing of standard streams in the interactive interpreter.
2014-05-11 13:42:17 +02:00
Kristján Valur Jónsson
5b74badc8d
Merging from 3.3: The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
...
in order to have the same resolution as pthreads condition variables.
At the same time, it must be large enough to accept 31 bits of
milliseconds, which is the maximum timeout value in the windows API.
A PY_LONG_LONG of microseconds fullfills both requirements.
This closes issue #20737
2014-05-08 10:59:52 +00:00
Kristján Valur Jónsson
33096fe829
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
...
in order to have the same resolution as pthreads condition variables.
At the same time, it must be large enough to accept 31 bits of
milliseconds, which is the maximum timeout value in the windows API.
A PY_LONG_LONG of microseconds fullfills both requirements.
This closes issue #20737
2014-05-08 10:36:27 +00:00
Kristján Valur Jónsson
ddf343855d
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
...
in order to have the same resolution as pthreads condition variables.
At the same time, it must be large enough to accept 31 bits of
milliseconds, which is the maximum timeout value in the windows API.
A PY_LONG_LONG of microseconds fullfills both requirements.
This closes issue #20737
2014-05-08 10:36:27 +00:00
Tim Golden
b8ac3e1a20
Issue21393 Use CryptReleaseContext to release Crypt handle on Windows
2014-05-06 13:29:45 +01:00
Victor Stinner
d50c3f3f3a
Issue #21393 : random.c: on Windows, close the hCryptProv handle at exit
2014-05-02 22:06:44 +02:00
Antoine Pitrou
285a163a4c
Issue #21312 : Update the thread_foobar.h template file to include newer threading APIs. Patch by Jack McCracken.
2014-04-28 21:12:11 +02:00
Antoine Pitrou
3a74ce2088
Issue #13204 : Calling sys.flags.__new__ would crash the interpreter, now it raises a TypeError.
2014-04-28 13:08:28 +02:00
Antoine Pitrou
871dfc41d3
Issue #13204 : Calling sys.flags.__new__ would crash the interpreter, now it raises a TypeError.
2014-04-28 13:07:06 +02:00
Antoine Pitrou
4432cf45c6
Issue #21207 : Detect when the os.urandom cached fd has been closed or replaced, and open it anew.
2014-04-26 14:35:19 +02:00
Antoine Pitrou
e472aeafc3
Issue #21207 : Detect when the os.urandom cached fd has been closed or replaced, and open it anew.
2014-04-26 14:33:03 +02:00
Benjamin Peterson
5edbb7b7a4
correct len signature in docstring ( closes #21294 )
2014-04-18 01:03:59 -04:00
doko@ubuntu.com
4a173bc4ed
Fixes for KFreeBSD and the Hurd:
...
- Issue #21274 : Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
- Issue #21276 : posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
- Issue #21275 : Fix a socket test on KFreeBSD.
2014-04-17 19:47:16 +02:00
Benjamin Peterson
e83236f396
merge 3.4
2014-04-18 01:04:07 -04:00
doko@ubuntu.com
dc282134ee
- Merge 3.4
2014-04-17 19:49:00 +02:00
Eric V. Smith
a12572ff3a
Close issue #8931 : Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
2014-04-15 22:37:55 -04:00
Vinay Sajip
809f90f369
Reverted 16efa8d27e4c after discussion with Eric.
2014-04-15 13:52:21 +01:00
Eric V. Smith
a0d107324d
Closed issue #8931 : Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
2014-04-15 03:05:02 -04:00
Eric V. Smith
280c458f9e
Closes issue #12546 : Allow \x00 as a fill character for builtin type __format__ methods.
2014-04-14 12:08:21 -04:00
Eric V. Smith
2ea9712ee9
Issue #12546 : Allow \x00 as a fill character for builtin type __format__ methods.
2014-04-14 11:55:10 -04:00
Benjamin Peterson
a548a30fed
merge 3.4 ( #21209 )
2014-04-13 23:52:43 -04:00
Benjamin Peterson
f6e50b4a81
fix sending tuples to custom generator objects with yield from ( closes #21209 )
...
Debugged by Victor.
2014-04-13 23:52:01 -04:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Brett Cannon
e7ef805833
merge of fix for issue #20942
2014-04-04 10:03:42 -04:00
Brett Cannon
18fc4e70f3
Issue #20942 : PyImport_ImportFrozenModuleObject() no longer sets
...
__file__.
This causes _frozen_importlib to no longer have __file__ set as well
as any frozen module imported using imp.init_frozen() (which is
deprecated).
2014-04-04 10:01:46 -04:00
Benjamin Peterson
9effd1f5fb
merge 3.4 ( #21089 )
2014-03-28 18:55:04 -04:00
Benjamin Peterson
9381343948
undefine SET_SYS_FROM_STRING_BORROW after its done being used ( closes #21089 )
2014-03-28 18:52:45 -04:00
Victor Stinner
518e610977
Issue #19977 , #19036 : Always include <locale.h> in pythonrun.c
...
to get LC_CTYPE constant on Windows.
2014-03-18 02:06:38 +01:00
Victor Stinner
7143029d43
Issue #19977 : When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
...
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
``surrogateescape`` error handler, instead of the ``strict`` error handler.
2014-03-18 01:18:21 +01:00
Georg Brandl
2fc8f773e1
Issue #20404 : reject non-text encodings early in TextIOWrapper.
2014-03-02 09:18:31 +01:00
Brett Cannon
d3acef9bf4
Issue #20763 : Fix importlib.machinery.PathFinder to support
...
PathEntryFinder instances which only define find_module().
Reported by Yukihiro Nakadaira.
2014-02-26 18:26:49 -05:00
Serhiy Storchaka
94ee389308
Issue #19619 : Blacklist non-text codecs in method API
...
str.encode, bytes.decode and bytearray.decode now use an
internal API to throw LookupError for known non-text encodings,
rather than attempting the encoding or decoding operation and
then throwing a TypeError for an unexpected output type.
The latter mechanism remains in place for third party non-text
encodings.
Backported changeset d68df99d7a57.
2014-02-24 14:43:03 +02:00
Benjamin Peterson
45d8e7b920
update magic number for #20625
2014-02-19 18:05:36 -05:00
Victor Stinner
065efc3072
Issue #20625 : Fix compilation issue
2014-02-18 22:07:56 +01:00
Yury Selivanov
34ce99f66d
Mangle __parameters in __annotations__ dict properly. Issue #20625 .
2014-02-18 12:49:41 -05:00
Victor Stinner
3c1b379ebd
Issue #20320 : select.select() and select.kqueue.control() now round the timeout
...
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
2014-02-17 00:02:43 +01:00
Benjamin Peterson
0714b8b6ab
set line and column numbers for keyword-only arg nodes ( closes #20619 )
2014-02-13 19:22:14 -05:00
Victor Stinner
15054c16c8
Issue #20526 , #19466 : Revert changes of issue #19466 which introduces a
...
regression: don't clear anymore the state of Python threads early during the
Python shutdown.
2014-02-13 12:48:54 +01:00
Benjamin Peterson
40be9e5100
remove dynamic initializer lists for c89 compliance ( closes #20595 )
2014-02-11 10:09:27 -05:00
Benjamin Peterson
42ec031fe7
merge 3.3 ( #20588 )
2014-02-10 22:41:40 -05:00
Benjamin Peterson
c2f665e721
don't put runtime values in array initializer for C89 compliance ( closes #20588 )
2014-02-10 22:19:02 -05:00
Serhiy Storchaka
d667d72cb7
Temporary silence test broken by issue19255.
...
Remove unused variables.
2014-02-10 19:09:19 +02:00
Serhiy Storchaka
87a5c515d0
Issue #19255 : The builtins module is restored to initial value before
...
cleaning other modules. The sys and builtins modules are cleaned last.
2014-02-10 18:21:34 +02:00
Larry Hastings
8f9f0f12e8
Issue #20517 : Removed unnecessary new (short-lived) functions from PyErr.
2014-02-10 03:43:57 -08:00
Larry Hastings
b082731fbb
Issue #20517 : Functions in the os module that accept two filenames
...
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Benjamin Peterson
665a2bcdf8
bump Python-ast.c
2014-02-19 23:05:26 -05:00
Serhiy Storchaka
dfe98a102e
Issue #20437 : Fixed 22 potential bugs when deleting objects references.
2014-02-09 13:46:20 +02:00
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
2014-02-09 13:33:53 +02:00
Larry Hastings
2623c8c23c
Issue #20530 : Argument Clinic's signature format has been revised again.
...
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Nick Coghlan
d979e4335d
Close #20500 : Don't trigger PyObject_Str assertion at shutdown
2014-02-09 10:43:21 +10:00
Nick Coghlan
a9b15241c6
Close #20404 : blacklist non-text encodings in io.TextIOWrapper
...
- io.TextIOWrapper (and hence the open() builtin) now use the
internal codec marking system added for issue #19619
- also tweaked the C code to only look up the encoding once,
rather than multiple times
- the existing output type checks remain in place to deal with
unmarked third party codecs.
2014-02-04 22:11:18 +10:00
Larry Hastings
7726ac9163
#Issue 20456: Several improvements and bugfixes for Argument Clinic,
...
including correctly generating code for Clinic blocks inside C
preprocessor conditional blocks.
2014-01-31 22:03:12 -08:00
Victor Stinner
a17b6bb5fe
Issue #20162 : Fix an alignment issue in the siphash24() hash function which
...
caused a crash on PowerPC 64-bit (ppc64).
2014-02-01 03:38:56 +01:00
Larry Hastings
581ee3618c
Issue #20326 : Argument Clinic now uses a simple, unique signature to
...
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326 : Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
2014-01-28 05:00:08 -08:00
Larry Hastings
5c66189e88
Issue #20189 : Four additional builtin types (PyTypeObject,
...
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Serhiy Storchaka
2bd59daf58
Issue #2382 : SyntaxError cursor "^" now is written at correct position in most
...
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
2014-01-21 22:29:47 +02:00
Serhiy Storchaka
65fd0592fb
Issue #2382 : SyntaxError cursor "^" now is written at correct position in most
...
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
2014-01-21 22:26:52 +02:00
Victor Stinner
2d854c8e7b
Issue #20024 : Py_BuildValue() now saves/restores the current exception before
...
building an item if the build of a previous item failed.
2014-01-21 20:52:17 +01:00
Stefan Krah
34e4628453
Merge from 3.3.
2014-01-20 15:35:38 +01:00
Stefan Krah
6c01e38677
Issue #19036 : Including locale.h should not depend on HAVE_LANGINFO_H.
2014-01-20 15:31:08 +01:00
Larry Hastings
b7ccb20423
Issue #20294 : Argument Clinic now supports argument parsing for __new__ and
...
__init__ functions.
2014-01-18 23:50:21 -08:00
Larry Hastings
bebf73511a
Issue #20287 : Argument Clinic's output is now configurable, allowing
...
delaying its output or even redirecting it to a separate file.
2014-01-17 17:47:17 -08:00