Commit Graph

1450 Commits

Author SHA1 Message Date
Ned Deily e6183cc274
Minor edits to news entries for 3.7.3 (GH-12292) 2019-03-12 12:20:44 -04:00
Miss Islington (bot) 047f8f25b9 bpo-35132: Fixes missing target in gdb pep0393 check. (GH-11848) (GH-12284)
(cherry picked from commit 1ceb3a3d17)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2019-03-12 10:17:17 +01:00
Miss Islington (bot) 1c4580d1f5
[3.7] bpo-35931: Gracefully handle any exception in pdb debug command (GH-12103) (GH-12285)
This is relevant for `debug doesnotexist()`, which would crash with a
NameError otherwise.
(cherry picked from commit 3e936431e2)


Co-authored-by: Daniel Hahler <github@thequod.de>


https://bugs.python.org/issue35931
2019-03-11 21:00:59 -07:00
Miss Islington (bot) 24872e1e15
bpo-36234: Add more tests to PosixUidGidTests (GH-12234)
test_posix.PosixUidGidTests:

* Add tests for invalid uid/gid type (str)
* Add UID_OVERFLOW and GID_OVERFLOW constants to replace (1 << 32)

Initial patch written by David Malcolm.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
(cherry picked from commit 876e82b4f3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-03-11 06:18:40 -07:00
Miss Islington (bot) ea1627008e
bpo-36176: Fix IDLE autocomplete & calltip popup colors. (GH-12262)
Prevent conflicts with Linux dark themes
(and slightly darken calltip background).
(cherry picked from commit 491ef53c15)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-03-10 17:37:36 -07:00
Miss Islington (bot) 97c7d78fda
bpo-35647: Fix path check in cookiejar (GH-11436)
* Refactor cookie path check as per RFC 6265

* Add tests for prefix match of path

* Add news entry

* Fix set_ok_path and refactor tests

* Use slice for last letter
(cherry picked from commit 0e1f1f0105)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-10 10:30:35 -07:00
Miss Islington (bot) 87f5255cdc
bpo-21314: Add a FAQ entry about positional only parameters (GH-10641)
(cherry picked from commit 1aeeaeb79e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2019-03-10 04:36:18 -07:00
Miss Islington (bot) e4be2057d4
bpo-36251: Fix format strings used in match_repr() and stdprinter_repr(). (GH-12252)
(cherry picked from commit 8b91edadc0)

Co-authored-by: sth <sth.dev@tejp.de>
2019-03-10 03:52:44 -07:00
Miss Islington (bot) e5123d81ff bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258) (GH-12261)
Don't send cookies of domain A without Domain attribute to domain B when domain A is a suffix match of domain B while using a cookiejar with `http.cookiejar.DefaultCookiePolicy` policy.  Patch by Karthikeyan Singaravelan.
(cherry picked from commit ca7fe50635)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-09 21:58:25 -05:00
Miss Islington (bot) 572205adf0
bpo-35807: Upgrade ensurepip bundled pip and setuptools (GH-12189)
* Update pip to 19.0.3
* Update setuptools to 40.8.0
(cherry picked from commit 01e0f439f5)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2019-03-08 13:44:39 -08:00
Miss Islington (bot) 8755f0aeb6
bpo-35899: Fix Enum handling of empty and weird strings (GH-11891)
Co-authored-by: Maxwell <maxwellpxt@gmail.com>
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>

https://bugs.python.org/issue35899
(cherry picked from commit 8b914d2767)

Co-authored-by: Brennan D Baraban <34765317+bdbaraban@users.noreply.github.com>
2019-03-08 13:44:21 -08:00
Steve Dower daad2c482c
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201) 2019-03-07 09:08:18 -08:00
Victor Stinner 279657bac2
[3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12178)
Use locale.getpreferredencoding() rather than locale.getlocale() to
get the locale encoding. With some locales, locale.getlocale()
returns the wrong encoding.

For example, on Fedora 29, locale.getlocale() returns ISO-8859-1
encoding for the "en_IN" locale, whereas
locale.getpreferredencoding() reports the correct encoding: UTF-8.

On Windows, set temporarily the LC_CTYPE locale to the user preferred
encoding to ensure that it uses the ANSI code page, to be consistent
with locale.getpreferredencoding().
2019-03-05 16:17:43 +01:00
Miss Islington (bot) a59d33a1b0
bpo-36179: Fix ref leaks in _hashopenssl (GH-12158)
Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in
out-of-memory cases. Thanks to Charalampos Stratakis.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue36179
(cherry picked from commit b7bc283ab6)

Co-authored-by: Christian Heimes <christian@python.org>
2019-03-04 08:17:30 -08:00
Miss Islington (bot) 06e9953d5e
bpo-35198 Fix C++ extension compilation on AIX (GH-10437)
For C++ extensions, distutils tries to replace the C compiler with the
C++ compiler, but it assumes that C compiler is the first element after
any environment variables set. On AIX, linking goes through ld_so_aix,
so it is the first element and the compiler is the next element. Thus
the replacement is faulty:

ld_so_aix gcc ... -> g++ gcc ...

Also, it assumed that self.compiler_cxx had only 1 element or that
there were the same number of elements as the linker has and in the
same order. This might not be the case, so instead concatenate
everything together.
(cherry picked from commit 800d5cd750)

Co-authored-by: Kevin Adler <kadler@us.ibm.com>
2019-03-04 07:06:36 -08:00
Miss Islington (bot) 4b9459d3a3 Autospec functions should propagate mock calls to parent GH-11273 (#12039)
(cherry picked from commit 9c3f284de5)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-03 17:14:44 +00:00
Miss Islington (bot) cd0416466f
bpo-36091: Remove reference to async generator in Lib/types.py. (GH-11996)
(cherry picked from commit 0a6a412fb2)

Co-authored-by: Henry Chen <tahafut@gmail.com>
2019-03-03 06:54:39 -08:00
Miss Islington (bot) 243b2064ce
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
Patch by Kevin Walzer.
(cherry picked from commit 7eebbbd5b3)

Co-authored-by: Ned Deily <nad@python.org>
2019-03-01 15:13:57 -08:00
Miss Islington (bot) b94874f7e2
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
Ensure custom formatwarning function can receive line as positional argument.

Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
(cherry picked from commit be7c460fb5)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-01 09:40:10 -08:00
Miss Islington (bot) 70852b1eb6
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close().  In IDLE, both have always been None or False since 2007.
(cherry picked from commit b9f0354efc)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-03-01 02:43:43 -08:00
Miss Islington (bot) 488aabafe2 bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002) (GH-12075)
(cherry picked from commit ed1deb0719)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-02-27 14:14:06 -05:00
Miss Islington (bot) e5897b67ba bpo-28441: Ensure `.exe` suffix in `sys.executable` on MinGW and Cygwin (GH-4348)
This is needed to even the run the test suite on buildbots for affected platforms; e.g.:

