]> granicus.if.org Git - python/log
python
6 years agoFix misleading docsting of shelve.open(). (GH-6427)
Serhiy Storchaka [Mon, 9 Apr 2018 14:16:01 +0000 (17:16 +0300)]
Fix misleading docsting of shelve.open(). (GH-6427)

The protocol parameter can be any protocol supported by the
pickle module.

6 years agoUpdate docstring of tempfile._RandomNameSequence (GH-6414)
Wolfgang Maier [Mon, 9 Apr 2018 00:42:39 +0000 (02:42 +0200)]
Update docstring of tempfile._RandomNameSequence (GH-6414)

When bpo-12015 got resolved by increasing the length of the
random string generated by _RandomNameSequence from six to eight
characters, the docstring of the class was not adjusted accordingly.

6 years agoImprove highlighting of some code blocks. (GH-6401)
Serhiy Storchaka [Sun, 8 Apr 2018 16:18:04 +0000 (19:18 +0300)]
Improve highlighting of some code blocks. (GH-6401)

6 years agoAdd a prepend() recipe to teach a chain() idiom (GH-6415)
Raymond Hettinger [Sun, 8 Apr 2018 15:44:20 +0000 (08:44 -0700)]
Add a prepend() recipe to teach a chain() idiom (GH-6415)

6 years agobpo-29613: Added support for SameSite cookies (GH-6413)
Alex Gaynor [Sat, 7 Apr 2018 20:09:42 +0000 (16:09 -0400)]
bpo-29613: Added support for SameSite cookies (GH-6413)

* bpo-29613: Added support for SameSite cookies

Implemented as per draft
https://tools.ietf.org/html/draft-west-first-party-cookies-07

* Documented SameSite

And suggestions by members.

* Missing space :(

* Updated News and contributors

* Added version changed details.

* Fix in documentation

* fix in documentation

* Clubbed test cases for same attribute into single.

* Updates

* Style nits + expand tests

* review feedback

6 years agobpo-33201: Modernize "Extension types" doc (GH-6337)
Antoine Pitrou [Sat, 7 Apr 2018 16:14:03 +0000 (18:14 +0200)]
bpo-33201: Modernize "Extension types" doc (GH-6337)

* bpo-33201: Modernize "Extension types" doc
* Split tutorial and other topics
* Some small fixes
* Address some review comments
* Rename noddy* to custom* and shoddy to sublist
* Fix markup

6 years agobpo-33184: Update macOS installer build to use OpenSSL 1.1.0h. (GH-6407)
Ned Deily [Sat, 7 Apr 2018 06:36:02 +0000 (02:36 -0400)]
bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h. (GH-6407)

6 years agobpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179)
Jay Crotts [Sat, 7 Apr 2018 01:27:07 +0000 (20:27 -0500)]
bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179)

6 years agobpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating...
Brett Cannon [Fri, 6 Apr 2018 23:10:18 +0000 (16:10 -0700)]
bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402)

An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.

6 years agobpo-29673: fix gdb scripts pystack and pystackv (GH-6126)
Marcel Plch [Fri, 6 Apr 2018 21:22:04 +0000 (23:22 +0200)]
bpo-29673: fix gdb scripts pystack and pystackv (GH-6126)

6 years agofixed capitalization of class name (GH-6396)
Alex Gaynor [Fri, 6 Apr 2018 12:26:49 +0000 (08:26 -0400)]
fixed capitalization of class name (GH-6396)

6 years agobpo-33231: Fix potential leak in normalizestring() (GH-6386)
INADA Naoki [Fri, 6 Apr 2018 06:51:24 +0000 (15:51 +0900)]
bpo-33231: Fix potential leak in normalizestring() (GH-6386)

6 years agobpo-33224: PEP 479 fix for difflib.mdiff() (GH-6381)
Raymond Hettinger [Thu, 5 Apr 2018 18:19:57 +0000 (11:19 -0700)]
bpo-33224: PEP 479 fix for difflib.mdiff() (GH-6381)

