Commit Graph

101456 Commits

Author SHA1 Message Date
Miss Islington (bot) de755129a7
bpo-33199: Initialize ma_version_tag in PyDict_Copy (GH-6341)
(cherry picked from commit d1c82c5cc7)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-04-02 20:00:26 -07:00
Miss Islington (bot) fa91aff07c
bpo-33204: IDLE - revise and extend colorizer test. (GH-6347)
Followup to primary PR for the issue, GH-6344.
(cherry picked from commit 55966f3a0d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-04-02 09:03:52 -07:00
Miss Islington (bot) 6130675efe
bpo-33204: IDLE: consistently color invalid string prefixes (GH-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.
(cherry picked from commit da58533ac6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-04-01 23:09:18 -07:00
Miss Islington (bot) ab84572321
bpo-20104: Add os.posix_spawn documentation. (GH-6334)
(cherry picked from commit 79760ed256)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-04-01 12:13:37 -07:00
Miss Islington (bot) d063ad8962 Allow dynamic creation of generic dataclasses (GH-6319) (GH-6320)
(cherry picked from commit 5a7092de12)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2018-04-01 12:33:13 +01:00
Miss Islington (bot) 9e96e7b24e
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
(cherry picked from commit aa8e51f5eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-31 16:41:28 -07:00
Miss Islington (bot) 7dcfd6c663
Fix socket type in DatagramHandler documentation: TCP -> UDP (GH-6272)
(cherry picked from commit 233de021d9)

Co-authored-by: Mike DePalatis <mike@depalatis.net>
2018-03-30 00:48:45 -07:00
Miss Islington (bot) 2961717986 bpo-33182: Fix pointer types in _testembed (GH-6310) (GH-6311)
(cherry picked from commit 69f5c73311)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-03-30 16:24:03 +10:00
Miss Islington (bot) faa6f5c74c
bpo-33175: dataclasses should look up __set_name__ on class, not instance (GH-6305)
(cherry picked from commit 521995205a)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-29 08:32:36 -07:00
Ned Deily e557b5c479 bump to 3.7.0b3+ 2018-03-29 08:57:23 -04:00
Ned Deily 4e7efa9c6f 3.7.0b3 2018-03-29 07:57:55 -04:00
Ned Deily 7a6f59e123
bpo-32726: macOS 10.6+ installer now builds Tcl/TK 8.6 (GH-6308)
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.
2018-03-29 07:41:11 -04:00
Miss Islington (bot) a470b7462d Fix typos '.::' should typically just be '::'. (GH-6165) (GH-6300)
(cherry picked from commit 78553138be)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-29 04:34:44 -04:00
Miss Islington (bot) a48614bee5 FIX documentation and NEWS of ThreadedHTTPServer. (GH-6207) (GH-6302)
(cherry picked from commit 79c3bab35c)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-29 04:33:47 -04:00
Serhiy Storchaka fd93666c8a
[3.7] Fix duplicating words words. (GH-6296) (GH-6297)
Most of them have been added in 3.7.
(cherry picked from commit bac2d5ba30)
2018-03-28 23:05:24 +03:00
Miss Islington (bot) 6124d8ec0d bpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6294)
(cherry picked from commit aa50bf08e6)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2018-03-28 17:50:24 +02:00
Miss Islington (bot) 6cb556ffa6
s/the the/the/ (GH-6287)
(cherry picked from commit 40a536be53)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-03-28 06:23:32 -07:00
Miss Islington (bot) b9172b9630 [3.7] bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6283)
(cherry picked from commit c0518cde7a)

Co-authored-by: Ned Deily <nad@python.org>
2018-03-28 04:49:24 -04:00
Miss Islington (bot) 39c0ef5171 bpo-32726: Do not force IDLE.app to launch in 32-bit mode. (GH-6280)
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.
(cherry picked from commit df532ab752)

Co-authored-by: Ned Deily <nad@python.org>
2018-03-28 04:16:23 -04:00
Miss Islington (bot) d2d5bd8bc4 bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276) (#6277)
(cherry picked from commit e52ac04597)

Co-authored-by: Ned Deily <nad@python.org>
2018-03-28 02:39:19 -04:00
Miss Islington (bot) 211c0dbc6a Fix senfile typo (GH-6265) (#6274)
* Also in docs
(cherry picked from commit 65a34709f6)

Co-authored-by: Sam Dunster <me@sdunster.com>
2018-03-27 18:34:15 -07:00
Ned Deily 6a2539c434
bpo-32517: re-enable test_read_pty_output on macOS (GH-6112) 2018-03-27 17:17:28 -04:00
Miss Islington (bot) fd1b8f87b3 bpo-33151: Handle submodule resources (GH-6268) (GH-6270)
(cherry picked from commit 30e507dff4)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-03-27 10:25:28 -07:00
Miss Islington (bot) f328caf4ca bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (#GH-6266)
(cherry picked from commit da1734c58d)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-26 19:23:34 -07:00
Miss Islington (bot) d0e04c8244
bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)
This also fixes python/typingGH-512
This also fixes python/typingGH-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  GH- 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
(cherry picked from commit 834940375a)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2018-03-26 15:29:06 -07:00
Miss Islington (bot) 05455637f3
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.
(cherry picked from commit 0e7144b064)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
2018-03-26 13:14:09 -07:00
Miss Islington (bot) c6147acd2c
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.
(cherry picked from commit de7a2f04d6)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-26 10:55:13 -07:00
Miss Islington (bot) 00765bb6ae
Fix error message in sqlite connection thread check. (GH-6028)
(cherry picked from commit 030345c0bf)

Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
2018-03-26 09:01:22 -07:00
Miss Islington (bot) d01a805a38
Corrected link targets in collections.rst (GH-1052)
(cherry picked from commit e105294708)

Co-authored-by: Michael Seifert <michaelseifert04@yahoo.de>
2018-03-26 05:52:35 -07:00
Miss Islington (bot) 7aef29779f
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.
(cherry picked from commit e6223579c8)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
2018-03-26 05:09:23 -07:00
Miss Islington (bot) daf06e08da
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
(cherry picked from commit 95ad3822a2)

Co-authored-by: Neeraj Badlani <neerajbadlani@gmail.com>
2018-03-26 04:26:34 -07:00
Miss Islington (bot) a6c3299605
Fix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251)
(cherry picked from commit 0301c9bdd1)

Co-authored-by: Stefano Taschini <taschini@users.noreply.github.com>
2018-03-26 03:58:10 -07:00
Miss Islington (bot) a7b1b847f6
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.
(cherry picked from commit 3ab44c0783)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
2018-03-26 01:19:52 -07:00
Miss Islington (bot) 5fc6fc85c4
Minor fixes to dataclass tests. (GH-6243)
Also, re-enable a test for ClassVars with default_factory.
(cherry picked from commit 2b75fc2bc9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-25 18:00:43 -07:00
Miss Islington (bot) bc3e009f65
Clarify fd inheritance when close_fds=False. (GH-6240)
Clarify the subprocess documentation.
(cherry picked from commit dfb6e54dd8)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-03-25 10:40:38 -07:00
Nick Coghlan ee3784594b
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)
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.

(cherry picked from commit d5d9e02dd3)
2018-03-25 23:43:50 +10:00
Miss Islington (bot) 5666a55da8
Trivial improvements to dataclasses tests. (GH-6234)
(cherry picked from commit 51c9ab42ab)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-25 06:27:50 -07:00
Miss Islington (bot) 2dd885eaa0 [3.7] bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229) (GH-6230)
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>
(cherry picked from commit d02ac25ab0)

Co-authored-by: Christian Heimes <christian@python.org>
2018-03-25 13:28:20 +02:00
Miss Islington (bot) c6d94c37f4
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
(cherry picked from commit bc77eff8b9)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-03-25 04:27:57 -07:00
Miss Islington (bot) 291d5f3e71
bpo-32943: Fix confusing error message for rot13 codec (GH-5869)
(cherry picked from commit e4ce9fa89c)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-03-24 21:30:39 -07:00
Miss Islington (bot) 5729b9c0e9
Fix invalid escape sequence: use raw string. (GH-6225)
(cherry picked from commit c42e7aa67c)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-24 20:23:00 -07:00
Miss Islington (bot) 9989efbb65
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.
(cherry picked from commit 01d618c560)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-24 19:31:29 -07:00
Miss Islington (bot) 02c19a6fc0
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.
(cherry picked from commit f96ddade00)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-24 14:42:28 -07:00
Miss Islington (bot) 471364b4d9
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)
(cherry picked from commit a95d98607e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-24 14:27:06 -07:00
Miss Islington (bot) 42bd62bc87 [3.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6213)
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>
(cherry picked from commit 4ca0739c9d)

Co-authored-by: Christian Heimes <christian@python.org>
2018-03-24 18:37:54 +01:00
Miss Islington (bot) 1a0bb626f4 [3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212)
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>
(cherry picked from commit e42ae91509)

Co-authored-by: Christian Heimes <christian@python.org>
2018-03-24 15:59:16 +01:00
Ivan Levkivskyi ac5602746e
bpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127) (#6162) 2018-03-23 21:44:54 +00:00
Miss Islington (bot) 45738ede5a
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
(cherry picked from commit 5cbb84106e)

Co-authored-by: Himanshu Lakhara <himanshulakhara1947@gmail.com>
2018-03-23 14:41:26 -07:00
Miss Islington (bot) f8d2c3cf5f
bpo-31639: Use threads in http.server module. (GH-5018)
(cherry picked from commit 8bcfa02e4b)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-23 13:31:20 -07:00
Miss Islington (bot) 67d3f8b85a Fix a reference to the MRE book in re docs (GH-1113)
Reported by Maksym Nikulyak on docs.p.o.
(cherry picked from commit a0a42d22d8)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-03-23 18:55:26 +03:00