```
./python.exe  ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
/home/embray/src/python/test-worker/3.x.test-worker/build/python -u -W default -bb -E -W error::BytesWarning -m test -r -w -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
Traceback (most recent call last):
  File "./Tools/scripts/run_tests.py", line 56, in <module>
    main(sys.argv[1:])
  File "./Tools/scripts/run_tests.py", line 52, in main
    os.execv(sys.executable, args)
PermissionError: [Errno 13] Permission denied
make: *** [Makefile:1073: buildbottest] Error 1
```

(cherry picked from commit 7a7693e9cb)

Co-authored-by: E. M. Bray <erik.m.bray@gmail.com>
2019-02-27 18:24:34 +09:00
Miss Islington (bot) 2632474957
bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition (GH-12053)
Use longer timeout for accept() in the server and block on accept in the client.
The client now only sets the timeout once the socket is connected.
(cherry picked from commit 53b9e1a1c1)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-02-26 08:48:52 -08:00
Miss Islington (bot) 4e6646fef5
bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worken on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).
(cherry picked from commit f57cd8288d)

Co-authored-by: Dima Pasechnik <dimpase@gmail.com>
2019-02-25 23:10:54 -08:00
Miss Islington (bot) 0b3019a02e
bpo-24643: Fix "GH-define timezone _timezone" clashes on Windows (GH-12019)
(cherry picked from commit 6673decfa0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-25 16:15:04 -08:00
Miss Islington (bot) ea199b90bb bpo-35512: Resolve string target to patch.dict decorator during function call GHGH-12000 (#12021)
* Resolve string target to patch.dict during function call

* Add NEWS entry

* Remove unneeded call

* Restore original value for support.target and refactor assertions

* Add extra assertion to verify unpatched dict
(cherry picked from commit a875ea58b2)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-02-25 21:17:16 +00:00
Miss Islington (bot) ca5e6aaea5
closes bpo-36083: Fix formatting of the manpage Synopsis. (GH-12017)
More specifically, the options of --check-hash-based-pycs.
(cherry picked from commit 16323cb2c3)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2019-02-24 16:56:13 -08:00
Miss Islington (bot) 25d20a6503
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
(cherry picked from commit aeca373b33)

Co-authored-by: Ned Deily <nad@python.org>
2019-02-23 23:46:20 -08:00
Miss Islington (bot) 38aea4131f
bpo-24310: Document IDLE settings dialog font tab sample (GH-12007)
(cherry picked from commit d610116a2e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-02-23 20:23:08 -08:00
Miss Islington (bot) 6163210089
bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)
(cherry picked from commit a40681dd5d)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-02-22 06:03:26 -08:00
Miss Islington (bot) 0e73ea26a5
bpo-33989: Ensure that ms.key_compare is always initialized in list_sort_impl(). (GH-8710)
(cherry picked from commit ebc793d6ac)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-21 00:05:22 -08:00
Miss Islington (bot) e8bf04de4b
bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940)
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy.
Use older TLS version for minimum TLS version of the server SSL context if
needed, to test TLS version older than default minimum TLS version.
(cherry picked from commit 3ef6344ee5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-02-19 09:24:16 -08:00
Miss Islington (bot) 64ca728223
bpo-31506: Clarify error messages for object.__new__ and object.__init__ (GH-11641)
`object.__new__` and `object.__init__` do take one argument each,
they just don't take extra user supplied arguments.

Patch by Sanyam Khurana.
(cherry picked from commit 5105483acb)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-02-19 05:47:13 -08:00
Miss Islington (bot) 99e9c36b29
bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)
(cherry picked from commit ee0f927bd8)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-02-18 21:30:53 -08:00
Miss Islington (bot) 3129432845 bpo-34572: change _pickle unpickling to use import rather than retrieving from sys.modules (GH-9047) (GH-11921)
Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.
(cherry picked from commit 4371c0a9c0)

Co-authored-by: tjb900 <ozburgess@gmail.com>
2019-02-18 15:52:32 +00:00
Miss Islington (bot) 0e379d43ac
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)
Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.

Also add a missing index in re.rst.
(cherry picked from commit 4a7f44a2ed)

Co-authored-by: animalize <animalize@users.noreply.github.com>
2019-02-18 05:48:23 -08:00
Miss Islington (bot) a01065a358
bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)
The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
(cherry picked from commit 09fbcd6085)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-02-18 03:05:52 -08:00
Miss Islington (bot) a7f929db60
bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)
Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional.
(cherry picked from commit ac28147e78)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-02-17 15:33:04 -08:00
Miss Islington (bot) 6f352199e4
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt.

This patch fixes this by pre-compiling the code before passing it to `Pdb.run`.

https://bugs.python.org/issue35931
(cherry picked from commit 4327705cfa)

Co-authored-by: Daniel Hahler <github@thequod.de>
2019-02-15 13:19:44 -08:00
Victor Stinner fe42122d41
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11864)
Add credit for the cert parser vulnerability. Mention also Cisco
TALOS-2018-0758 identifier.
2019-02-15 13:19:30 +01:00
Miss Islington (bot) e20893596f
closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)
(cherry picked from commit bb3c05d7ef)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-14 00:02:12 -08:00
Miss Islington (bot) a78251e2d6
bpo-35961: Fix a crash in slice_richcompare() (GH-11830)
Fix a crash in slice_richcompare(): use strong references rather than
stolen references for the two temporary internal tuples.

The crash (or assertion error) occurred if a garbage collection
occurred during slice_richcompare(), especially while calling
PyObject_RichCompare(t1, t2, op).
(cherry picked from commit dcb68f47f7)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-02-13 03:49:34 -08:00
Miss Islington (bot) 009220eae2
bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port (GH-11823)
Make test_imap4_host_default_value independent on whether the
local IMAP server is running.
(cherry picked from commit 3dc67d0316)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2019-02-12 10:54:31 -08:00
Miss Islington (bot) 0a834c18cd bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815) (GH-11826)
(cherry picked from commit b01786c881)

Co-authored-by: Christopher Hunt <chrahunt@gmail.com>
2019-02-12 07:11:48 -05:00
Miss Islington (bot) 58f05ce059 bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)
(cherry picked from commit a31f4cc881)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-02-11 17:09:22 -08:00
Miss Islington (bot) 2259b5af3c
[3.7] bpo-22062: Updated docstring and documentation for pathlib (GH-8519) (GH-11817)
Original patch by Mike Short


https://bugs.python.org/issue22062
(cherry picked from commit 537b6caa56)


Co-authored-by: Eivind Teig <eivind.teig@gmail.com>


https://bugs.python.org/issue22062
2019-02-11 04:02:57 -08:00
Miss Islington (bot) 3fcfef357e
bpo-35833: Revise IDLE doc for control codes sent to Shell. (GH-11799)
Add  a code example block.
(cherry picked from commit 8a03ff2ff4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-02-08 20:43:20 -08:00
Miss Islington (bot) 48769a28ad bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384) (GH-11785)
Protect dict iterations by wrapping them with _IterationGuard in the
following methods:

- WeakValueDictionary.copy()
- WeakValueDictionary.__deepcopy__()
- WeakKeyDictionary.copy()
- WeakKeyDictionary.__deepcopy__()
(cherry picked from commit 96d37dbcd2)

Co-authored-by: Fish <ltfish@users.noreply.github.com>
2019-02-07 20:09:16 +00:00
Antoine Pitrou 15526f5be7
[3.7] bpo-35917: Test multiprocessing manager classes and shareable types (GH-11772) (GH-11780)
multiprocessing: provide unittests for manager classes and shareable types.
(cherry picked from commit 2848d9d299)

Co-authored-by: Giampaolo Rodola <g.rodola@gmail.com>
2019-02-07 11:34:12 +00:00
Miss Islington (bot) 4f6854a690
bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)
(cherry picked from commit 85e102a2b0)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-02-04 17:54:59 -08:00
Steve Dower 44467e8ea4
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use.
Make the same changes for macOS to avoid extra platform checks.
2019-02-04 07:20:19 -08:00
Miss Islington (bot) 69af4395a2
bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746)
(cherry picked from commit 2f6fae6e51)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-02-03 23:27:37 -08:00
Miss Islington (bot) cba16b748c
bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj (GH-11410)
This module is built by _asyncio.vcxproj and does not need to be included in pythoncore.
(cherry picked from commit fbf50683b3)

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2019-02-02 16:46:12 -08:00
Miss Islington (bot) 81eda28382
bpo-34691: Compile _contextvars module into main Python library (GH-11741)
(cherry picked from commit 4c70d9f79c)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-02-02 14:54:42 -08:00
Miss Islington (bot) 63a69ef4a2
bpo-29734: nt._getfinalpathname handle leak (GH-740)
Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac436)

Co-authored-by: Mark Becwar <mark@thebecwar.com>
2019-02-02 13:29:07 -08:00
Miss Islington (bot) 04b2a5eeda
bpo-32560: inherit the py launcher's STARTUPINFO (GH-9000)
https://bugs.python.org/issue32560
(cherry picked from commit cb09047626)

Co-authored-by: Shiva Saxena <shivasaxena911@gmail.com>
2019-02-02 11:38:16 -08:00
Miss Islington (bot) 56f84117a7
bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one character (GH-4517)
Add one char to MsiSummaryInfoGetProperty() output
Based on the patch in bpo-1104 by Anthony Tuininga (atuining) and Mark McMahon (markm).
(cherry picked from commit 2de576e16d)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2019-02-02 09:36:48 -08:00
Miss Islington (bot) c851dfc99b
bpo-33316: PyThread_release_lock always fails (GH-6541)
Use correct interpretation of return value from APIs.
(cherry picked from commit 05e922136a)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
2019-02-02 08:45:50 -08:00
Miss Islington (bot) 03082a836b
bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700)
(cherry picked from commit a1f9a3332b)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-01-30 14:14:35 -08:00
Miss Islington (bot) 1c79891026 bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523) (GH-11669)
https://bugs.python.org/issue17467
(cherry picked from commit 1fd06f1eca)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-01-30 18:36:51 +01:00
Miss Islington (bot) 10354cbb50
bpo-35847: RISC-V needs CTYPES_PASS_BY_REF_HACK (GH-11694)
This fixes the ctypes.test.test_structures.StructureTestCase test.

https://bugs.python.org/issue35847
(cherry picked from commit 742d768656)

Co-authored-by: Andreas Schwab <schwab@linux-m68k.org>
2019-01-29 13:11:36 -08:00
Miss Islington (bot) b2b023c657 bpo-35780: Fix errors in lru_cache() C code (GH-11623) (GH-11682) 2019-01-26 03:23:40 -05:00
Miss Islington (bot) a6a8524bb1
bpo-35811: Avoid propagating venv settings when launching via py.exe (GH-11677)
(cherry picked from commit adad9e6801)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-01-25 15:31:18 -08:00
Miss Islington (bot) 6a9c0fca3f
bpo-35797: Fix default executable used by the multiprocessing module (GH-11676)
(cherry picked from commit 4e02f8f8b4)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-01-25 15:14:41 -08:00
Steve Dower 128efcade6
bpo-35683: Improve Azure Pipelines steps (GH-11493) 2019-01-22 12:31:30 -08:00
Miss Islington (bot) f71e7433eb
bpo-35720: Fixing a memory leak in pymain_parse_cmdline_impl() (GH-11528)
When the loop in the pymain_read_conf function in this same file
calls pymain_init_cmdline_argv() a 2nd time, the pymain->command
buffer of wchar_t is overriden and the previously allocated memory
is never freed.
(cherry picked from commit 35ca1820e1)

Co-authored-by: Lucas Cimon <lucas.cimon@gmail.com>
2019-01-22 08:42:13 -08:00
Miss Islington (bot) d1dd6be613
bpo-35772: Fix test_tarfile on ppc64 (GH-11606)
Fix sparse file tests of test_tarfile on ppc64le with the tmpfs
filesystem.

Fix the function testing if the filesystem supports sparse files:
create a file which contains data and "holes", instead of creating a
file which contains no data.

tmpfs effective block size is a page size (tmpfs lives in the page
cache). RHEL uses 64 KiB pages on aarch64, ppc64 and ppc64le, only
s390x and x86_64 use 4 KiB pages, whereas the test punch holes of
4 KiB.

test.pythoninfo: Add resource.getpagesize().
(cherry picked from commit b2385458ce)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-21 01:44:30 -08:00
Miss Islington (bot) d358a8cda7 bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (GH-11629)
* Allow repeated deletion of unittest.mock.Mock attributes

* fixup! Allow repeated deletion of unittest.mock.Mock attributes

* fixup! fixup! Allow repeated deletion of unittest.mock.Mock attributes
(cherry picked from commit 222d303ade)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-01-21 09:37:54 +00:00
Miss Islington (bot) 2fa53cfa89
bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495)
(cherry picked from commit b2dc4a3313)

Co-authored-by: Marc Schlaich <marc.schlaich@googlemail.com>
2019-01-20 11:06:08 -08:00
Miss Islington (bot) a01e23559f
bpo-35770: IDLE macosx deletes Options => Configure IDLE. (GH-11614)
It previously deleted Window => Zoom Height by mistake.
(Zoom Height is now on the Options menu).  On Mac, the settings
dialog is accessed via Preferences on the IDLE menu.
(cherry picked from commit 39ed289a35)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-18 11:16:01 -08:00
Miss Islington (bot) 6ca7183b35
bpo-35045: Accept TLSv1 default in min max test (GH-11510)
Make ssl tests less strict and also accept TLSv1 as system default. The
changes unbreaks test_min_max_version on Fedora 29.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 34de2d312b)