6 years agobpo-15817: Expose command documentation to gdb help (GH-6384)
Skip Montanaro [Thu, 5 Apr 2018 17:34:44 +0000 (12:34 -0500)]
bpo-15817: Expose command documentation to gdb help (GH-6384)

Original patch by Alexander Belopolsky.  Patch by Skip Montanaro.

6 years agobpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338)
Wolfgang Maier [Thu, 5 Apr 2018 15:19:44 +0000 (17:19 +0200)]
bpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338)

6 years agoClean up and enhance frozen dataclass tests. (GH-6380)
Eric V. Smith [Thu, 5 Apr 2018 10:50:18 +0000 (06:50 -0400)]
Clean up and enhance frozen dataclass tests. (GH-6380)

* Add a test for frozen with unhashable field value.
* Improve a comment.

6 years agoAdd a webhook for Zulip to the Travis configuration (GH-6379)
Brett Cannon [Thu, 5 Apr 2018 02:12:39 +0000 (19:12 -0700)]
Add a webhook for Zulip to the Travis configuration (GH-6379)

6 years agobpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)
Ivan Levkivskyi [Thu, 5 Apr 2018 00:25:15 +0000 (01:25 +0100)]
bpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)

This removes a hack and replaces it with a proper
mapping {'list': 'List', 'dict': 'Dict', ...}.

