Commit Graph

103246 Commits

Author SHA1 Message Date
Miss Islington (bot) 55a6f73b49
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
(cherry picked from commit ef66f31ce2)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-09 07:25:20 -07:00
Miss Islington (bot) 472f37ab9a
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.
(cherry picked from commit ed70129e15)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2019-09-09 06:40:42 -07:00
T. Wouters 64f7f6efa0 [3.7] bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757) (GH-15769)
The missing dependencies prevented incremental builds from working when you touched any
of these files. Based on GH-14758 by @vemakereporter..
(cherry picked from commit b4612f5d54)




https://bugs.python.org/issue37589



Automerge-Triggered-By: @gpshead
2019-09-09 06:38:37 -07:00
Miss Islington (bot) d3b8a6bf7c
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)
(cherry picked from commit 3a0ddbcdfc)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-09 06:15:27 -07:00
Miss Islington (bot) 9ae9ac1061 bpo-37936: Avoid ignoring files that we actually do track. (GH-15451) (GH-15748)
There were about 14 files that are actually in the repo but that are
covered by the rules in .gitignore.

Git itself takes no notice of what .gitignore says about files that
it's already tracking... but the discrepancy can be confusing to a
human that adds a new file unexpectedly covered by these rules, as
well as to non-Git software that looks at .gitignore but doesn't
implement this wrinkle in its semantics.  (E.g., `rg`.)

Several of these are from rules that apply more broadly than
intended: for example, `Makefile` applies to `Doc/Makefile` and
`Tools/freeze/test/Makefile`, whereas `/Makefile` means only the
`Makefile` at the repo's root.

https://bugs.python.org/issue37936
(cherry picked from commit 5e5e951502)

Authored-by: Greg Price <gnprice@gmail.com>
2019-09-09 08:10:19 -05:00
Miss Islington (bot) 58a7f809ac
bpo-37841: Remove python_uwp dependency on msvcp140.dll (GH-15253)
(cherry picked from commit b0dace3e97)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-09 04:41:28 -07:00
Miss Islington (bot) c257591878
bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)
winerror_to_errno() is no longer automatically generated.
Do not rely on the old _dosmapperr() function.
Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.
(cherry picked from commit 19052a1131)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-09-09 03:39:19 -07:00
Miss Islington (bot) bbf02da42e
bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239)
* bpo-32587: Make winreg.REG_MULTI_SZ support PendingFileRenameOperations

* Address review comments.
(cherry picked from commit e223ba13d8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-09-09 03:04:54 -07:00
Miss Islington (bot) 1af2c0ec2f
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-09-09 02:56:03 -07:00
Miss Islington (bot) 5190b7193c
bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)
RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-09 02:11:22 -07:00
Miss Islington (bot) 021e5db20b
bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)
This is a complement to PR 13375.
(cherry picked from commit 3c87a667bb)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
2019-09-08 03:36:38 -07:00
Miss Islington (bot) 30933d57fc
[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)
(cherry picked from commit 32a960f8e1)

Co-authored-by: Greg Price <gnprice@gmail.com>
(cherry picked from commit 3be4b10749)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-08 03:28:40 -07:00
Miss Islington (bot) a6eac83c18
bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)
(cherry picked from commit 3ccdbc3338)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-09-07 00:16:27 -07:00
Miss Islington (bot) 084ba337a9
bpo-38041: Refine IDLE Shell restart lines. (GH-15709)
Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user.
(cherry picked from commit 38da805d56)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-09-06 11:19:30 -07:00
Miss Islington (bot) 1e2707d7e8 bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15706)
As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380GH-msg346333
[2] https://bugs.python.org/issue36067GH-msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
(cherry picked from commit 042821ae3c)

Co-authored-by: Ruslan Kuprieiev <kupruser@gmail.com>
2019-09-06 11:14:24 +02:00
Miss Islington (bot) 256f03befb
Correct minor gramatical mistake in sys.settrace doc (GH-15637)
(cherry picked from commit 3038e87ba8)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-05 04:31:50 -07:00
Miss Islington (bot) 16af39aa84
bpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368)
Modify the wheel event handler so it can also be used for module, path, and stack browsers.
Patch by George Zhang.
(cherry picked from commit 2cd9025858)

Co-authored-by: GeeTransit <geetransit@gmail.com>
2019-09-04 18:58:22 -07:00
Dong-hee Na 8873bff287 [3.7] bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522) (GH-15687)
https://bugs.python.org/issue22347
(cherry picked from commit 87bd2071c7)