Co-authored-by: Christian Heimes <christian@python.org>
2019-01-18 07:29:08 -08:00
Dong-hee Na c2647f2e45 bpo-35283: Add pending deprecation warning for Thread.isAlive (GH-11604)
Add a pending deprecated warning for the threading.Thread.isAlive() method.
2019-01-18 15:09:43 +01:00
Miss Islington (bot) 5f9a168a31
bpo-35769: Change IDLE's name for new files from 'Untitled' to 'untitled' (GH-11602)
'Untitled' violates the PEP 8 standard for .py files
(cherry picked from commit a902239f22)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-17 23:24:09 -08:00
Miss Islington (bot) a261b73761 bpo-33687: Fix call to os.chmod() in uu.decode() (GH-7282)
(cherry picked from commit 17f05bbc78)

Co-authored-by: Timo Furrer <tuxtimo@gmail.com>
2019-01-17 17:32:59 +03:00
Miss Islington (bot) be5de958e9
bpo-35746: Fix segfault in ssl's cert parser (GH-11569)
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f)

Co-authored-by: Christian Heimes <christian@python.org>
2019-01-15 15:03:36 -08:00
Miss Islington (bot) c9f26714d5
bpo-23846: Fix ProactorEventLoop._write_to_self() (GH-11566)
asyncio.ProactorEventLoop now catchs and logs send errors when the
self-pipe is full: BaseProactorEventLoop._write_to_self() now catchs
and logs OSError exceptions, as done by
BaseSelectorEventLoop._write_to_self().
(cherry picked from commit c9f872b0bd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-15 05:17:05 -08:00
Victor Stinner d5a6adf628
[3.7] bpo-34323: Enhance IocpProactor.close() log (GH-11565)
* IocpProactor: prevent modification if closed (GH-11494)

* _wait_for_handle(), _register() and _unregister() methods of
  IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()

(cherry picked from commit 9b07681c09)

* bpo-34323: Enhance IocpProactor.close() log (GH-11555)

IocpProactor.close() now uses time to decide when to log: wait 1
second before the first log, then log every second. Log also the
number of seconds since close() was called.

(cherry picked from commit b1e45739d8)

* bpo-34323: Enhance IocpProactor.close() log again (GH-11563)

Add repr(self) to the log to display the number of pending overlapped
in the log.

(cherry picked from commit b91140fdb1)
2019-01-15 13:05:28 +01:00
Miss Islington (bot) 26122de1a8
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)
Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occured when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.
(cherry picked from commit 454b3d4ea2)