6 years agoCall super in Generic.__init_subclass__ (#6356)
Ivan Levkivskyi [Wed, 4 Apr 2018 16:00:15 +0000 (17:00 +0100)]
Call super in Generic.__init_subclass__ (#6356)

6 years agobpo-29922: Add more tests for error messages in 'async with'. (GH-6370)
Serhiy Storchaka [Wed, 4 Apr 2018 15:45:10 +0000 (18:45 +0300)]
bpo-29922: Add more tests for error messages in 'async with'. (GH-6370)

Different paths are executed for normal exit and for leaving
the 'async with' block with 'break', 'continue' or 'return'.

6 years agobpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4 (#6355)
Łukasz Langa [Wed, 4 Apr 2018 06:06:53 +0000 (23:06 -0700)]
bpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4 (#6355)

This makes performance better and produces shorter pickles. This change is backwards compatible up to the oldest currently supported version of Python (3.4).

6 years agobpo-33195: Doc: Deprecate Py_UNICODE in c-api/arg (GH-6329)
INADA Naoki [Wed, 4 Apr 2018 04:59:08 +0000 (13:59 +0900)]
bpo-33195: Doc: Deprecate Py_UNICODE in c-api/arg (GH-6329)

Py_UNICODE is deprecated since Python 3.3.
But the deprecation is missed in the c-api/arg document.

6 years agobpo-32337: Update documentats about dict order (GH-4973)
hui shang [Wed, 4 Apr 2018 04:55:05 +0000 (12:55 +0800)]
bpo-32337: Update documentats about dict order (GH-4973)

6 years agobpo-33209: End framing at the end of C implementation of pickle.Pickler.dump(). ...
Serhiy Storchaka [Tue, 3 Apr 2018 21:11:27 +0000 (00:11 +0300)]
bpo-33209: End framing at the end of C implementation of pickle.Pickler.dump(). (GH-6363)

6 years agobpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001)
INADA Naoki [Tue, 3 Apr 2018 03:39:47 +0000 (12:39 +0900)]
bpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001)

6 years agocloses bpo-33202: fix os.walk mentioning os.listdir instead of os.scandir (GH-6335)
Andrés Delfino [Tue, 3 Apr 2018 02:48:54 +0000 (23:48 -0300)]
closes bpo-33202: fix os.walk mentioning os.listdir instead of os.scandir (GH-6335)

6 years agobpo-33199: Initialize ma_version_tag in PyDict_Copy (GH-6341)
INADA Naoki [Tue, 3 Apr 2018 02:43:53 +0000 (11:43 +0900)]
bpo-33199: Initialize ma_version_tag in PyDict_Copy (GH-6341)

6 years agobpo-29922: Improve error messages in 'async with' (GH-6352)
Serhiy Storchaka [Mon, 2 Apr 2018 22:41:38 +0000 (01:41 +0300)]
bpo-29922: Improve error messages in 'async with' (GH-6352)

when __aenter__() or __aexit__() return non-awaitable object.

6 years agobpo-33204: IDLE - revise and extend colorizer test. (GH-6347)
Terry Jan Reedy [Mon, 2 Apr 2018 15:18:02 +0000 (11:18 -0400)]
bpo-33204: IDLE - revise and extend colorizer test. (GH-6347)

Followup to primary PR for the issue, GH-6344.

6 years agobpo-33204: IDLE: consistently color invalid string prefixes (#6344)
Terry Jan Reedy [Mon, 2 Apr 2018 05:47:46 +0000 (01:47 -0400)]
bpo-33204: IDLE: consistently color invalid string prefixes (#6344)

A 'u' string prefix cannot be paired with either 'r' or 'f'.  Consistently
color as much of the prefix, starting at the right, as is valid.

6 years agobpo-20104: Add os.posix_spawn documentation. (#6334)
Gregory P. Smith [Sun, 1 Apr 2018 19:01:48 +0000 (12:01 -0700)]
bpo-20104: Add os.posix_spawn documentation. (#6334)

6 years agobpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
Serhiy Storchaka [Sat, 31 Mar 2018 21:29:37 +0000 (00:29 +0300)]
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)

6 years agoAllow dynamic creation of generic dataclasses (GH-6319)
Ivan Levkivskyi [Sat, 31 Mar 2018 12:41:17 +0000 (13:41 +0100)]
Allow dynamic creation of generic dataclasses (GH-6319)

6 years agoFix socket type in DatagramHandler documentation: TCP -> UDP (GH-6272)
Mike DePalatis [Fri, 30 Mar 2018 07:36:06 +0000 (03:36 -0400)]
Fix socket type in DatagramHandler documentation: TCP -> UDP (GH-6272)

6 years agobpo-33182: Fix pointer types in _testembed (GH-6310)
Nick Coghlan [Fri, 30 Mar 2018 05:36:42 +0000 (15:36 +1000)]
bpo-33182: Fix pointer types in _testembed (GH-6310)

6 years agobpo-33175: dataclasses should look up __set_name__ on class, not instance (GH-6305)
Eric V. Smith [Thu, 29 Mar 2018 15:07:48 +0000 (11:07 -0400)]
bpo-33175: dataclasses should look up __set_name__ on class, not instance (GH-6305)

6 years agobpo-32726: macOS 10.6+ installer now builds Tcl/TK 8.6 (GH-6307)
Ned Deily [Thu, 29 Mar 2018 12:47:27 +0000 (08:47 -0400)]
bpo-32726: macOS 10.6+ installer now builds Tcl/TK 8.6 (GH-6307)

Build and link with private copy of Tcl/Tk 8.6 for the macOS 10.6+
installer. The 10.9+ installer variant already does this.  This means that
the Python 3.7 provided by the python.org macOS installers no longer need or
use any external versions of Tcl/Tk, either system-provided or user-
installed, such as ActiveTcl.

6 years agoFIX documentation and NEWS of ThreadedHTTPServer. (GH-6207)
Julien Palard [Wed, 28 Mar 2018 21:24:58 +0000 (23:24 +0200)]
FIX documentation and NEWS of ThreadedHTTPServer. (GH-6207)

6 years agoFix typos '.::' should typically just be '::'. (GH-6165)
Julien Palard [Wed, 28 Mar 2018 21:14:15 +0000 (23:14 +0200)]
Fix typos '.::' should typically just be '::'. (GH-6165)

6 years agoFix duplicating words words. (GH-6296)
Serhiy Storchaka [Wed, 28 Mar 2018 19:14:26 +0000 (22:14 +0300)]
Fix duplicating words words. (GH-6296)

Most of them have been added in 3.7.

6 years agobpo-33126: Document PyBuffer_ToContiguous() (#6292)
Antoine Pitrou [Wed, 28 Mar 2018 15:26:32 +0000 (17:26 +0200)]
bpo-33126: Document PyBuffer_ToContiguous() (#6292)

6 years agos/the the/the/ (GH-6287)
INADA Naoki [Wed, 28 Mar 2018 13:07:57 +0000 (22:07 +0900)]
s/the the/the/ (GH-6287)

6 years agobpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6282)
Ned Deily [Wed, 28 Mar 2018 08:46:35 +0000 (04:46 -0400)]
bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6282)

6 years agobpo-32726: Do not force IDLE.app to launch in 32-bit mode. (GH-6279)
Ned Deily [Wed, 28 Mar 2018 07:44:48 +0000 (03:44 -0400)]
bpo-32726: Do not force IDLE.app to launch in 32-bit mode. (GH-6279)

Forcing the macOS IDLE.app gui process to launch in 32-mode was
a necessary hack for old versions of Tk (Aqua Carbon as in Tk 8.4
and early versions of 8.5); it is not needed for current versions
of Tk.  Since 32-bit launching will no longer be supported on
future releases of macOS, allow IDLE.app to launch in 64-bit mode.

6 years agobpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)
Ned Deily [Wed, 28 Mar 2018 05:57:13 +0000 (01:57 -0400)]
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)

6 years agoFix senfile typo (#6265)
Sam Dunster [Wed, 28 Mar 2018 00:47:38 +0000 (17:47 -0700)]
Fix senfile typo (#6265)

* Also in docs

6 years agobpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037) (GH-6113)
Ned Deily [Tue, 27 Mar 2018 21:16:49 +0000 (17:16 -0400)]
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037) (GH-6113)

test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e)

Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
Also, re-enable test_read_pty_output on macOS.

6 years agobpo-33151: Handle submodule resources (GH-6268)
Barry Warsaw [Tue, 27 Mar 2018 16:59:38 +0000 (09:59 -0700)]
bpo-33151: Handle submodule resources (GH-6268)

6 years agobpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195)
Cheryl Sabella [Tue, 27 Mar 2018 01:29:33 +0000 (21:29 -0400)]
bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195)