https://bugs.python.org/issue22347



Automerge-Triggered-By: @maxking
2019-09-04 18:16:39 -07:00
Miss Islington (bot) b4f6e444b1
Fix idlelib.help comments (GH-15669)
(cherry picked from commit 6cd9666ce9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-09-04 17:41:45 -07:00
Miss Islington (bot) 6b8121a261
Fix grammar in asyncio-dev.rst (GH-15672)
Automerge-Triggered-By: @ned-deily
(cherry picked from commit 675d17cec4)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2019-09-03 23:13:24 -07:00
Miss Islington (bot) 52fd661623
bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)
The HTML5 output from Sphinx 2.x adds  '<p>' tags within list elements.  Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'.

Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.
(cherry picked from commit 580bdb0ece)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-09-03 14:09:57 -07:00
Ashwin Ramaswami ea21389dda [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654)
…aders. (GH-15239)

Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word

https://bugs.python.org/issue37764

This fix should also be backported to 3.7 and 3.8

https://bugs.python.org/issue37764
(cherry picked from commit c5b242f87f)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>





https://bugs.python.org/issue37764
2019-09-03 09:42:53 -07:00
Miss Islington (bot) 48058050ce
bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)
Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.
(cherry picked from commit 132acaba5a)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-09-02 22:35:19 -07:00
Anthony Sottile ebe709dc1d bpo-36853: Fix suspicious.py to actually print the unused rules (#13579) (#15653)
* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls

(cherry picked from commit e1786b5416)
2019-09-02 15:17:18 -04:00
Miss Islington (bot) 9a28400aac
IDLE: Fix 2 typos found by Min ho Kim. (GH-15617)
(cherry picked from commit 15119bc2a7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-30 13:34:48 -07:00
Miss Islington (bot) 8ba8cc51a9
bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)
Adds a link to `dateutil.parser.isoparse` in the documentation.

It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.

CC: @pitrou

[bpo-37979](https://bugs.python.org/issue37979)

https://bugs.python.org/issue37979

Automerge-Triggered-By: @pitrou
(cherry picked from commit 59725f3bad)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
2019-08-29 07:54:04 -07:00
Miss Islington (bot) 6b50c10f67
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)
(cherry picked from commit 122376df55)

Co-authored-by: Justin Blanchard <UncombedCoconut@gmail.com>
2019-08-29 00:57:41 -07:00
Miss Islington (bot) d3d2650cf8
bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510)
(cherry picked from commit e64f948e76)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-29 00:04:44 -07:00
Miss Islington (bot) be310e03d0 bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15577)
* Fix call_matcher for mock when using methods

* Add NEWS entry

* Use None check and convert doctest to unittest

* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.

* Use reset_mock instead of reinitialization. Change inner class constructor signature for check

* Reword comment regarding call object lookup logic
(cherry picked from commit c96127821e)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-08-29 07:57:37 +01:00
Miss Islington (bot) 409493d0ac
bpo-36167: fix an incorrect capitalization (GH-14482)
(cherry picked from commit 3aa48b88c7)

Co-authored-by: avinassh <avinassh@users.noreply.github.com>
2019-08-28 22:49:20 -07:00
Miss Islington (bot) 554143ebc2
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)
(cherry picked from commit b0caf32981)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2019-08-28 21:52:43 -07:00
Miss Islington (bot) e72dcaa33a Fix typo: Pyssize_t => Py_ssize_t (GH-15411) (#15520)
(cherry picked from commit b3b9619f5e)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-28 14:54:57 -04:00
Miss Islington (bot) ea48966e5d
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)
https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee075)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2019-08-28 10:37:38 -07:00
Miss Islington (bot) 2f0440e6db
bpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)
These appeared in commit c5ae169e1.  The comment on them, as well as
the presence among them of a rule for the .gitignore file itself,
indicate that the author intended these lines to remain only in their
own local working tree -- not to get committed even to their own repo,
let alone merged upstream.

They did nevertheless get committed, because it turns out that Git
takes no notice of what .gitignore says about files that it's already
tracking... for example, this .gitignore file itself.

Give effect to these lines' original intention, by deleting them. :-)

Git tip, for reference: the `.git/info/exclude` file is a handy way
to do exactly what these lines were originally intended to do.  A
related handy file is `~/.config/git/ignore`.  See gitignore(5),
aka `git help ignore`, for details.