Co-authored-by: MichaelSaah <mike.saah@gmail.com>
2019-01-14 02:41:33 -08:00
Miss Islington (bot) 47bd777022
bpo-35196: Optimize Squeezer's write() interception (GH-10454)
The new functionality of Squeezer.reload() is also tested, along with some general
re-working of the tests in test_squeezer.py.
(cherry picked from commit 39a33e9927)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-01-13 08:43:08 -08:00
Miss Islington (bot) cbc7c2c791
bpo-35552: Fix reading past the end in PyUnicode_FromFormat() and PyBytes_FromFormat(). (GH-11276)
Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.
(cherry picked from commit d586ccb04f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-01-12 00:52:55 -08:00
Miss Islington (bot) d39c192559
bpo-33817: Fix _PyBytes_Resize() for empty bytes object. (GH-11516)
Add also tests for PyUnicode_FromFormat() and PyBytes_FromFormat()
with empty result.
(cherry picked from commit 44cc4822bb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-01-11 23:40:09 -08:00
Miss Islington (bot) 059997d78e
bpo-32710: Fix _overlapped.Overlapped memory leaks (GH-11489)
Fix memory leaks in asyncio ProactorEventLoop on overlapped operation
failures.

Changes:

* Implement the tp_traverse slot in the _overlapped.Overlapped type
  to help to break reference cycles and identify referrers in the
  garbage collector.
* Always clear overlapped on failure: not only set type to
  TYPE_NOT_STARTED, but release also resources.
(cherry picked from commit 5485085b32)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-11 06:01:50 -08:00
Miss Islington (bot) b9cd38f928
bpo-32146: Add documentation about frozen executables on Unix (GH-5850)
(cherry picked from commit bab4bbb4c9)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2019-01-10 10:13:21 -08:00
Miss Islington (bot) 6f76ef8159
bpo-35641: Move IDLE blurb to IDLE directory (GH-11479)
(cherry picked from commit ee65594367)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-09 07:49:38 -08:00
Miss Islington (bot) 53cf5f084b
bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639)
(cherry picked from commit cbb1645993)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-01-09 05:56:40 -08:00
Miss Islington (bot) 88ad48bc98
bpo-32710: Fix leak in Overlapped_WSASend() (GH-11469)
Fix a memory leak in asyncio in the ProactorEventLoop when ReadFile()
or WSASend() overlapped operation fail immediately: release the
internal buffer.
(cherry picked from commit a234e14839)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-08 05:40:50 -08:00
Miss Islington (bot) 69f64b67e4
bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport restrictions (GH-11465)
Also adds extra steps to the CI build for Windows on Azure Pipelines to validate that the various layouts at least execute.
(cherry picked from commit 872bd2b57c)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-01-08 02:56:14 -08:00
Miss Islington (bot) 88bd26a72e
bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462)
bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't
attempt to set the result of an internal future if it's already done.

Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the
result of _empty_waiter if it's already done.
(cherry picked from commit 80fda712c8)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-07 18:15:25 -08:00
Miss Islington (bot) 9a413faa87
bpo-35560: Remove assertion from format(float, "n") (GH-11288)
Fix an assertion error in format() in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.
(cherry picked from commit 3f7983a25a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-01-07 07:26:20 -08:00
Miss Islington (bot) be37dbff1c
bpo-35660: Fix imports in idlelib.window (GH-11434)
* bpo-35660: IDLE: Remove * import from window.py

* sys was being imported through the *, so also added an import sys.

* Update 2019-01-04-19-14-29.bpo-35660.hMxI7N.rst

Anyone who wants details can check the issue, where I added the point about the sys import bug.
(cherry picked from commit 11303dd603)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-01-06 13:13:30 -08:00
Miss Islington (bot) 3c83cb7eed
bpo-35641: IDLE - format calltip properly when no docstring (GH-11415)
(cherry picked from commit ab54b9a130)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-01-03 01:44:47 -08:00
Miss Islington (bot) b364caa399
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
(cherry picked from commit aff0adabf3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-02 19:22:10 -08:00
Miss Islington (bot) 6d04bc9a2e
closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py (GH-11411)
(cherry picked from commit d466c43e55)

Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-02 11:58:58 -08:00
Miss Islington (bot) a5955b0895
closes bpo-35623: Fix integer overflow when sorting large lists (GH-11380)
There is already a `Py_ssize_t i` defined at function scope that is used
for similar loops. By removing the local `int i` declaration that `i` is
used, which has the appropriate type.
(cherry picked from commit f8b534477a)

Co-authored-by: sth <sth.dev@tejp.de>
2019-01-01 18:25:23 -08:00
Miss Islington (bot) 74e4648377
bpo-35598: IDLE - Globalize some config_key objects (GH-11392)
Move translate_key() and constant tuples to module level.
Inline the remnant one-line function.
(cherry picked from commit b4ea8bb080)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-31 12:19:53 -08:00
Gregory P. Smith efcf08d8ca
[3.7] bpo-35214: Annotate posix calls for clang MSan. (GH-11389) (GH-11391)
It doesn't know the details of a few less common libc functions..

(cherry picked from commit 1d300ce1d8)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-12-30 22:14:33 -08:00
Miss Islington (bot) 5d2e4b1ff2
bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (GH-11385)
* skip test_constructor under msan.

* fix the others as well.

* reuse existing related news entry.

* typo fix
(cherry picked from commit e5796c42c6)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-30 20:39:28 -08:00
Miss Islington (bot) d82344378a
bpo-35550: Fix incorrect Solaris define guards (GH-11275)
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.

Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris

https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2018-12-30 18:39:00 -08:00
Miss Islington (bot) a144feeb7e bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373) (GH-11376)
Use crypt_r() when available instead of crypt() in the crypt module.

As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
(cherry picked from commit 387512c7ec)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-12-30 17:59:52 -08:00
Miss Islington (bot) 01b9664740 bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) (GH-11378)
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
(cherry picked from commit b474e6774d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-30 17:59:19 -08:00
Miss Islington (bot) d2694d4768
bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365)
(cherry picked from commit 4bd79c38ef)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-30 12:30:09 -08:00
Miss Islington (bot) 34aadec448
bpo-35598: IDLE: Increase test coverage for config_key.py (GH-11360)
(cherry picked from commit b0a6196ffd)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-29 20:39:27 -08:00
Miss Islington (bot) 95dc4577c3
bpo-34055: Revert deletion of line in IDLE's PyShell (GH-11346)
The attribute is still used in other modules.
(cherry picked from commit 4bc246786f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-12-28 17:19:32 -08:00
Miss Islington (bot) b716c716b5
bpo-28097: IDLE - Add Previous/Next History to Shell menu (GH-11325)
(cherry picked from commit c0381aaea4)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-28 12:29:44 -08:00
Miss Islington (bot) 098bb249e9
bpo-35591: IDLE Find Selection now works when selection not found (GH-11339)
(cherry picked from commit c465682718)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-12-28 02:31:34 -08:00
Miss Islington (bot) 4c7f34f73d
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
A few other changes make the code easier to follow.
(cherry picked from commit 55698cc395)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-27 20:08:03 -08:00
Miss Islington (bot) bbf695441a
bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple times. (GH-11329)
https://bugs.python.org/issue35596
(cherry picked from commit 59c2aa25ff)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-27 17:04:07 -08:00
Miss Islington (bot) 705b599803 Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318) (GH-11324)
bpo-35585: Speed up enum by-value lookup
(cherry picked from commit 34ae04f74d)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-12-26 22:48:55 +02:00
Miss Islington (bot) 0e0cc553ab
bpo-35208: Fix IDLE Squeezer line counting (GH-10449)
(cherry picked from commit 44a79cc5b3)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-12-24 04:21:11 -08:00
Ned Deily bb8b5314dc Merge release engineering branch '372final' into 3.7 2018-12-24 04:25:49 -05:00
Ned Deily 6c261c4415 Python 3.7.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlwgAIkACgkQLTR+pqpl
 Qh3IyhAAlS5rZLfk0KrBG01T7a/i/JJ8QILcy5bbfFeQ46xRUHk3yPtp05oMd1u/
 zjcmD4UxExe2/dJGtmXfp86ZfzmvhlAfifzF0OV0G0cbXKnEtwHML1cPT/1mbyG3
 GcKnk1dO7OUR9IMw0KlYZpEfUHNPHKd/HrByJ7Tmd0FJxe8YExIBiyFWZFNds9cV
 cRo8bPfl/AawMN/K1ushwpyl1H0x3Qg+4huC4GRdrN6yLd/hnRFAUVNtft5trChy
 rNRRyk+Z1DPJZydu1mCpFip5bzSIdYQH1W/73gnBRMfG81NPgmkt9zLk0L3UB/gk
 24S2ChASdNKNSOBUiu/7J7RuSN05kIj4g2XH65gdKY+6u6nezfj3qvWMVrKkNa97
 lGOKc5KIjMaGRWGto0tsvSClM4FmtC5LDSnpGFA2e+7RzZJFj5Svy8E9jiUfbyLC
 yECdP21WIInHWWxWG3DD6ksVsyg197uoFm66eshrgnRlRQLzptrKe2WoTDkk6eTy
 VFJd638aLTxSKphfZI7SCiAU1Fm2Q8vUcTVKTY+cnd918aBsB2eEtLW8dzlFMzow
 JK+jjzqZQf1VjasTrPbiNrtt/7KxxzVcJbCu8OYRXUvjWf5gREYCAWT15sWpNuEH
 TCsgkCThQMdaFgqoCNYuzPkSx7k7c0zsaqVSHDCTvgHfrTJDLPU=
 =NTON
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.2' into 3.7
2018-12-24 04:24:38 -05:00
Ned Deily 986a9ab09d Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)"
This reverts commit 3b9a0186c4.

Due to regressions found with using Tk 8.6.9.1, the python.org macOS
installers for 3.6.8 and 3.7.2 are shipping with Tcl/Tk 8.6.8 as used
in previous releases.
2018-12-24 02:04:44 -05:00
Miss Islington (bot) 00a48d57df bpo-34764: improve docs example of iter() with sentinel value (GH-11222) (#11301)
(cherry picked from commit d378b1f8ed)

Co-authored-by: Chris Rands <c_rands100@hotmail.com>
2018-12-23 21:19:57 -08:00
Miss Islington (bot) d4f7616da3 bpo-35555: IDLE: Gray out Code Context menu item on non-editors (GH-11282) (GH-11300)
The Code Context menu item only works on Editor windows so disable it for others.
(cherry picked from commit 8874f511e7)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-23 17:14:59 -05:00
Ned Deily 9a3ffc0492 3.7.2final 2018-12-23 16:37:36 -05:00
Miss Islington (bot) ffc106c596 bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620)
(cherry picked from commit 3e8f962e63)

Co-authored-by: Arthur Neufeld <aneufeld@seinesoftware.ca>
2018-12-23 15:46:57 -05:00
Myles Borins 25ee15a15c [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977)
(cherry picked from commit 0854b92cd2)
2018-12-23 15:46:40 -05:00
Victor Stinner f14087a4a9 bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.

(cherry picked from commit cf10a750f4)
2018-12-23 15:45:10 -05:00
Miss Islington (bot) 7e4e4bd2b8 bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-23 15:39:06 -05:00
Miss Islington (bot) 48a206978c
bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)
The Code Context menu label now toggles between Show/Hide Code Context.
 The Zoom Height menu now toggles between Zoom/Restore Height.
 Zoom Height has moved from the Window menu to the Options menu.