6 years agobpo-32873: Treat type variables and special typing forms as immutable by copy and...
Ivan Levkivskyi [Mon, 26 Mar 2018 22:01:12 +0000 (23:01 +0100)]
bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

This also fixes python/typing#512
This also fixes python/typing#511

As was discussed in both issues, some typing forms deserve to be treated
as immutable by copy and pickle modules, so that:
* copy(X) is X
* deepcopy(X) is X
* loads(dumps(X)) is X  # pickled by reference

This PR adds such behaviour to:
* Type variables
* Special forms like Union, Any, ClassVar
* Unsubscripted generic aliases to containers like List, Mapping, Iterable

This not only resolves inconsistencies mentioned in the issues, but also
improves backwards compatibility with previous versions of Python
(including 3.6).

Note that this requires some dances with __module__ for type variables
(similar to NamedTuple) because the class TypeVar itself is define in typing,
while type variables should get module where they were defined.

https://bugs.python.org/issue32873

6 years agobpo-32844: Fix a subprocess misredirection of a low fd (GH5689)
Alexey Izbyshev [Mon, 26 Mar 2018 19:49:35 +0000 (22:49 +0300)]
bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)

bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.

When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.

6 years agobpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument...
Eric V. Smith [Mon, 26 Mar 2018 17:29:16 +0000 (13:29 -0400)]
bpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument. (GH-6260)

This is part of PEP 487 and the descriptor protocol.

6 years agoFix error message in sqlite connection thread check. (GH-6028)
Takuya Akiba [Mon, 26 Mar 2018 15:14:00 +0000 (00:14 +0900)]
Fix error message in sqlite connection thread check. (GH-6028)

6 years agobpo-6986: Add a comment to clarify a test of _json.make_encoder(). (GH-3789)
Oren Milman [Mon, 26 Mar 2018 15:04:39 +0000 (18:04 +0300)]
bpo-6986: Add a comment to clarify a test of _json.make_encoder(). (GH-3789)

