Commit Graph

41541 Commits

Author SHA1 Message Date
INADA Naoki 4c78c527d2 bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249)
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.

AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.
2017-02-24 02:48:17 +09:00
Arne de Laat 324c5d8ca6 bpo-28911: Clarify the behaviour of assert_called_once_with. (#251) 2017-02-23 15:57:25 +01:00
Martijn Pieters d7e64337ef bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#51)
When you use `'%s' % SubClassOfStr()`, where `SubClassOfStr.__rmod__` exists, the reverse operation is ignored as normally such string formatting operations use the `PyUnicode_Format()` fast path. This patch tests for subclasses of `str` first and picks the slow path in that case.

Patch by Martijn Pieters.
2017-02-23 15:38:04 +02:00
INADA Naoki cb41b2766d bpo-29463: Add docstring field to some AST nodes. (#46)
* bpo-29463: Add docstring field to some AST nodes.

ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now.  It was first statement of there body.

* fix document.  thanks travis!

* doc fixes
2017-02-22 16:31:59 +01:00
Matthias Bussonnier 1bc156430b bpo-29546: Improve from-import error message with location (#103)
bpo-29546: Improve from-import error message with location
2017-02-22 10:06:50 -05:00
Anthony Zhang 03f68b60e1 bpo-29110: Fix file object leak in `aifc.open` when given invalid AIFF file. (GH-162) 2017-02-22 16:23:30 +09:00
Matthias Bussonnier 8fb1f6e039 bpo-29554: Improve docs for pstat module and profile. (#88)
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.
2017-02-21 08:30:00 +03:00
Mark Dickinson 112ec38c15 bpo-29602: fix signed zero handling in complex constructor. (#203)
* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.
2017-02-20 20:28:15 +00:00
Serhiy Storchaka 9639e4ab6d bpo-29532: Altering a kwarg dictionary passed to functools.partial() (#190)
no longer affects a partial object after creation.
2017-02-20 14:04:30 +02:00
Vinay Sajip a86339b83f Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168)
* Fixed bpo-29565: Corrected ctypes passing of large structs by value.

Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).

* Reverted unintended whitespace changes.
2017-02-20 00:16:33 +00:00
Barry Warsaw 8c130d7f81 bpo-22807: Expose platform UUID generation safety information. (#138)
bpo-22807: Expose platform UUID generation safety information.
2017-02-18 15:45:49 -05:00
Nick Coghlan ace5c0fdd9 bpo-29571: Use correct locale encoding in test_re (#149)
``local.getlocale(locale.LC_CTYPE)`` and
``locale.getpreferredencoding(False)`` may give different answers
in some cases (such as the ``en_IN`` locale).

``re.LOCALE`` uses the latter, so update the test case to match.
2017-02-18 15:01:22 +05:30
Senthil Kumaran b2ee40ed9c Change some mercurial/ hg.python.org references. (#8) 2017-02-16 07:18:42 -08:00
matejcik 9764c151c5 update test_socket AEAD test for kernel 4.9 and up (#133) 2017-02-16 14:41:31 +01:00
Matthias Bussonnier 1d4601c2c6 bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32) 2017-02-15 18:00:32 -08:00
Matthias Bussonnier bc4bed4405 bpo-29546: Set 'path' on ImportError for ``from ... import ...`` (GH-91) 2017-02-14 16:05:25 -08:00
Andrew Nester 6d1dece06d Fixed #29534 - _decimal difference with _pydecimal (#65) 2017-02-14 18:22:55 +00:00
Ivan Levkivskyi b692dc8475 bpo-28556: Various updates to typing (#28)
various updates from upstream python/typing repo:

- Added typing.Counter and typing.ChainMap generics
- More flexible typing.NamedTuple
- Improved generic ABC caching
- More tests
- Bugfixes
- Other updates

* Add Misc/NEWS entry

* Add issue number
2017-02-13 13:50:14 -08:00
MRMillon baf7bb30a0 getpass: update docstrings (#49)
EasyDialogs was removed in 3.x. fallback_getpass will always be the answer here.
ff47a133e1
2017-02-12 23:10:48 +01:00
Nathaniel J. Smith af88e7eda4 bpo-27122: Fix comment to point to correct issue number (#47)
It took me quite a bit to figure out what this was referring to,
since the given issue number is wrong, and the original commit
message I found through git blame lists a different, also wrong
issue number... see https://bugs.python.org/issue27122#msg279449
2017-02-12 14:37:24 +03:00
Victor Stinner 109a9fe796 Merge 3.6 2017-02-10 12:38:02 +01:00
Victor Stinner 2a35c939cc Fix test_datetime on Windows
Issue #29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with an
OSError in test_timestamp_limits().
2017-02-10 12:37:21 +01:00
Victor Stinner 07547cdad3 Merge 3.6 2017-02-10 11:45:28 +01:00
Victor Stinner 6f37e3645d Fix test_datetime on system with 32-bit time_t
Issue #29100: Catch OverflowError in the new test_timestamp_limits() test.
2017-02-10 11:45:14 +01:00
Victor Stinner 05e218c37d Merge 3.6 2017-02-10 10:34:37 +01:00
Victor Stinner b67f096738 Fix datetime.fromtimestamp(): check bounds
Issue #29100: Fix datetime.fromtimestamp() regression introduced in Python
3.6.0: check minimum and maximum years.
2017-02-10 10:34:02 +01:00
Łukasz Langa 40ee824d1d Merge 3.6 (fix #29519) 2017-02-10 00:20:16 -08:00
Łukasz Langa 57fe245e8c Merge 3.5 (fix #29519) 2017-02-10 00:16:10 -08:00
Łukasz Langa 9cd7e17640 Fix #29519: weakref spewing exceptions during interp finalization 2017-02-10 00:14:55 -08:00
Victor Stinner 331bbe6aaa Issue #29507: Update test_exceptions
test_unraisable() of test_exceptions expects that PyErr_WriteUnraisable(method)
fails on repr(method).

Before the previous change (7b8df4a5d81d), slot_tp_finalize() called
PyErr_WriteUnraisable() with a PyMethodObject. In this case, repr(method) calls
repr(self) which is BrokenRepr.__repr__() and the calls raises a new exception.

After the previous change, slot_tp_finalize() uses an unbound method: repr() is
called on a regular __del__() method which doesn't call repr(self). repr()
doesn't fail anymore.

PyErr_WriteUnraisable() doesn't call __repr__() anymore, so remove BrokenRepr
unit test.
2017-02-09 23:49:50 +01:00
Victor Stinner 3722f1f483 support: temp_dir() and change_cwd() uses repr() in error message
Serhiy Storshaka pointed me that str(path) can emit a BytesWarning: use
repr(path) instead.
2017-02-08 15:49:10 +01:00
Victor Stinner 17a63e2169 Fix regrtest -j0 -R output
Write also dots into stderr, instead of stdout.
2017-02-08 13:06:08 +01:00
Victor Stinner 04054d9ac2 Update test_support for my temp_dir/change_cwd changes 2017-02-08 12:49:02 +01:00
Victor Stinner edb4881441 support: add more info on temp_dir() and change_cwd() failure
Log the OSError exception message.
2017-02-08 12:25:00 +01:00
Mariatta Wijaya 189413dcfe Issue #29314: Merge with 3.6 2017-02-06 22:06:04 -08:00
Mariatta Wijaya 6138432e59 Issue #29314: Merge with 3.5 2017-02-06 22:05:10 -08:00
Mariatta Wijaya 4e7ff8b1a3 Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation Warning 2017-02-06 22:03:00 -08:00
Steve Dower 18d2c934e3 Issue #28164: Improves test on Windows 7 2017-02-06 14:53:21 -08:00
Steve Dower 2dfa6cb9ff Issue #28164: Improves test on Windows 7 2017-02-06 14:50:17 -08:00
Victor Stinner 5bad70def6 regrtest: don't fail immediately if a child does crash
Issue #29362: Catch a crash of a worker process as a normal failure and
continue to run next tests. It allows to get the usual test summary: single
line result (OK/FAIL), total duration, etc.
2017-02-06 12:42:00 +01:00
Xiang Zhang 6aee6fbce8 Issue #29405: Make total calculation in _guess_delimiter more accurate. 2017-02-06 10:50:09 +08:00
Steve Dower 64a2f9e882 Merge from 3.6 2017-02-04 16:46:53 -08:00
Steve Dower 0c8ee60e91 Updates test_winconsoleio to better show the source of its issues. 2017-02-04 16:46:34 -08:00
Steve Dower 824c6fdfaa Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) 2017-02-04 15:19:46 -08:00
Steve Dower 5f9193a6ed Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) 2017-02-04 15:19:29 -08:00
Steve Dower 43fec9b419 Merge issue #28164 and issue #29409 2017-02-04 15:14:18 -08:00
Steve Dower 722e3e2705 Issue #28164: Correctly handle special console filenames (patch by Eryk Sun) 2017-02-04 15:07:46 -08:00
Steve Dower 479d96c694 Issue #29416: Prevent infinite loop in pathlib.Path.mkdir 2017-02-04 14:56:57 -08:00
Steve Dower 1add96f1b6 Issue #29416: Prevent infinite loop in pathlib.Path.mkdir 2017-02-04 14:55:16 -08:00
Steve Dower d3c4853b78 Issue #29416: Prevent infinite loop in pathlib.Path.mkdir 2017-02-04 14:54:56 -08:00