https://bugs.python.org/issue37936

Automerge-Triggered-By: @zware
(cherry picked from commit 8c9e9b0cd5)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-08-27 11:41:38 -07:00
Miss Islington (bot) 1bf672f53a
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
(cherry picked from commit 8bf5fef873)

Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
2019-08-26 21:31:27 -07:00
Miss Islington (bot) 31ce015db8
Fix an invalid assertEqual() call in test_descr.py (GH-15318)
(cherry picked from commit 6b2e3256b6)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-08-26 15:59:18 -07:00
Miss Islington (bot) b4e83a350e Remove leftovers from the times when long long wasn't required (GH-15501) (GH-15517)
In a38e9d1399 pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.
(cherry picked from commit 52c1a6a15a)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-26 23:35:06 +01:00
Steve Dower c1c1a33963 [3.7] bpo-37664: Update ensurepip bundled wheels, again (GH-15483) (GH-15529)
https://bugs.python.org/issue37664



Automerge-Triggered-By: @zooba
2019-08-26 12:19:53 -07:00
Serhiy Storchaka c238862292
bpo-36917: Backport basic test for ast.NodeVisitor. (GH-15511) 2019-08-26 14:48:55 +03:00
Miss Islington (bot) a976283821
bpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)
https://bugs.python.org/issue37805

Automerge-Triggered-By: @methane
(cherry picked from commit 44cd86bbdd)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-08-26 00:36:36 -07:00
Miss Islington (bot) 1b15914ebb
bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Cease turning SyntaxWarnings into SyntaxErrors.
(cherry picked from commit 1039f39c9c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-25 23:53:38 -07:00
Miss Islington (bot) ae31b640c4
Doc: Keep the venv/* exclude pattern. (GH-15229)
In case it has been previously created.
(cherry picked from commit 73e0549701)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-08-25 23:19:58 -07:00
Miss Islington (bot) 31ea447ffe bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976)
Co-authored-by: Andrew Nester <andrew.nester.dev@gmail.com>
Co-authored-by: Flavian Hautbois <flavianh@sicara.com>

(cherry picked from commit da27d9b9dc)
2019-08-26 00:30:49 +03:00
Miss Islington (bot) f2b468dd6d
bpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)
These were caused by keeping around a reference to the Squeezer
instance and calling it's load_font() upon config changes, which
sometimes happened even if the shell window no longer existed.

This change completely removes that mechanism, instead having the
editor window properly update its width attribute, which can then
be used by Squeezer.
(cherry picked from commit d4b4c00b57)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-08-24 23:17:19 -07:00
Miss Islington (bot) e6802d8a2e
Fix typo and rearrange words in IDLE news item (GH-15471)
Redo of GH-15402 by GeeTransit and Kyle Stanley.
(cherry picked from commit 0dfc025ccc)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-24 14:44:22 -07:00
Miss Islington (bot) d9140a26c4
Clarify argument types in datetime docs. (GH-15459)
"Arguments may be integers... " could be misunderstand as they also
could be strings.

New wording makes it clear that arguments have to be integers.

modified:   Doc/library/datetime.rst

Automerge-Triggered-By: @pganssle
(cherry picked from commit c5218fce02)

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
2019-08-24 12:58:14 -07:00
GeeTransit 799e4e5270 [3.7] bpo-37461: Fix typo (inifite -> infinite) (GH-15430) 2019-08-24 00:30:25 -04:00
Miss Islington (bot) 8f2606ba75
Fix funny typo in Doc/bugs. (GH-15412)
Fix typo in description of link to mozilla bug report writing guidelines.

Though the URL is misleading, we're indeed trying to write bug _reports_, not to add bugs.

Automerge-Triggered-By: @ned-deily
(cherry picked from commit e17f201cd9)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
2019-08-23 21:15:56 -07:00
Miss Islington (bot) f8dc3e85ab
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
(cherry picked from commit 5be666010e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-08-23 12:01:38 -07:00
Miss Islington (bot) 8fac472436
Fix _PyTime_MIN/MAX values (GH-15384)
_PyTime_t type is defined as int64_t, and so min/max are INT64_MIN/INT64_MAX,
not PY_LLONG_MIN/PY_LLONG_MAX.
(cherry picked from commit 8e76c45622)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-23 08:56:51 -07:00