6 years agoCorrected link targets in collections.rst (GH-1052)
Michael Seifert [Mon, 26 Mar 2018 11:40:35 +0000 (13:40 +0200)]
Corrected link targets in collections.rst (GH-1052)

6 years agoFix description about SimpleXMLRPCServer constructor parameter bind_and_activate...
cocoatomo [Mon, 26 Mar 2018 11:03:40 +0000 (20:03 +0900)]
Fix description about SimpleXMLRPCServer constructor parameter bind_and_activate. (GH-776)

Passing True as the `bind_and_activate` *do* immediately opening and binding to their socket.

6 years agoGitignore gmon.out (GH-5796)
Neeraj Badlani [Mon, 26 Mar 2018 10:11:47 +0000 (03:11 -0700)]
Gitignore gmon.out (GH-5796)

gmon.out is generated when profiling turned on

Full Configuration:
./configure --prefix=$PWD/install --enable-profiling  --enable-big-digits=30
--with-pydebug --with-assertions  --with-valgrind

6 years agoFix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251)
Stefano Taschini [Mon, 26 Mar 2018 09:41:30 +0000 (11:41 +0200)]
Fix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251)

6 years agobpo-33096: Fix ttk.Treeview.insert. (GH-6228)
Garvit Khatri [Mon, 26 Mar 2018 07:02:05 +0000 (12:32 +0530)]
bpo-33096: Fix ttk.Treeview.insert. (GH-6228)

Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.

6 years agoMinor fixes to dataclass tests. (GH-6243)
Eric V. Smith [Mon, 26 Mar 2018 00:37:33 +0000 (20:37 -0400)]
Minor fixes to dataclass tests. (GH-6243)

 Also, re-enable a test for ClassVars with default_factory.

6 years agoClarify fd inheritance when close_fds=False. (GH-6240)
Gregory P. Smith [Sun, 25 Mar 2018 17:27:59 +0000 (10:27 -0700)]
Clarify fd inheritance when close_fds=False. (GH-6240)

Clarify the subprocess documentation.

6 years agobpo-33053: Remove test_cmd_line_script debugging print (GH-6237)
Nick Coghlan [Sun, 25 Mar 2018 13:47:54 +0000 (23:47 +1000)]
bpo-33053: Remove test_cmd_line_script debugging print (GH-6237)

I noticed this had slipped into the original commit when
resolving a merge conflict for the backport to 3.7.

6 years agoTrivial improvements to dataclasses tests. (GH-6234)
Eric V. Smith [Sun, 25 Mar 2018 13:04:32 +0000 (09:04 -0400)]
Trivial improvements to dataclasses tests. (GH-6234)

6 years agobpo-33053: -m now adds *starting* directory to sys.path (GH-6231)
Nick Coghlan [Sun, 25 Mar 2018 13:03:10 +0000 (23:03 +1000)]
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231)

Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.

6 years agobpo-33042: Fix pre-initialization sys module configuration (GH-6157)
Nick Coghlan [Sun, 25 Mar 2018 10:44:30 +0000 (20:44 +1000)]
bpo-33042: Fix pre-initialization sys module configuration (GH-6157)

- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
  called before Py_Initialize
- also enhanced the existing embedding test cases
  to check for expected settings in the sys module

6 years agobpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229)
Christian Heimes [Sun, 25 Mar 2018 10:36:13 +0000 (12:36 +0200)]
bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229)

Harden ssl module against LibreSSL CVE-2018-8970.
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test
ensures that NULL bytes are not allowed.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-32943: Fix confusing error message for rot13 codec (GH-5869)
Xiang Zhang [Sun, 25 Mar 2018 04:09:21 +0000 (12:09 +0800)]
bpo-32943: Fix confusing error message for rot13 codec (GH-5869)

6 years agoFix invalid escape sequence: use raw string. (GH-6225)
Eric V. Smith [Sun, 25 Mar 2018 03:02:21 +0000 (23:02 -0400)]
Fix invalid escape sequence: use raw string. (GH-6225)