https://bugs.python.org/issue22703
(cherry picked from commit c1b4b0f616)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-21 22:41:50 -08:00
Miss Islington (bot) d1e7175887
bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620)
(cherry picked from commit 3e8f962e63)

Co-authored-by: Arthur Neufeld <aneufeld@seinesoftware.ca>
2018-12-20 13:39:35 -08:00
Myles Borins c7b7a43cd8 [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977)
(cherry picked from commit 0854b92cd2)
2018-12-20 15:26:02 -05:00
Victor Stinner 0198f52ea2
bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.

(cherry picked from commit cf10a750f4)
2018-12-20 16:03:01 +01:00
Miss Islington (bot) 3f93383127
bpo-35521: IDLE: Add code context section to docs (GH-11205)
Also add some internal cross-references.
(cherry picked from commit 01421bec1e)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-19 21:59:22 -08:00
Miss Islington (bot) c74e7c48ba bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) (GH-11227)
Fix test_multiprocessing_main_handling: use multiprocessing.Pool with
a context manager and then explicitly join the pool.
(cherry picked from commit 6cdce3ddef)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-19 00:43:27 +01:00
Miss Islington (bot) 729fc5d2ac
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)
Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31eb6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-18 15:10:47 -08:00
Miss Islington (bot) 60c919b58b
bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)
(cherry picked from commit d2a75c6783)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-18 13:40:23 -08:00
Miss Islington (bot) 6e96fb44f1
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931)
check_environ() of distutils.utils now catchs KeyError on calling
pwd.getpwuid(): don't create the HOME environment variable in this
case.
(cherry picked from commit 17d0c0595e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-18 07:34:54 -08:00
Miss Islington (bot) 05dfa0cc96
bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200)
Rename test.bisect module to test.bisect_cmd to avoid conflict with
bisect module when running directly a test like
"./python Lib/test/test_xmlrpc.py".
(cherry picked from commit 1dd035954b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 13:24:52 -08:00
Miss Islington (bot) cb272843f2
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
(cherry picked from commit 842acaab13)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-17 07:10:20 -08:00
Miss Islington (bot) 9ade4cbc0f
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.
(cherry picked from commit 8db5b54463)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 02:49:22 -08:00
Miss Islington (bot) be69ff232d
bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)
Replace time.time() with time.monotonic() in tests to measure time
delta.

test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
(cherry picked from commit 2cf4c202ff)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 01:03:04 -08:00
Miss Islington (bot) 2d91a1325f bpo-35412: Add testcase to test_future4 (GH-11131) (GH-11183)
Add testcase to test_future4: check unicode literal.
(cherry picked from commit 502fe19b10)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 09:34:06 +01:00
Miss Islington (bot) 9a4758550d bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-16 23:24:04 +01:00
Miss Islington (bot) 77824ef6e5 bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 (GH-11146)
(cherry picked from commit f8e9bd568a)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-14 09:49:10 -08:00
Miss Islington (bot) 5f252e1ebc
bpo-34279: regrtest consider that skipped tests are ran (GH-11132)
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fef4a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-14 04:26:58 -08:00
Serhiy Storchaka 922b2a0d0d
[3.7] bpo-31446: Copy command line that should be passed to CreateProcessW(). (GH-11141). (GH-11149)
(cherry picked from commit 7b36016a15)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-12-14 11:18:13 +02:00
Miss Islington (bot) f27f0d2be4 Add test for double patching instance methods (GH11126)
(cherry picked from commit 5a718e918d)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2018-12-12 09:00:44 +00:00
Miss Islington (bot) 6a12931c9c bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11125)
* Fix partial and partial method signatures in mock

* Add more calls

* Add NEWS entry

* Use assertEquals and fix markup in NEWS

* Refactor branching and add markup reference for functools

* Revert partial object related changes and fix pr comments
(cherry picked from commit f7fa62ef44)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-12-12 08:58:36 +00:00
Ned Deily 75a402a217 3.7.2rc1 2018-12-11 16:46:13 -05:00
Ned Deily 9383969788 Minor edits to NEWS entries 2018-12-11 16:28:00 -05:00
Serhiy Storchaka 3cae16d2e9
bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107)
(cherry picked from commit bb86bf4c4e)
2018-12-11 10:51:27 +02:00
Miss Islington (bot) 3b9a0186c4
bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)
(cherry picked from commit 7cf3d8e251)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-10 22:28:49 -08:00
Miss Islington (bot) c37923ece7
bpo-35401: Update macOS installer to OpenSSL 1.1.0j (GH-11094)
https://bugs.python.org/issue35401
(cherry picked from commit 3ec982640f)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-10 21:43:17 -08:00
Miss Islington (bot) d1fb21209b
bpo-35401: Update Windows build to OpenSSL 1.1.0j (GH-11088)
(cherry picked from commit 4824385fec)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-10 20:16:46 -08:00
Steve Dower 0e4ad88ff8
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
2018-12-10 19:58:52 -08:00
Steve Dower b264c60985
[3.7] bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) 2018-12-10 08:11:34 -08:00
Victor Stinner 1a7b62d557
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069)
The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2eb6ad8578)
2018-12-10 12:13:01 +01:00
Victor Stinner c3cc75134d
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11066)
Fix xml.dom.minidom cloneNode() on a document with an entity: pass
the correct arguments to the user data handler of an entity (fix an
old copy/paste mistake).

Bug spotted and fix proposed by Charalampos Stratakis, initial
reproducer written by Petr Viktorin.

Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 8e04186889)
2018-12-10 11:56:48 +01:00
Miss Islington (bot) d4bcf13e06
bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043)
(cherry picked from commit ac218bc5db)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-08 23:06:53 -08:00
Miss Islington (bot) ee2c5a8e2d bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11035)
* tests: Further validate `wraps` functionality in `unittest.mock.Mock`

Add more tests to validate how `wraps` interacts with other features of
mocks.

* Don't call the wrapped object if `side_effect` is set

When a object is wrapped using `Mock(wraps=...)`, if an user sets a
`side_effect` in one of their methods, return the value of `side_effect`
and don't call the original object.

* Refactor what to be called on `mock_call`

When a `Mock` is called, it should return looking up in the following
order: `side_effect`, `return_value`, `wraps`. If any of the first two
return `mock.DEFAULT`, lookup in the next option.

It makes no sense to check for `wraps` returning default, as it is
supposed to be the original implementation and there is nothing to
fallback to.
(cherry picked from commit f05df0a4b6)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
2018-12-08 11:47:01 +00:00
Victor Stinner 783b794a5e
Revert "[3.7] bpo-34977: Add Windows App Store package (GH-10245)" (GH-11021)
This reverts commit 2532091493.
2018-12-07 14:31:40 +01:00
Serhiy Storchaka 0d5730e643
[3.7] bpo-22005: Fixed unpickling instances of datetime classes pickled by Python 2. (GH-11017) (GH-11022)
encoding='latin1' should be used for successful decoding.
(cherry picked from commit 8452ca15f4)
2018-12-07 14:56:02 +02:00
Zackery Spytz 602d307ac5 bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7)
2018-12-07 14:17:43 +02:00
Miss Islington (bot) 2db190bb35
bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" (GH-10464)
* bpo-34864: warn if "Prefer tabs when opening documents" set to "Always"

