]> granicus.if.org Git - python/log
python
7 years agoUse assertCountEqual instead of assertEqual. (#5223)
Gregory P. Smith [Wed, 17 Jan 2018 22:57:57 +0000 (14:57 -0800)]
Use assertCountEqual instead of assertEqual. (#5223)

This test doesn't care about order, the underlying filesystem APIs do not
guarantee directory listings on subsequent calls will be in the same order.

7 years agobpo-32226: Fix memory leak in generic_alias_dealloc() (#5212)
Victor Stinner [Wed, 17 Jan 2018 22:08:18 +0000 (23:08 +0100)]
bpo-32226: Fix memory leak in generic_alias_dealloc() (#5212)

7 years agopythoninfo: add time.time and datetime.datetime.now (#5214)
Victor Stinner [Wed, 17 Jan 2018 15:35:45 +0000 (16:35 +0100)]
pythoninfo: add time.time and datetime.datetime.now (#5214)

7 years agobpo-32248: Fix test_importlib.test_open() (#5213)
Victor Stinner [Wed, 17 Jan 2018 14:21:50 +0000 (15:21 +0100)]
bpo-32248: Fix test_importlib.test_open() (#5213)

Use the binary.file instead of utf-8.file to avoid issues with
Unix newlines vs Windows newlines.

7 years agoFix Git attributes of test_importlib data files (#5209)
Victor Stinner [Wed, 17 Jan 2018 09:26:03 +0000 (10:26 +0100)]
Fix Git attributes of test_importlib data files (#5209)

bpo-32248: Make sure that Git checks out data files with Unix line
ending on Windows as well.

7 years agobpo-32549: Compile OpenSSL 1.1.0 on Travis CI (#5180)
Christian Heimes [Tue, 16 Jan 2018 20:02:26 +0000 (21:02 +0100)]
bpo-32549: Compile OpenSSL 1.1.0 on Travis CI (#5180)

Use an improved version of multissl test helper to compile a local copy
of OpenSSL 1.1.0g.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32403: Faster date and datetime constructors (#4993)
Paul Ganssle [Tue, 16 Jan 2018 18:06:31 +0000 (13:06 -0500)]
bpo-32403: Faster date and datetime constructors (#4993)

* Add tests for date subclass alternate constructors

* Switch over alternate date constructors to fast path

* Switch datetime constructors to fastpath, fix bpo-32404

* Add fast path for datetime in date subclass constructor

* Set fold in constructor in datetime.combine

* Add news entries.

7 years agobpo-32410: Implement loop.sock_sendfile() (#4976)
Andrew Svetlov [Tue, 16 Jan 2018 17:59:34 +0000 (19:59 +0200)]
bpo-32410: Implement loop.sock_sendfile() (#4976)

7 years agoSkip test_readline.test_nonascii() on C locale (#5203)
Victor Stinner [Tue, 16 Jan 2018 16:34:34 +0000 (17:34 +0100)]
Skip test_readline.test_nonascii() on C locale (#5203)

bpo-29240: On FreeBSD, if the LC_CTYPE locale is "C" or "POSIX",
writing and reading non-ASCII bytes into/from a TTY works,
but readline or ncurses ignores non-ASCII bytes on read.

7 years agobpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the _io module...
Serhiy Storchaka [Tue, 16 Jan 2018 16:34:21 +0000 (18:34 +0200)]
bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the _io module. (#3726)

7 years agobpo-32544: Speed up hasattr() and getattr() (GH-5173)
INADA Naoki [Tue, 16 Jan 2018 11:52:41 +0000 (20:52 +0900)]
bpo-32544: Speed up hasattr() and getattr() (GH-5173)

AttributeError was raised always when attribute is not found.
This commit skip raising AttributeError when `tp_getattro` is `PyObject_GenericGetAttr`.
It makes hasattr() and getattr() about 4x faster when attribute is not found.

7 years agobpo-26163: Frozenset hash improvement (#5194)
Raymond Hettinger [Tue, 16 Jan 2018 09:30:26 +0000 (01:30 -0800)]
bpo-26163: Frozenset hash improvement (#5194)

7 years agobpo-14976: Reentrant simple queue (#3346)
Antoine Pitrou [Mon, 15 Jan 2018 23:27:16 +0000 (00:27 +0100)]
bpo-14976: Reentrant simple queue (#3346)

Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C implementation of put().

7 years agoImplement the get_resource_reader() API for file system imports (#5168)
Barry Warsaw [Mon, 15 Jan 2018 23:07:11 +0000 (15:07 -0800)]
Implement the get_resource_reader() API for file system imports (#5168)

7 years agoMake asyncio tests run when there's no SSL module (#5196)
Yury Selivanov [Mon, 15 Jan 2018 22:56:32 +0000 (17:56 -0500)]
Make asyncio tests run when there's no SSL module (#5196)

7 years agobpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)
Victor Stinner [Mon, 15 Jan 2018 14:58:02 +0000 (15:58 +0100)]
bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)

* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

7 years agobpo-29240: Fix locale encodings in UTF-8 Mode (#5170)
Victor Stinner [Mon, 15 Jan 2018 09:45:49 +0000 (10:45 +0100)]
bpo-29240: Fix locale encodings in UTF-8 Mode (#5170)

Modify locale.localeconv(), time.tzname, os.strerror() and other
functions to ignore the UTF-8 Mode: always use the current locale
encoding.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or
  encoding error, they return the position of the error and an error
  message which are used to raise Unicode errors in
  PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale().
* Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx().
* PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all
  cases, especially for the strict error handler.
* Add _Py_DecodeUTF8Ex(): return more information on decoding error
  and supports the strict error handler.
* Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex().
* Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx().
* Ignore the UTF-8 mode to encode/decode localeconv(), strerror()
  and time zone name.
* Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
  and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use
  the "current" locale.
* Remove _PyUnicode_DecodeCurrentLocale(),
  _PyUnicode_DecodeCurrentLocaleAndSize() and
  _PyUnicode_EncodeCurrentLocale().

7 years agobpo-26330: Update shutil.disk_usage() documentation (GH-5184)
Cheryl Sabella [Mon, 15 Jan 2018 05:08:37 +0000 (00:08 -0500)]
bpo-26330: Update shutil.disk_usage() documentation (GH-5184)

Clarify that on Windows, path must be a directory.
On Unix, path can be a file or a directory.

7 years agobpo-15221: Update os.path.is*() documentation (GH-5185)
Cheryl Sabella [Mon, 15 Jan 2018 04:57:51 +0000 (23:57 -0500)]
bpo-15221: Update os.path.is*() documentation (GH-5185)

`os.path.is*()` can return False if the file can't be accessed.
The behaviour is documented in details in `os.path.exists()`.
Link to `os.path.exists()` from `os.path.is*()`.

7 years agobpo-29476: Simplify set_add_entry() (#5175)
Raymond Hettinger [Sun, 14 Jan 2018 18:20:13 +0000 (10:20 -0800)]
bpo-29476: Simplify set_add_entry() (#5175)

7 years agoAdd itertools recipe for directly finding the n-th combination (#5161)
Raymond Hettinger [Sat, 13 Jan 2018 18:35:40 +0000 (10:35 -0800)]
Add itertools recipe for directly finding the n-th combination (#5161)

7 years agoImprove enum.Flag code example (GH-5167)
Julian Kahnert [Sat, 13 Jan 2018 03:35:57 +0000 (04:35 +0100)]
Improve enum.Flag code example (GH-5167)

The code example that demonstrate how to use enum.Flag was missing
the import of enum.auto.

7 years agobpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108)
Brett Cannon [Fri, 12 Jan 2018 23:08:59 +0000 (15:08 -0800)]
bpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108)

7 years agobpo-31993: Do not use memoryview when pickle large strings. (#5154)
Serhiy Storchaka [Fri, 12 Jan 2018 22:28:31 +0000 (00:28 +0200)]
bpo-31993: Do not use memoryview when pickle large strings. (#5154)

PyMemoryView_FromMemory() created a memoryview referring to
the internal data of the string.  When the string is destroyed
the memoryview become referring to a freed memory.

7 years agobpo-32521: nis libtirpc (#5137)
Christian Heimes [Fri, 12 Jan 2018 14:26:32 +0000 (15:26 +0100)]
bpo-32521: nis libtirpc (#5137)

glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
yahya-abou-imran [Fri, 12 Jan 2018 09:18:44 +0000 (10:18 +0100)]
bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)

7 years agoOrderedDict import is no longer needed (#4890)
Raymond Hettinger [Fri, 12 Jan 2018 06:20:33 +0000 (22:20 -0800)]
OrderedDict import is no longer needed (#4890)

7 years agoLexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH...
İsmail Arılık [Fri, 12 Jan 2018 06:18:54 +0000 (09:18 +0300)]
Lexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH-5157)

In lexical analysis reference documentation, the internal link to
the string literal concatenation section was written as`.. _string-catenation:`.
Changed that to `.. _string-concatenation:`.

7 years agobpo-31145: Use dataclasses to create a prioritization wrapper (#5153)
Raymond Hettinger [Fri, 12 Jan 2018 06:06:34 +0000 (22:06 -0800)]
bpo-31145: Use dataclasses to create a prioritization wrapper (#5153)

7 years agobpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)
Raymond Hettinger [Fri, 12 Jan 2018 05:53:49 +0000 (21:53 -0800)]
bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)

7 years agobpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)
Serhiy Storchaka [Thu, 11 Jan 2018 18:20:13 +0000 (20:20 +0200)]
bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)

7 years agobpo-31993: Do not create frames for large bytes and str objects (#5114)
Serhiy Storchaka [Thu, 11 Jan 2018 11:03:20 +0000 (13:03 +0200)]
bpo-31993: Do not create frames for large bytes and str objects (#5114)

when serialize into memory buffer with C pickle implementations.

This optimization already is performed when serialize into memory
with Python pickle implementations or into a file with both
implementations.

7 years agobpo-29240: Ignore UTF-8 Mode in time module (#5148)
Victor Stinner [Thu, 11 Jan 2018 09:37:59 +0000 (10:37 +0100)]
bpo-29240: Ignore UTF-8 Mode in time module (#5148)

time.strftime() must use the current LC_CTYPE encoding, not UTF-8
if the UTF-8 mode is enabled.

Add _PyUnicode_DecodeCurrentLocale() function.

7 years agobpo-32320: Add default value support to collections.namedtuple() (#4859)
Raymond Hettinger [Thu, 11 Jan 2018 05:45:19 +0000 (21:45 -0800)]
bpo-32320: Add default value support to collections.namedtuple() (#4859)

7 years agoFix obvious typos in docstrings (#5151)
Raymond Hettinger [Thu, 11 Jan 2018 04:56:41 +0000 (20:56 -0800)]
Fix obvious typos in docstrings (#5151)

7 years agobpo-29240: readline now ignores the UTF-8 Mode (#5145)
Victor Stinner [Wed, 10 Jan 2018 21:46:15 +0000 (22:46 +0100)]
bpo-29240: readline now ignores the UTF-8 Mode (#5145)

Add new fuctions ignoring the UTF-8 mode:

* _Py_DecodeCurrentLocale()
* _Py_EncodeCurrentLocale()
* _PyUnicode_DecodeCurrentLocaleAndSize()
* _PyUnicode_EncodeCurrentLocale()

Modify the readline module to use these functions.

Re-enable test_readline.test_nonascii().

7 years agoFix when parsing tz offsets microseconds shorter than 6 (#4781)
Mario Corchero [Tue, 9 Jan 2018 21:37:26 +0000 (21:37 +0000)]
Fix when parsing tz offsets microseconds shorter than 6 (#4781)

As the remainder was directly parsed as an int, strings like
.600 were parsed as 600 microseconds rather than milliseconds.

7 years agobpo-24340: Fix estimation of the code stack size. (#5076)
Serhiy Storchaka [Tue, 9 Jan 2018 19:54:52 +0000 (21:54 +0200)]
bpo-24340: Fix estimation of the code stack size. (#5076)

7 years agobpo-32493: Not only AIX, but FreeBSD has uuid_create support (#5089)
David Carlier [Tue, 9 Jan 2018 19:38:07 +0000 (19:38 +0000)]
bpo-32493: Not only AIX, but FreeBSD has uuid_create support (#5089)

Allow building the _uuid extension module on FreeBSD and OpenBSD.

7 years agoPost-release version bump to a4+
Ned Deily [Tue, 9 Jan 2018 15:27:57 +0000 (10:27 -0500)]
Post-release version bump to a4+

7 years agoFix several changelog items to use PEP markup.
Ned Deily [Tue, 9 Jan 2018 05:13:21 +0000 (00:13 -0500)]
Fix several changelog items to use PEP markup.

7 years agoMerge tag 'v3.7.0a4'
Ned Deily [Tue, 9 Jan 2018 15:17:17 +0000 (10:17 -0500)]
Merge tag 'v3.7.0a4'

7 years agobpo-32507: Change Windows install to include app-local UCRT (#5119)
Steve Dower [Tue, 9 Jan 2018 08:14:46 +0000 (19:14 +1100)]
bpo-32507: Change Windows install to include app-local UCRT (#5119)

7 years agoBump to 3.7.0a4 v3.7.0a4
Ned Deily [Tue, 9 Jan 2018 03:05:14 +0000 (22:05 -0500)]
Bump to 3.7.0a4

7 years agoUpdate docs for 3.7.0a4
Ned Deily [Tue, 9 Jan 2018 02:57:13 +0000 (21:57 -0500)]
Update docs for 3.7.0a4

7 years agobpo-32248: install new test_importlib directories (#5138)
Ned Deily [Tue, 9 Jan 2018 02:07:59 +0000 (21:07 -0500)]
bpo-32248: install new test_importlib directories (#5138)

7 years agobpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)
Nick Coghlan [Mon, 8 Jan 2018 02:45:02 +0000 (12:45 +1000)]
bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)

- primary change is to add a new default filter entry for
  'default::DeprecationWarning:__main__'
- secondary change is an internal one to cope with plain
  strings in the warning module's internal filter list
  (this avoids the need to create a compiled regex object
  early on during interpreter startup)
- assorted documentation updates, including many more
  examples of configuring the warnings settings
- additional tests to ensure that both the pure Python and
  the C accelerated warnings modules have the expected
  default configuration

7 years agobpo-32506: Change dataclasses from OrderedDict to plain dict. (gh-5131)
Eric V. Smith [Sun, 7 Jan 2018 19:30:17 +0000 (14:30 -0500)]
bpo-32506: Change dataclasses from OrderedDict to plain dict. (gh-5131)

7 years agoFix version in AppVeyor config (GH-5124)
Zachary Ware [Sun, 7 Jan 2018 18:59:48 +0000 (12:59 -0600)]
Fix version in AppVeyor config (GH-5124)

7 years agobpo-31802: Fix importing native path module before importing os. (#4017)
Serhiy Storchaka [Sun, 7 Jan 2018 15:54:31 +0000 (17:54 +0200)]
bpo-31802: Fix importing native path module before importing os. (#4017)

7 years agobpo-30579: Allow TracebackType creation and tb_next mutation from Python (GH-4793)
Nathaniel J. Smith [Sun, 7 Jan 2018 13:30:18 +0000 (05:30 -0800)]
bpo-30579: Allow TracebackType creation and tb_next mutation from Python (GH-4793)

Third party projects may wish to hide their own internal machinery in
order to present more comprehensible tracebacks to end users
(e.g. Jinja2 and Trio both do this).

Previously such projects have had to rely on ctypes to do so:

  https://github.com/pallets/jinja/blob/fe3dadacdf4cf411d0a5b6bbd4d5234697a28af2/jinja2/debug.py#L345
  https://github.com/python-trio/trio/blob/1e86b1aee8c0c759f6f239ae53a05d0d3963c629/trio/_core/_multierror.py#L296

This provides a Python level API for creating and modifying real
Traceback objects, allowing tracebacks to be edited at runtime.

Patch by Nathaniel Smith.

7 years agoFix dataclasses docstring typo. (gh-5118)
Eric V. Smith [Sun, 7 Jan 2018 13:19:45 +0000 (08:19 -0500)]
Fix dataclasses docstring typo. (gh-5118)

7 years agoKill the AppVeyor file whitelist (GH-5121)
Zachary Ware [Sun, 7 Jan 2018 02:41:17 +0000 (20:41 -0600)]
Kill the AppVeyor file whitelist (GH-5121)

It's more trouble than it's worth, since AppVeyor only checks the HEAD commit of a PR rather than the full diff against the base branch to decide which files changed.

7 years agobpo-32282: Remove unnecessary check for `VersionHelpers.h` in `socketmodule.c` on...
Max Bélanger [Sun, 7 Jan 2018 02:05:18 +0000 (18:05 -0800)]
bpo-32282: Remove unnecessary check for `VersionHelpers.h` in `socketmodule.c` on Windows

7 years ago bpo-32279: Add additional params to make_dataclass(), pass through to dataclass...
Eric V. Smith [Sat, 6 Jan 2018 22:09:58 +0000 (17:09 -0500)]
 bpo-32279: Add additional params to make_dataclass(), pass through to dataclass(). (gh-5117)

7 years agobpo-32278: Allow dataclasses.make_dataclass() to omit type information. (gh-5115)
Eric V. Smith [Sat, 6 Jan 2018 21:14:03 +0000 (16:14 -0500)]
bpo-32278: Allow dataclasses.make_dataclass() to omit type information. (gh-5115)

7 years agobpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is a dataclas...
Eric V. Smith [Sat, 6 Jan 2018 17:41:53 +0000 (12:41 -0500)]
bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is a dataclass or an instance of one. (#5113)

7 years agobpo-31993: Do not allocate large temporary buffers in pickle dump. (#4353)
Olivier Grisel [Sat, 6 Jan 2018 15:18:54 +0000 (16:18 +0100)]
bpo-31993: Do not allocate large temporary buffers in pickle dump. (#4353)

The picklers do no longer allocate temporary memory when dumping large
bytes and str objects into a file object. Instead the data is
directly streamed into the underlying file object.

Previously the C implementation would buffer all content and issue a
single call to file.write() at the end of the dump. With protocol 4
this behavior has changed to issue one call to file.write() per frame.

The Python pickler with protocol 4 now dumps each frame content as a
memoryview to an IOBytes instance that is never reused and the
memoryview is no longer released after the call to write. This makes it
possible for the file object to delay access to the memoryview of
previous frames without forcing any additional memory copy as was
already possible with the C pickler.

7 years agoCleanup grammar in unittest.mock.seal documentation (#5107)
Paul Ganssle [Sat, 6 Jan 2018 13:25:34 +0000 (08:25 -0500)]
Cleanup grammar in unittest.mock.seal documentation (#5107)

7 years agobpo-32206: Pdb can now run modules (GH-4752)
Mario Corchero [Sat, 6 Jan 2018 07:53:05 +0000 (07:53 +0000)]
bpo-32206: Pdb can now run modules (GH-4752)

Add a new argument "-m" to the pdb module to allow
users to run `python -m pdb -m my_module_name`.

This relies on private APIs in the runpy module to work,
but we can get away with that since they're both part of
the standard library and can be updated together if
the runpy internals get refactored.

7 years agobpo-29137: Remove fpectl module (#4789)
Nathaniel J. Smith [Sat, 6 Jan 2018 07:15:34 +0000 (23:15 -0800)]
bpo-29137: Remove fpectl module (#4789)

This module has never been enabled by default, never worked correctly
on x86-64, and caused ABI problems that caused C extension
compatibility. See bpo-29137 for details/discussion.

7 years agobpo-32390: Fix compilation failure on AIX after f_fsid was added to os.statvfs()...
Michael Felt [Fri, 5 Jan 2018 12:01:58 +0000 (13:01 +0100)]
bpo-32390: Fix compilation failure on AIX after f_fsid was added to os.statvfs() (#4972)

7 years agobpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error...
Thomas Moreau [Fri, 5 Jan 2018 10:15:54 +0000 (11:15 +0100)]
bpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error (#3895)

Fix deadlocks in :class:`concurrent.futures.ProcessPoolExecutor` when task arguments or results cause pickling or unpickling errors.
This should make sure that calls to the :class:`ProcessPoolExecutor` API always eventually return.

7 years agoadvance copyright years to 2018 (#5094)
Benjamin Peterson [Fri, 5 Jan 2018 06:34:19 +0000 (22:34 -0800)]
advance copyright years to 2018 (#5094)

7 years agobpo-32226: Make __class_getitem__ an automatic class method. (#5098)
Serhiy Storchaka [Thu, 4 Jan 2018 22:21:41 +0000 (00:21 +0200)]
bpo-32226: Make __class_getitem__ an automatic class method. (#5098)

7 years agobpo-31672: Restore the former behavior when override flags in Template. (#5099)
Serhiy Storchaka [Thu, 4 Jan 2018 17:20:11 +0000 (19:20 +0200)]
bpo-31672: Restore the former behavior when override flags in Template. (#5099)

Overriding flags to 0 will make the default pattern matching only
lower case letters.

7 years agoFix outdated comment in typeobject.c (GH-5090)
Berker Peksag [Thu, 4 Jan 2018 10:24:45 +0000 (13:24 +0300)]
Fix outdated comment in typeobject.c (GH-5090)

The comment was added in 3abca127fe1565ec80f6b0a1ae48d65186ad887d.
In d78448e912126410117723c7d240bbdfff06df16, it was changed to
use PyArg_ParseTuple instead.

7 years agobpo-31778: Make ast.literal_eval() more strict. (#4035)
Serhiy Storchaka [Thu, 4 Jan 2018 09:15:39 +0000 (11:15 +0200)]
bpo-31778: Make ast.literal_eval() more strict. (#4035)

Addition and subtraction of arbitrary numbers no longer allowed.

7 years agobpo-32308: Replace empty matches adjacent to a previous non-empty match in re.sub...
Serhiy Storchaka [Thu, 4 Jan 2018 09:06:13 +0000 (11:06 +0200)]
bpo-32308: Replace empty matches adjacent to a previous non-empty match in re.sub(). (#4846)

7 years agobpo-32482: Fix suspicious code in tests for syntax and grammar. (#5086)
Serhiy Storchaka [Thu, 4 Jan 2018 08:36:35 +0000 (10:36 +0200)]
bpo-32482: Fix suspicious code in tests for syntax and grammar. (#5086)

7 years agoIgnore importlib.h for automatic review requests from the import team. (GH-5087)
Brett Cannon [Wed, 3 Jan 2018 19:32:22 +0000 (11:32 -0800)]
Ignore importlib.h for automatic review requests from the import team. (GH-5087)

Otherwise the import team gets flagged for reviews any time the bytecode for
importlib.h changes (e.g new bytecode, optimizations, etc.).

7 years agobpo-32452: clarify term 'brackets' in generator tutorial (#5079)
Emily Morehouse [Tue, 2 Jan 2018 01:34:53 +0000 (18:34 -0700)]
bpo-32452: clarify term 'brackets' in generator tutorial (#5079)

Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (#5079)

7 years agobpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (#5078)
Serhiy Storchaka [Tue, 2 Jan 2018 00:38:35 +0000 (02:38 +0200)]
bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (#5078)

7 years agobpo-32416: Add two new tests in test_sys_settrace. (#5072)
Serhiy Storchaka [Mon, 1 Jan 2018 17:39:38 +0000 (19:39 +0200)]
bpo-32416: Add two new tests in test_sys_settrace. (#5072)

Move other test to more proper place.

7 years agobpo-32468: Better frame repr() (#5067)
Antoine Pitrou [Sun, 31 Dec 2017 21:35:22 +0000 (22:35 +0100)]
bpo-32468: Better frame repr() (#5067)

bpo-32468: Better frame repr()

7 years agocloses bpo-32460: ensure all non-static globals have initializers (#5061)
Benjamin Peterson [Sun, 31 Dec 2017 18:04:13 +0000 (10:04 -0800)]
closes bpo-32460: ensure all non-static globals have initializers (#5061)

7 years agoAdd missing backslashes in PCbuild bat files (GH-5056)
Zachary Ware [Sat, 30 Dec 2017 23:17:36 +0000 (17:17 -0600)]
Add missing backslashes in PCbuild bat files (GH-5056)

7 years agobpo-32399: Starting with AIX6.1 there is support in libc.a for uuid (RFC4122) (#4974)
Michael Felt [Sat, 30 Dec 2017 21:39:20 +0000 (22:39 +0100)]
bpo-32399: Starting with AIX6.1 there is support in libc.a for uuid (RFC4122) (#4974)

Starting with AIX6.1 there is support in libc.a for uuid (RFC4122)
This patch provides the changes needed for this integration with the OS.

On AIX the base function is uuid_create() rather than uuid_generate_time()
The AIX uuid_t typedef is more aligned to the UUID field based definition
while the Linux typedef that is more aligned with UUID bytes
(or perhaps UUID bytes_le) definitions.

7 years agobpo-32458: Temporarily mask start-tls proactor test on Windows (#5054)
Yury Selivanov [Sat, 30 Dec 2017 20:40:20 +0000 (15:40 -0500)]
bpo-32458: Temporarily mask start-tls proactor test on Windows (#5054)

7 years agobpo-32248 - Implement importlib.resources (#4911)
Barry Warsaw [Sat, 30 Dec 2017 20:18:06 +0000 (15:18 -0500)]
bpo-32248 - Implement importlib.resources (#4911)

Port importlib_resources to importlib.resources

7 years agobpo-32418: Postfix, raise NotImplementdError and close resources in tests (#5052)
Andrew Svetlov [Sat, 30 Dec 2017 16:52:56 +0000 (18:52 +0200)]
bpo-32418: Postfix, raise NotImplementdError and close resources in tests (#5052)

7 years agobpo-32418: Add get_loop() method on Server, AbstractServer classes (#4997)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Sat, 30 Dec 2017 15:09:32 +0000 (20:39 +0530)]
bpo-32418: Add get_loop() method on Server, AbstractServer classes (#4997)

* Add abstract get_loop() method to Server, AbstractServer classes.
* Add test cases for get_loop() method in Server, AbstractServer classes
* Add documentation for get_loop() method

7 years agoFix typo (#5049)
Andrew Svetlov [Sat, 30 Dec 2017 13:40:27 +0000 (15:40 +0200)]
Fix typo (#5049)

7 years agobpo-32439: Clean up the code for compiling comparison expressions. (#5029)
Serhiy Storchaka [Sat, 30 Dec 2017 07:47:42 +0000 (09:47 +0200)]
bpo-32439: Clean up the code for compiling comparison expressions. (#5029)

7 years agobpo-23749: Implement loop.start_tls() (#5039)
Yury Selivanov [Sat, 30 Dec 2017 05:35:36 +0000 (00:35 -0500)]
bpo-23749: Implement loop.start_tls() (#5039)

7 years agoreturn the new file descriptor from os.dup2 (closes bpo-32441) (#5041)
Benjamin Peterson [Fri, 29 Dec 2017 21:13:06 +0000 (13:13 -0800)]
return the new file descriptor from os.dup2 (closes bpo-32441) (#5041)

7 years agobpo-32427: Expose dataclasses.MISSING object. (#5045)
Eric V. Smith [Fri, 29 Dec 2017 18:59:58 +0000 (13:59 -0500)]
bpo-32427: Expose dataclasses.MISSING object. (#5045)

7 years agoremove unused import (#5040)
Benjamin Peterson [Fri, 29 Dec 2017 07:24:40 +0000 (23:24 -0800)]
remove unused import (#5040)

7 years agomake PatternCompiler use the packaged grammar if possible (more bpo-24960) (#5034)
Benjamin Peterson [Fri, 29 Dec 2017 01:54:12 +0000 (17:54 -0800)]
make PatternCompiler use the packaged grammar if possible (more bpo-24960) (#5034)

7 years agobpo-32440: Update the docs URL to https in help() (GH-5030)
oldk [Thu, 28 Dec 2017 14:37:46 +0000 (22:37 +0800)]
bpo-32440: Update the docs URL to https in help() (GH-5030)

In pydoc.py, the reference to Python' documentation was in http.
The link has been updated to use https.

7 years agoFix minor spelling error in test_sys_settrace.py. (#5025)
gfyoung [Thu, 28 Dec 2017 08:28:25 +0000 (00:28 -0800)]
Fix minor spelling error in test_sys_settrace.py. (#5025)

7 years agobpo-32416: Refactor tests for the f_lineno setter and add new tests. (#4991)
Serhiy Storchaka [Tue, 26 Dec 2017 22:38:56 +0000 (00:38 +0200)]
bpo-32416: Refactor tests for the f_lineno setter and add new tests. (#4991)

7 years agobpo-32259: Make a TypeError message when unpack non-iterable more specific. (#4903)
Serhiy Storchaka [Tue, 26 Dec 2017 10:30:41 +0000 (12:30 +0200)]
bpo-32259: Make a TypeError message when unpack non-iterable more specific. (#4903)

7 years agobpo-26133: Fix typos (#5010)
Andrew Svetlov [Tue, 26 Dec 2017 09:53:38 +0000 (11:53 +0200)]
bpo-26133: Fix typos (#5010)

* Fix typos
* Change warning text
* Add test

7 years agobpo-31721: Allow Future._log_traceback to only be set to False (#5009)
Yury Selivanov [Mon, 25 Dec 2017 21:16:10 +0000 (16:16 -0500)]
bpo-31721: Allow Future._log_traceback to only be set to False (#5009)

7 years agobpo-32422: Reduce lru_cache memory usage (GH-5008)
INADA Naoki [Mon, 25 Dec 2017 17:03:24 +0000 (02:03 +0900)]
bpo-32422: Reduce lru_cache memory usage (GH-5008)

7 years agobpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)
Yury Selivanov [Mon, 25 Dec 2017 15:48:15 +0000 (10:48 -0500)]
bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)

7 years agobpo-32372: Move __debug__ optimization to the AST level. (#4925)
Serhiy Storchaka [Mon, 25 Dec 2017 10:47:50 +0000 (12:47 +0200)]
bpo-32372: Move __debug__ optimization to the AST level. (#4925)

7 years agobpo-29084: Exclude C API for OrderedDict from the limited C API. (#4900)
Serhiy Storchaka [Mon, 25 Dec 2017 00:08:42 +0000 (02:08 +0200)]
bpo-29084: Exclude C API for OrderedDict from the limited C API. (#4900)

7 years agobpo-26133: Clear signals list on interpreter finalizing (#5002)
Andrew Svetlov [Sun, 24 Dec 2017 11:50:03 +0000 (13:50 +0200)]
bpo-26133: Clear signals list on interpreter finalizing (#5002)