6 years agobpo-33134: dataclasses: use function dispatch table for hash, instead of a string...
Eric V. Smith [Sun, 25 Mar 2018 02:10:14 +0000 (22:10 -0400)]
bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222)

* Change _hash_action to be a function table lookup, instead of a list
of strings which is then tested with if statements.

6 years agoTrivial dataclass cleanups: (GH-6218)
Eric V. Smith [Sat, 24 Mar 2018 21:20:26 +0000 (17:20 -0400)]
Trivial dataclass cleanups: (GH-6218)

- When adding a single element to a list, use .append() instead of
  += and creating a new list.
- For consistency, import the copy module, instead of just deepcopy. This
  leaves only a module at the class level, instead of a function.
- Improve some comments.
- Improve some whitespace.
- Use tuples instead of lists.
- Simplify a test.

6 years agobpo-33132: Fix reference counting issues in the compiler. (GH-6209)
Serhiy Storchaka [Sat, 24 Mar 2018 20:42:35 +0000 (22:42 +0200)]
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)

6 years agobpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210)
Christian Heimes [Sat, 24 Mar 2018 14:41:37 +0000 (15:41 +0100)]
bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210)

LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
LibreSSL < 2.7.

Documentation updates and fixes for failing tests will be provided in
another patch set.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-24334: Remove inaccurate match_hostname call (#6211)
Christian Heimes [Sat, 24 Mar 2018 14:36:50 +0000 (15:36 +0100)]
bpo-24334: Remove inaccurate match_hostname call (#6211)

Commit 141c5e8c re-added match_hostname() call. The resurrection of the
function call was never intended and was solely a merge mistake.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-32932: More revealing error message when non-str objects in __all__ (GH-5848)
Xiang Zhang [Sat, 24 Mar 2018 10:39:36 +0000 (18:39 +0800)]
bpo-32932: More revealing error message when non-str objects in __all__ (GH-5848)

6 years agobpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
Himanshu Lakhara [Fri, 23 Mar 2018 21:26:35 +0000 (02:56 +0530)]
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)

6 years agobpo-31639: Use threads in http.server module. (GH-5018)
Julien Palard [Fri, 23 Mar 2018 16:40:33 +0000 (17:40 +0100)]
bpo-31639: Use threads in http.server module. (GH-5018)

6 years agoFix a reference to the MRE book in re docs (GH-1113)
Berker Peksag [Fri, 23 Mar 2018 13:46:52 +0000 (16:46 +0300)]
Fix a reference to the MRE book in re docs (GH-1113)

Reported by Maksym Nikulyak on docs.p.o.

6 years agobpo-30953: Improve error messages and add tests for jumping (GH-6196)
Serhiy Storchaka [Fri, 23 Mar 2018 12:46:45 +0000 (14:46 +0200)]
bpo-30953: Improve error messages and add tests for jumping (GH-6196)

into/out of an except block.

6 years agobpo-33041: Rework compiling an "async for" loop. (#6142)
Serhiy Storchaka [Fri, 23 Mar 2018 12:34:35 +0000 (14:34 +0200)]
bpo-33041: Rework compiling an "async for" loop. (#6142)

* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.

6 years agobpo-32999: ast: Convert useless check to assert (GH-6197)
INADA Naoki [Fri, 23 Mar 2018 09:19:34 +0000 (18:19 +0900)]
bpo-32999: ast: Convert useless check to assert (GH-6197)

6 years agobpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but...
Eric V. Smith [Thu, 22 Mar 2018 20:28:48 +0000 (16:28 -0400)]
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but doesn't have a type annotation. (GH-6192)

If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.

6 years agobpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189)
INADA Naoki [Thu, 22 Mar 2018 12:52:42 +0000 (21:52 +0900)]
bpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189)

bpo-33018 (GH-5944) fixed bpo-32999 too.  So fc7df0e6 is not required
anymore.  Revert it except test case.

6 years agobpo-33018: Improve issubclass() error checking and message. (GH-5944)
jab [Thu, 22 Mar 2018 11:26:06 +0000 (00:26 +1300)]
bpo-33018: Improve issubclass() error checking and message. (GH-5944)

This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.

6 years agoUpgrade pip to v9.0.3 and setuptools to v39.0.1 (#6184)
Donald Stufft [Thu, 22 Mar 2018 02:47:44 +0000 (22:47 -0400)]
Upgrade pip to v9.0.3 and setuptools to v39.0.1 (#6184)

6 years agoAdd 'Field' to dataclasses.__all__. (GH-6182)
Eric V. Smith [Wed, 21 Mar 2018 21:10:22 +0000 (17:10 -0400)]
Add 'Field' to dataclasses.__all__. (GH-6182)

- Add missing 'Field' to __all__.
- Improve tests to catch this.

6 years agoFIX failure on OSX sem_getvalue (#6180)
Thomas Moreau [Wed, 21 Mar 2018 17:56:27 +0000 (18:56 +0100)]
FIX failure on OSX sem_getvalue (#6180)

6 years agobpo-33078 - Fix queue size on pickling error (GH-6119)
Thomas Moreau [Wed, 21 Mar 2018 15:50:28 +0000 (16:50 +0100)]
bpo-33078 - Fix queue size on pickling error (GH-6119)

6 years agoFix typos in mmap() error messages (GH-6173)
Zackery Spytz [Wed, 21 Mar 2018 06:02:37 +0000 (00:02 -0600)]
Fix typos in mmap() error messages (GH-6173)

6 years agobpo-32896: Fix error when subclassing a dataclass with a field that uses a default_fa...
Eric V. Smith [Wed, 21 Mar 2018 02:00:23 +0000 (22:00 -0400)]
bpo-32896: Fix error when subclassing a dataclass with a field that uses a default_factory (GH-6170)

Fix the way that new annotations in a class are detected.

6 years agobpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
Xiang Zhang [Wed, 21 Mar 2018 00:25:13 +0000 (08:25 +0800)]
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)

The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.

6 years ago bpo-18802: Add more details to ipaddress documentation (GH-6083)
Cheryl Sabella [Wed, 21 Mar 2018 00:09:15 +0000 (20:09 -0400)]
 bpo-18802: Add more details to ipaddress documentation (GH-6083)

Original patch by Jon Foster and Berker Peksag.

6 years agobpo-28247: Document Windows executable creation in zipapp (GH-6158)
Cheryl Sabella [Tue, 20 Mar 2018 22:23:19 +0000 (18:23 -0400)]
bpo-28247: Document Windows executable creation in zipapp (GH-6158)

6 years agobpo-33034: Improve exception message when cast fails for {Parse,Split}Result.port...
Matt Eaton [Tue, 20 Mar 2018 06:41:37 +0000 (01:41 -0500)]
bpo-33034: Improve exception message when cast fails for {Parse,Split}Result.port (GH-6078)

6 years agobpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152)
Eric V. Smith [Tue, 20 Mar 2018 01:07:51 +0000 (21:07 -0400)]
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.

6 years agobpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127)
aetracht [Mon, 19 Mar 2018 18:41:32 +0000 (14:41 -0400)]
bpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127)

6 years agobpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived...
Eric V. Smith [Mon, 19 Mar 2018 00:40:34 +0000 (20:40 -0400)]
bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (#6147)

If a non-dataclass derives from a frozen dataclass, allow attributes to be set.
Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen.
Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes.

6 years agobpo-19417: Add test_bdb.py (GH-5217)
xdegaye [Sun, 18 Mar 2018 20:02:47 +0000 (21:02 +0100)]
bpo-19417: Add test_bdb.py (GH-5217)

6 years agoRevert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143)
Jelle Zijlstra [Sun, 18 Mar 2018 16:54:33 +0000 (09:54 -0700)]
Revert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143)

This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.

(Reverts only the lib2to3 part.)

6 years agobpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)
Serhiy Storchaka [Sun, 18 Mar 2018 07:56:52 +0000 (09:56 +0200)]
bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)

6 years agobpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)
Serhiy Storchaka [Sun, 18 Mar 2018 07:55:53 +0000 (09:55 +0200)]
bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)