* add NEWS entry

* address code review comments

* address second code review comments

* Add entry for idlelib/NEWS.txt.
(cherry picked from commit 9ebe8794f0)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-12-06 22:51:10 -08:00
Steve Dower 2532091493
[3.7] bpo-34977: Add Windows App Store package (GH-10245) 2018-12-06 21:09:53 -08:00
Victor Stinner 3c6b0d967e
[3.7] Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676)" (#10968)
This reverts commit 97f998a4df.
2018-12-06 01:49:05 +01:00
Miss Islington (bot) 3451078190
bpo-35310: Clear select() lists before returning upon EINTR (GH-10877)
select() calls are retried on EINTR (per PEP 475).  However, if a
timeout was provided and the deadline has passed after running the
signal handlers, rlist, wlist and xlist should be cleared since select(2)
left them unmodified.
(cherry picked from commit 7f52415a6d)

Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
2018-12-05 13:31:07 -08:00
Serhiy Storchaka ac8b47c8b4
bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947)
(cherry picked from commit 34c7f0c04e)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
2018-12-05 23:23:06 +02:00
Serhiy Storchaka 1de91a0032
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946)
(cherry picked from commit 5b25f1d031)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-12-05 23:09:56 +02:00
Miss Islington (bot) 53bed18d93
bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419)
(cherry picked from commit 67a93b3a0b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-05 12:29:31 -08:00
Miss Islington (bot) 983d1ab0e6
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555d82)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-05 08:07:57 -08:00
Victor Stinner b02774f421
bpo-35296: make install now installs the internal API (GH-10665) (GH-10897)
* bpo-35296: make install now installs the internal API (GH-10665)

make install now also installs the internal API: Include/internal/*.h
header files.

(cherry picked from commit f653fd4d95)

* Windows installer now also install Include/internal/

The Windows installer (MSI) now also install header files of the
Include/internal/ subdirectory.
2018-12-04 21:28:28 +01:00
Miss Islington (bot) 0091f349cd bpo-29564: warnings suggests to enable tracemalloc (GH-10486) (GH-10509)
The warnings module now suggests to enable tracemalloc if the source
is specified, tracemalloc module is available, but tracemalloc is not
tracing memory allocations.
(cherry picked from commit 2c07c493d2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-04 21:25:57 +01:00
Miss Islington (bot) 1751423686
bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797)
When using link time optimizations, the -flto flag is passed to
BASECFLAGS, which makes it propagate to distutils. Those flags
should be reserved for the interpreter and the stdlib extension
modules only, thus moving those flags to CFLAGS_NODIST.
(cherry picked from commit f92c7aa1ae)

Co-authored-by: stratakis <cstratak@redhat.com>
2018-12-04 07:06:16 -08:00
Miss Islington (bot) 12735c1413 bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) (#10887)
Fix minor typo in test function name.
(cherry picked from commit e63e617ebb)

Co-authored-by: Andrew Dunai <andunai@gmail.com>
2018-12-04 09:34:34 +00:00
Miss Islington (bot) e8f9e4785c bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
Also refactor the call recording imolementation and add some notes
about its limitations.
(cherry picked from commit 8ca0fa9d2f)

Co-authored-by: Chris Withers <chris@withers.org>
2018-12-03 21:54:44 +00:00
Miss Islington (bot) fe91e9ba08 [3.7] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867) (GH-10872)
* bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867)
(cherry picked from commit 3bc0ebab17)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-12-03 23:11:41 +02:00
Miss Islington (bot) bdeb56cd21
bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848)
(cherry picked from commit 4013c17911)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-03 01:09:11 -08:00
Miss Islington (bot) 6cb0486ce8
bpo-35341: Add generic version of OrderedDict to typing (GH-10850)
(cherry picked from commit 68b56d02ef)

Co-authored-by: Ismo Toijala <ismo.toijala@gmail.com>
2018-12-02 08:14:44 -08:00
Miss Islington (bot) 265b41996a
bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844)
(cherry picked from commit 32bc11c33c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-01 04:52:04 -08:00
Miss Islington (bot) 422c1658b7
bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)
(cherry picked from commit edeca92c84)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-12-01 02:24:47 -08:00
Victor Stinner 38bed786a2
[3.7] bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826) (GH-10834)
* bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826)

Modify asyncio tests to utilize the certificates from the test directory
instead of its own set, as they are the same and with each update they had
to be updated as well.

(cherry picked from commit b062ba77b6)

* bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)

'here' variable is no longer needed.

(cherry picked from commit 7212148c95)
2018-11-30 20:44:27 +01:00
Miss Islington (bot) b1355352d1
bpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008)
Fix an undefined behaviour in the pthread implementation of
PyThread_start_new_thread(): add a function wrapper to always return
NULL.

Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.
(cherry picked from commit 9eea6eaf23)

Co-authored-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
2018-11-30 07:32:12 -08:00
Victor Stinner df738d56fe
bpo-35336: Fix PYTHONCOERCECLOCALE=1 (GH-10806) (GH-10813)
Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C
locale if the LC_CTYPE locale is "C".

(cherry picked from commit 55e498058f)
2018-11-30 12:19:48 +01:00
Victor Stinner 8a73cac618
[3.7] bpo-34279: Synchronize regrtest with master (GH-10800)
* bpo-34605, libregrtest: Rename --slaveargs to --worker-args (GH-9099)

Rename also run_tests_slave() to run_tests_worker().

(cherry picked from commit 012f5b968a)

* bpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10150)

(cherry picked from commit 9724348b43)

* test_regrtest: remove unused threading import
2018-11-29 21:14:59 +01:00
Victor Stinner 7eeab87263
bpo-27903: Fix ResourceWarning in platform.dist() (GH-10792)
Fix ResourceWarning in platform.dist() and
platform.linux_distribution() on SuSE and Caldera OpenLinux.

Patch by Ville Skyttä.
2018-11-29 12:31:08 +01:00
Miss Islington (bot) 24b51b1a49
bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607)
Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708.  The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``.  An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.

This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.

While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.
(cherry picked from commit a6b3ec5b6d)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-11-28 09:45:36 -08:00
Victor Stinner 85ab974f78
bpo-34523, bpo-35322: Fix unicode_encode_locale() (GH-10759) (GH-10761)
Fix memory leak in PyUnicode_EncodeLocale() and
PyUnicode_EncodeFSDefault() on error handling.

Fix unicode_encode_locale() error handling.

(cherry picked from commit bde9d6bbb4)
2018-11-28 12:42:40 +01:00
Miss Islington (bot) d669154ee5
bpo-35317: Fix mktime() error in test_email (GH-10721)
Fix mktime() overflow error in test_email: run
test_localtime_daylight_true_dst_true() and
test_localtime_daylight_false_dst_true() with a specific timezone.
(cherry picked from commit cfaafda8e3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-11-27 03:57:56 -08:00
Miss Islington (bot) 2a37f013ec
bpo-35308: Fix regression where BROWSER env var is not respected. (GH-10693)
Regression introduced in e3ce695 and 25b804a, where the old parameter
update_tryorder to _synthesize was first ignored, then given the opposite
value in the attempt to fix bpo-31014.
(cherry picked from commit 8c281ed403)

Co-authored-by: Zhiming Wang <i@zhimingwang.org>
2018-11-26 13:49:28 -08:00
Victor Stinner 6f5fa1b4be
bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) (GH-10718)
Fix str.format(), float.__format__() and complex.__format__() methods
for non-ASCII decimal point when using the "n" formatter.

Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires
a _PyUnicodeWriter object for the buffer and a Python str object
for digits.

(cherry picked from commit 59423e3ddd)
2018-11-26 14:17:01 +01:00
Miss Islington (bot) 903a3e8d67
bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856)
Importing ProcessPoolExecutor may hang or cause an error when the import
accesses urandom on a low resource platform

https://bugs.python.org/issue29877
(cherry picked from commit 1d817e4c82)

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>
2018-11-23 09:41:54 -08:00
Miss Islington (bot) 01e579949a
bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675)
The "-I" command line option (run Python in isolated mode) is now
also copied by the multiprocessing and distutils modules when
spawning child processes. Previously, only -E and -s options (enabled
by -I) were copied.

subprocess._args_from_interpreter_flags() now copies the -I flag.
(cherry picked from commit 9de3632715)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-11-23 09:13:32 -08:00
Victor Stinner 56742f1eb0
[3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678)
* bpo-35189: Fix eintr_tester.py (GH-10637)

Call setitimer() before each test method, instead of once per test
case, to ensure that signals are sent in each test method.
Previously, only the first method of a testcase class got signals.

Changes:

* Replace setUpClass() with setUp() and replace tearDownClass() with
  tearDown().
* tearDown() now ensures that at least one signal has been sent.
* Replace support.run_unittest() with unittest.main() which has
  a nicer CLI and automatically discover test cases.

(cherry picked from commit aac1f81eef)

* bpo-35189: Retry fnctl calls on EINTR (GH-10413)

Modify the following fnctl function to retry if interrupted by a signal
(EINTR): flock, lockf, fnctl.

(cherry picked from commit b409ffa848)
Co-Authored-By: nierob <nierob@users.noreply.github.com>
2018-11-23 17:53:14 +01:00
Miss Islington (bot) 3b7258a5a5 [3.7] bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023)
I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.
(cherry picked from commit 361e8683e7)

Co-authored-by: Zhiming Wang <github@zmwang.pw>
2018-11-21 13:54:17 +01:00
Miss Islington (bot) 129642a1ff
bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)
(cherry picked from commit c8fe9ccf7b)

Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
2018-11-20 13:48:34 -08:00
Victor Stinner 6eff6b8eec
bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) (GH-10619)
locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

Changes:

* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
  monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
  since it can be replaced anytime if a different thread calls
  localeconv().

(cherry picked from commit 02e6bf7f20)
2018-11-20 22:06:21 +01:00
Miss Islington (bot) c743a6ac36 Upgrade pip to 18.1 and setuptools to 40.6.2 (GH-10598)
(cherry picked from commit 8b9c33ea9c)

Co-authored-by: Donald Stufft <donald@stufft.io>
2018-11-19 08:07:34 -05:00
Miss Islington (bot) ae02a929dd
bpo-35269: Fix a possible segfault involving a newly-created coroutine (GH-10585)
coro->cr_origin wasn't initialized if compute_cr_origin() failed in
PyCoro_New(), which would cause a crash during the coroutine's
deallocation.

https://bugs.python.org/issue35269
(cherry picked from commit 062a57bf4b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-11-18 08:58:20 -08:00
Steve Dower e851049e0e
bpo-34725: Adds _Py_SetProgramFullPath so embedders may override sys.executable (GH-9861) 2018-11-17 20:42:08 -08:00
Miss Islington (bot) 579c417564
bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)
(cherry picked from commit b65413b497)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-11-15 11:31:31 -08:00
Julien Palard 9053d2f2e0 [3.7] bpo-32613: Update window FAQ (GH-5552). (GH-10544)
(cherry picked from commit 64313478bc)

Co-authored-by: Julien Palard <julien@palard.fr>



https://bugs.python.org/issue32613
2018-11-14 09:17:35 -08:00
Miss Islington (bot) 9fbcb1402e
[3.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) (GH-10522)
Discovered using clang's MemorySanitizer when it ran python3's
test_fstring test_misformed_unicode_character_name.

An msan build will fail by simply executing: ./python -c 'u"\N"'
(cherry picked from commit 746b2d35ea)


Co-authored-by: Gregory P. Smith <greg@krypto.org>


https://bugs.python.org/issue35214
2018-11-13 16:39:36 -08:00
Gregory P. Smith 5f4d05d83f
[3.7] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10492)
Adds configure flags for msan and ubsan builds to make it easier to enable.
These also encode the detail that address sanitizer and memory sanitizer
should disable pymalloc.

Define MEMORY_SANITIZER when appropriate at build time and adds workarounds
to existing code to mark things as initialized where the sanitizer is otherwise unable to
determine that.  This lets our build succeed under the memory sanitizer.  not all tests
pass without sanitizer failures yet but we're in pretty good shape after this.

(cherry picked from commit 1584a00815)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google LLC]
2018-11-12 13:48:24 -08:00
Miss Islington (bot) b91c27d89d
bpo-34864: Document two IDLE on MacOS issues. (GH-10456)
The System Preferences Dock "prefer tabs always" setting disables some
IDLE features.  Menus are a bit different than as described for Windows
and Linux.
(cherry picked from commit 50ff02b431)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-11-10 20:46:12 -08:00
Miss Islington (bot) 2847ccae46
bpo-35202: Remove unused imports in idlelib (GH-10438)
(cherry picked from commit 43a74abb3a)

Co-authored-by: Srinivas  Thatiparthy (శ్రీనివాస్  తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2018-11-09 23:06:22 -08:00
Miss Islington (bot) f16ebcd460
bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418)
Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

7db3c48833GH-diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.
(cherry picked from commit 49fa4a9f1e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-11-08 18:13:14 -08:00
Miss Islington (bot) 9d3658147b
bpo-34966: Improve support of method aliases in pydoc. (GH-9823)
Pydoc now does not duplicate docstrings for aliases of inherited methods.
(cherry picked from commit a44d34e179)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-11-07 23:08:05 -08:00
Miss Islington (bot) 3ba5e253de
Revert "bpo-32409: Fix regression in activate.bat on international Windows (GH-10295)" (GH-10403)
This reverts commit c64583b6d3 due to multiple buildbot failures when building it.
(cherry picked from commit 6843ffe453)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-11-07 16:13:58 -08:00