]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agoAdd a link to buffer protocol in bytearray() doc (GH-22675)
Antoine [Mon, 26 Oct 2020 05:26:34 +0000 (06:26 +0100)] 
Add a link to buffer protocol in bytearray() doc (GH-22675)

5 years agobpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow (GH...
Alexey Izbyshev [Mon, 26 Oct 2020 00:09:32 +0000 (03:09 +0300)] 
bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow (GH-22966)

Fix memory leak in subprocess.Popen() in case of uid/gid overflow

Also add a test that would catch this leak with `--huntrleaks`.

Alas, the test for `extra_groups` also exposes an inconsistency
in our error reporting: we use a custom ValueError for `extra_groups`,
but propagate OverflowError for `user` and `group`.

5 years agobpo-42150: Avoid buffer overflow in the new parser (GH-22978)
Pablo Galindo [Sun, 25 Oct 2020 23:03:41 +0000 (23:03 +0000)] 
bpo-42150: Avoid buffer overflow in the new parser (GH-22978)

5 years agobpo-42043: Add support for zipfile.Path subclasses (#22716)
Jason R. Coombs [Sun, 25 Oct 2020 18:45:05 +0000 (14:45 -0400)] 
bpo-42043: Add support for zipfile.Path subclasses (#22716)

* bpo-42043: Add support for zipfile.Path inheritance as introduced in zipp 3.2.0.

* Add blurb.

5 years agobpo-41919: Avoid resource leak in test_io (GH-22973)
Hai Shi [Sun, 25 Oct 2020 18:38:33 +0000 (02:38 +0800)] 
bpo-41919: Avoid resource leak in test_io (GH-22973)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915)
Jason R. Coombs [Sun, 25 Oct 2020 18:21:46 +0000 (14:21 -0400)] 
bpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915)

* bpo-41490: ``path`` method to aggressively close handles

* Add blurb

* In ZipReader.contents, eagerly evaluate the contents to release references to the zipfile.

* Instead use _ensure_sequence to ensure any iterable from a reader is eagerly converted to a list if it's not already a sequence.

5 years agobpo-42144: Add a missing "goto error;" in the _ssl module (GH-22959)
Zackery Spytz [Sun, 25 Oct 2020 18:02:30 +0000 (12:02 -0600)] 
bpo-42144: Add a missing "goto error;" in the _ssl module (GH-22959)

5 years agobpo-39108: Document threading issues for random.gauss() (GH-22928)
Raymond Hettinger [Sun, 25 Oct 2020 14:59:01 +0000 (07:59 -0700)] 
bpo-39108: Document threading issues for random.gauss() (GH-22928)

5 years agoSplit-out a fourth section in the descriptor HowTo guide (GH-22965)
Raymond Hettinger [Sun, 25 Oct 2020 14:12:50 +0000 (07:12 -0700)] 
Split-out a fourth section in the descriptor HowTo guide (GH-22965)

5 years agoCorrectly compare the hint against the keys in _PyDict_GetItemHint (GH-22960)
Pablo Galindo [Sun, 25 Oct 2020 06:08:17 +0000 (06:08 +0000)] 
Correctly compare the hint against the keys in _PyDict_GetItemHint (GH-22960)

5 years agoSecond round of updates to the descriptor howto guide (GH-22946)
Raymond Hettinger [Sun, 25 Oct 2020 03:34:39 +0000 (20:34 -0700)] 
Second round of updates to the descriptor howto guide (GH-22946)

5 years agobpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
Mark Roseman [Sun, 25 Oct 2020 03:14:02 +0000 (20:14 -0700)] 
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)

5 years agobpo-42127: Document effect of cached_property on key-sharing dictionaries (GH-22930)
Raymond Hettinger [Sun, 25 Oct 2020 01:17:17 +0000 (18:17 -0700)] 
bpo-42127:  Document effect of cached_property on key-sharing dictionaries (GH-22930)

5 years agobpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
Mark Roseman [Sat, 24 Oct 2020 23:45:00 +0000 (16:45 -0700)] 
bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)

5 years agobpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
Mark Roseman [Sat, 24 Oct 2020 23:32:34 +0000 (16:32 -0700)] 
bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)

5 years agobpo-35823: Allow setsid() after vfork() on Linux. (GH-22945)
Gregory P. Smith [Sat, 24 Oct 2020 19:07:35 +0000 (12:07 -0700)] 
bpo-35823: Allow setsid() after vfork() on Linux. (GH-22945)

It should just be a syscall updating a couple of fields in the kernel side
process info.  Confirming, in glibc is appears to be a shim for the setsid
syscall (based on not finding any code implementing anything special for it)
and in uclibc (*much* easier to read) it is clearly just a setsid syscall shim.

A breadcrumb _suggesting_ that it is not allowed on Darwin/macOS comes from
a commit in emacs: https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00297.html
but I don't have a way to verify if that is true or not.
As we are not supporting vfork on macOS today I just left a note in a comment.

5 years agobpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 (GH-22870)
Serhiy Storchaka [Sat, 24 Oct 2020 18:14:23 +0000 (21:14 +0300)] 
bpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 (GH-22870)

5 years agobpo-35823: subprocess: Fix handling of pthread_sigmask() errors (GH-22944)
Alexey Izbyshev [Sat, 24 Oct 2020 17:47:38 +0000 (20:47 +0300)] 
bpo-35823: subprocess: Fix handling of pthread_sigmask() errors (GH-22944)

Using POSIX_CALL() is incorrect since pthread_sigmask() returns
the error number instead of setting errno.

Also handle failure of the first call to pthread_sigmask()
in the parent process, and explain why we don't handle failure
of the second call in a comment.

5 years ago[doc] Fix link to abc.ABCMeta.register in Glossary (GH-22932)
Andre Delfino [Sat, 24 Oct 2020 14:29:17 +0000 (11:29 -0300)] 
[doc] Fix link to abc.ABCMeta.register in Glossary (GH-22932)

5 years agoAutomatically add skip news and skip issue label to dependabot PRs (GH-22927)
Mariatta [Sat, 24 Oct 2020 14:12:55 +0000 (07:12 -0700)] 
Automatically add skip news and skip issue label to dependabot PRs (GH-22927)

Closes https://github.com/python/bedevere/issues/287

5 years agobpo-42139: Update What's New 3.9 for master (#22936)
Terry Jan Reedy [Sat, 24 Oct 2020 03:59:33 +0000 (23:59 -0400)] 
bpo-42139: Update What's New 3.9 for master (#22936)

5 years agobpo-19072: Update descriptor howto for decorator chaining (GH-22934)
Raymond Hettinger [Sat, 24 Oct 2020 01:37:27 +0000 (18:37 -0700)] 
bpo-19072: Update descriptor howto for decorator chaining (GH-22934)

5 years agoMention in "What's New" that the import system is starting to be cleaned up (GH-22931)
Brett Cannon [Sat, 24 Oct 2020 01:10:54 +0000 (18:10 -0700)] 
Mention in "What's New" that the import system is starting to be cleaned up (GH-22931)

Automerge-Triggered-By: GH:brettcannon
5 years agobpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe (GH-11671)
Alexey Izbyshev [Sat, 24 Oct 2020 00:47:01 +0000 (03:47 +0300)] 
bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe (GH-11671)

* bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe

When used to run a new executable image, fork() is not a good choice
for process creation, especially if the parent has a large working set:
fork() needs to copy page tables, which is slow, and may fail on systems
where overcommit is disabled, despite that the child is not going to
touch most of its address space.

Currently, subprocess is capable of using posix_spawn() instead, which
normally provides much better performance. However, posix_spawn() does not
support many of child setup operations exposed by subprocess.Popen().
Most notably, it's not possible to express `close_fds=True`, which
happens to be the default, via posix_spawn(). As a result, most users
can't benefit from faster process creation, at least not without
changing their code.

However, Linux provides vfork() system call, which creates a new process
without copying the address space of the parent, and which is actually
used by C libraries to efficiently implement posix_spawn(). Due to sharing
of the address space and even the stack with the parent, extreme care
is required to use vfork(). At least the following restrictions must hold:

* No signal handlers must execute in the child process. Otherwise, they
  might clobber memory shared with the parent, potentially confusing it.

* Any library function called after vfork() in the child must be
  async-signal-safe (as for fork()), but it must also not interact with any
  library state in a way that might break due to address space sharing
  and/or lack of any preparations performed by libraries on normal fork().
  POSIX.1 permits to call only execve() and _exit(), and later revisions
  remove vfork() specification entirely. In practice, however, almost all
  operations needed by subprocess.Popen() can be safely implemented on
  Linux.

* Due to sharing of the stack with the parent, the child must be careful
  not to clobber local variables that are alive across vfork() call.
  Compilers are normally aware of this and take extra care with vfork()
  (and setjmp(), which has a similar problem).

* In case the parent is privileged, special attention must be paid to vfork()
  use, because sharing an address space across different privilege domains
  is insecure[1].

This patch adds support for using vfork() instead of fork() on Linux
when it's possible to do safely given the above. In particular:

* vfork() is not used if credential switch is requested. The reverse case
  (simple subprocess.Popen() but another application thread switches
  credentials concurrently) is not possible for pure-Python apps because
  subprocess.Popen() and functions like os.setuid() are mutually excluded
  via GIL. We might also consider to add a way to opt-out of vfork() (and
  posix_spawn() on platforms where it might be implemented via vfork()) in
  a future PR.

* vfork() is not used if `preexec_fn != None`.

With this change, subprocess will still use posix_spawn() if possible, but
will fallback to vfork() on Linux in most cases, and, failing that,
to fork().

[1] https://ewontfix.com/7

Co-authored-by: Gregory P. Smith [Google LLC] <gps@google.com>
5 years agobpo-38976: Add support for HTTP Only flag in MozillaCookieJar (#17471)
Jacob Neil Taylor [Fri, 23 Oct 2020 22:48:55 +0000 (09:48 +1100)] 
bpo-38976: Add support for HTTP Only flag in MozillaCookieJar (#17471)

Add support for HTTP Only flag in MozillaCookieJar

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobuild(deps): bump actions/upload-artifact from v1 to v2.2.0 (GH-22920)
dependabot[bot] [Fri, 23 Oct 2020 21:32:12 +0000 (14:32 -0700)] 
build(deps): bump actions/upload-artifact from v1 to v2.2.0 (GH-22920)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v1 to v2.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v2.2.0</h2>
<ul>
<li>Support for artifact retention</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/upload-artifact/commit/27bce4eee761b5bc643f46a8dfb41b430c8d05f6"><code>27bce4e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/112">#112</a> from thboop/main</li>
<li><a href="https://github.com/actions/upload-artifact/commit/f8b42f7ab442a66b3d51a5ca02855b194a36ae2d"><code>f8b42f7</code></a> update licensed files</li>
<li><a href="https://github.com/actions/upload-artifact/commit/2106e8cf10e032ca9d5724c4c676543febe74f0b"><code>2106e8c</code></a> update contributing.md</li>
<li><a href="https://github.com/actions/upload-artifact/commit/db66798ebcfbaa7f3f8ff66bce013213265c30d1"><code>db66798</code></a> Ignore Generated Files in Git PR's</li>
<li><a href="https://github.com/actions/upload-artifact/commit/d359fd0772ed6802a84728dd6b09ec99f41a67b7"><code>d359fd0</code></a> Manual Verification of licenses</li>
<li><a href="https://github.com/actions/upload-artifact/commit/350822c32f871c559dbe1667c24424e06c4f03e3"><code>350822c</code></a> Add Licensed Workflow and config</li>
<li><a href="https://github.com/actions/upload-artifact/commit/abecf4abf4b70bc636949d61150be883b87416c2"><code>abecf4a</code></a> Updated README.md (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/118">#118</a>)</li>
<li><a href="https://github.com/actions/upload-artifact/commit/604e071d21906545dedcfaf210deae74f8c5276a"><code>604e071</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/126">#126</a> from yacaovsnc/main</li>
<li><a href="https://github.com/actions/upload-artifact/commit/4560c23b396d494f0cb7066e1d6e258e8feb8051"><code>4560c23</code></a> Check for invalid retention-days input</li>
<li><a href="https://github.com/actions/upload-artifact/commit/59018c2f85dd0e101b75544aa87f13bb0c94e0b7"><code>59018c2</code></a> Add an option to specify retention period</li>
<li>Additional commits viewable in <a href="https://github.com/actions/upload-artifact/compare/v1...27bce4eee761b5bc643f46a8dfb41b430c8d05f6">compare view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Automerge-Triggered-By: GH:Mariatta
5 years agobuild(deps): bump actions/cache from v1 to v2.1.2 (GH-22919)
dependabot[bot] [Fri, 23 Oct 2020 21:29:41 +0000 (14:29 -0700)] 
build(deps): bump actions/cache from v1 to v2.1.2 (GH-22919)

Bumps [actions/cache](https://github.com/actions/cache) from v1 to v2.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p>
<blockquote>
<h2>v2.1.2</h2>
<ul>
<li>Adds input to limit the chunk upload size, useful for self-hosted runners with slower upload speeds</li>
<li>No-op when executing on GHES</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/cache/commit/d1255ad9362389eac595a9ae406b8e8cb3331f16"><code>d1255ad</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/cache/issues/424">#424</a> from actions/dhadka/upload-chunk-size</li>
<li><a href="https://github.com/actions/cache/commit/68cfb2ccb73b1982be3fa55e3d7c842697d7f1ed"><code>68cfb2c</code></a> Add units to description</li>
<li><a href="https://github.com/actions/cache/commit/cce3c03a74623545a53c433d301f3f7725c72454"><code>cce3c03</code></a> Add new input to action.yml</li>
<li><a href="https://github.com/actions/cache/commit/4bceb75b5b7743784c63c94b81c50a485cbdcda0"><code>4bceb75</code></a> Use parseInt instead of Number to handle empty strings</li>
<li><a href="https://github.com/actions/cache/commit/a6f1f4b32eec85780fedc5b354a583e9b2999100"><code>a6f1f4b</code></a> Adds input for upload chunk size</li>
<li><a href="https://github.com/actions/cache/commit/d606e039ae32f64a8593bf4a37b0bf205c695237"><code>d606e03</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/cache/issues/421">#421</a> from actions/dhadka/ghes</li>
<li><a href="https://github.com/actions/cache/commit/d3e4f218f30bd71a2c29e2b2a1e4f811f4327162"><code>d3e4f21</code></a> Use warning instead of info</li>
<li><a href="https://github.com/actions/cache/commit/55a58944386e69f7c5bad52ef43a61c578b6c1c6"><code>55a5894</code></a> Update dist</li>
<li><a href="https://github.com/actions/cache/commit/3f6dfcbcc44a8e2fd9e539c1dd15af6559e74ced"><code>3f6dfcb</code></a> Merge branch 'main' of <a href="http://github.com/actions/cache">http://github.com/actions/cache</a> into dhadka/ghes</li>
<li><a href="https://github.com/actions/cache/commit/0f71d4ac9a7f4c36aba5ac3cfc4567d2d4eae813"><code>0f71d4a</code></a> Add tests for isGhes</li>
<li>Additional commits viewable in <a href="https://github.com/actions/cache/compare/v1...d1255ad9362389eac595a9ae406b8e8cb3331f16">compare view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Automerge-Triggered-By: GH:Mariatta
5 years agoAllow dependabot to check GitHub actions monthly (GH-22787)
John Losito [Fri, 23 Oct 2020 21:06:13 +0000 (17:06 -0400)] 
Allow dependabot to check GitHub actions monthly (GH-22787)

Let Dependabot update GitHub Actions dependency once a month.

Here's reference to the dependabot configs.

https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot

5 years agoCreate a primer section for the descriptor howto guide (GH-22906)
Raymond Hettinger [Fri, 23 Oct 2020 19:55:39 +0000 (12:55 -0700)] 
Create a primer section for the descriptor howto guide (GH-22906)

5 years agoAdd GitHub sponsor info for Python (GH-22887)
Mariatta [Fri, 23 Oct 2020 15:23:58 +0000 (08:23 -0700)] 
Add GitHub sponsor info for Python (GH-22887)

Sponsor Python on GitHub

5 years agoAdd Mark Shannon to CODEOWNERS. (#22914)
Mark Shannon [Fri, 23 Oct 2020 12:05:48 +0000 (13:05 +0100)] 
Add Mark Shannon to CODEOWNERS. (#22914)

5 years agobpo-40592: shutil.which will not return None anymore if ; is the last char in PATHEXT...
Christopher Marchfelder [Fri, 23 Oct 2020 10:08:24 +0000 (12:08 +0200)] 
bpo-40592: shutil.which will not return None anymore if ; is the last char in PATHEXT (GH-20088)

shutil.which will not return None anymore for empty str in PATHEXT
Empty PATHEXT will now be defaulted to _WIN_DEFAULT_PATHEXT

5 years agobpo-36876: Fix the C analyzer tool. (GH-22841)
Eric Snow [Fri, 23 Oct 2020 00:42:51 +0000 (18:42 -0600)] 
bpo-36876: Fix the C analyzer tool. (GH-22841)

The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.)  It take ~40 seconds on my machine to analyze the full CPython code base.

Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close.

https://bugs.python.org/issue36876

5 years agobpo-38486: Fix dead qmail links in the mailbox docs (GH-22239)
Zackery Spytz [Thu, 22 Oct 2020 23:33:28 +0000 (17:33 -0600)] 
bpo-38486: Fix dead qmail links in the mailbox docs (GH-22239)

5 years agobpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433)
Cheryl Sabella [Thu, 22 Oct 2020 19:14:35 +0000 (15:14 -0400)] 
bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433)

5 years agoAdd CODEOWNERS for the Grammar file (GH-22898)
Lysandros Nikolaou [Thu, 22 Oct 2020 18:26:14 +0000 (21:26 +0300)] 
Add CODEOWNERS for the Grammar file (GH-22898)

5 years agobpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)
Petr Viktorin [Thu, 22 Oct 2020 16:11:53 +0000 (18:11 +0200)] 
bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)

5 years agobpo-42086: Document AST operator nodes acts as a singleton (GH-22896)
Batuhan Taskaya [Thu, 22 Oct 2020 16:02:43 +0000 (19:02 +0300)] 
bpo-42086: Document AST operator nodes acts as a singleton (GH-22896)

Automerge-Triggered-By: GH:gvanrossum
5 years agobpo-42057: Add regression test to master. (GH-22893)
Mark Shannon [Thu, 22 Oct 2020 15:42:26 +0000 (16:42 +0100)] 
bpo-42057: Add regression test to master. (GH-22893)

5 years agobpo-25655: Improve Win DLL loading failures doc (GH-22372)
Philippe Ombredanne [Thu, 22 Oct 2020 15:39:18 +0000 (17:39 +0200)] 
bpo-25655: Improve Win DLL loading failures doc (GH-22372)

Add documentation to help diagnose CDLL dependent DLL loading errors
on windows for OSError with message:
"[WinError 126] The specified module could not be found"
This error is otherwise difficult to diagnose.

5 years agoRemove 3.5 from Doc version switcher in master. (#22886)
larryhastings [Thu, 22 Oct 2020 13:16:21 +0000 (06:16 -0700)] 
Remove 3.5 from Doc version switcher in master. (#22886)

5 years agobpo-1635741: Fix NULL ptr deref in multiprocessing (GH-22880)
Christian Heimes [Thu, 22 Oct 2020 10:20:36 +0000 (12:20 +0200)] 
bpo-1635741: Fix NULL ptr deref in multiprocessing (GH-22880)

Commit 1d541c25c8019f7a0b80b3e1b437abe171e40b65 introduced a NULL
pointer dereference in error path.

Signed-off-by: Christian Heimes <christian@python.org>
5 years ago_testmultiphase: Fix possible ref leak (GH-22881)
Dong-hee Na [Thu, 22 Oct 2020 09:44:18 +0000 (18:44 +0900)] 
_testmultiphase: Fix possible ref leak (GH-22881)

This is just test code, but sometimes external contributors reference the code snippets from test code.
`PyModule_AddObject` should be handled in the proper way.

https://docs.python.org/3/c-api/module.html#c.PyModule_AddObject

5 years agoDelete TaskWakeupMethWrapper_Type and use PyCFunction instead (#22875)
Vladimir Matveev [Thu, 22 Oct 2020 00:49:10 +0000 (17:49 -0700)] 
Delete TaskWakeupMethWrapper_Type and use PyCFunction instead (#22875)

5 years agobpo-41910: specify the default implementations of object.__eq__ and object.__ne__...
Brett Cannon [Wed, 21 Oct 2020 23:24:38 +0000 (16:24 -0700)] 
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874)

See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.

Automerge-Triggered-By: GH:brettcannon
5 years agobpo-38980: Add -fno-semantic-interposition when building with optimizations (GH-22862)
Pablo Galindo [Wed, 21 Oct 2020 21:46:52 +0000 (22:46 +0100)] 
bpo-38980: Add -fno-semantic-interposition when building with optimizations (GH-22862)

5 years agobpo-35181: Correct importlib documentation for some module attributes (GH-15190)
Géry Ogam [Wed, 21 Oct 2020 21:17:35 +0000 (23:17 +0200)] 
bpo-35181: Correct importlib documentation for some module attributes (GH-15190)

@ericsnowcurrently This PR will change the following:

In the library documentation importlib.rst:

- `module.__package__` can be `module.__name__` for packages;
- `spec.parent` can be `spec.__name__` for packages;
- `spec.loader` is not `None` for namespaces packages.

In the language documentation import.rst:

- `spec.loader` is not `None` for namespace packages.

Automerge-Triggered-By: GH:warsaw
5 years agoFix bpo-39416: Change "Numeric" to lower case; an english word, not a class name...
kpinc [Wed, 21 Oct 2020 20:34:15 +0000 (15:34 -0500)] 
Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class name (GH-22867)

This is a trivial fix to [bpo-39416](), which didn't come up until it was already committed

```
Change "Numeric" to "numeric".

I believe this is trivial enough to not need an issue or a NEWS entry, although
I'm unclear on what branches the original pull request received backports.
```

Automerge-Triggered-By: GH:merwok
5 years agobpo-41746: Cast to typed seqs in CHECK macros to avoid type erasure (GH-22864)
Lysandros Nikolaou [Wed, 21 Oct 2020 19:53:14 +0000 (22:53 +0300)] 
bpo-41746: Cast to typed seqs in CHECK macros to avoid type erasure (GH-22864)

5 years agobpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text (GH-22580)
Raúl Cumplido [Wed, 21 Oct 2020 19:05:48 +0000 (21:05 +0200)] 
bpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text (GH-22580)

While translating the following document to Spanish we found there is a grammar issue on the original documentation.

5 years agobpo-39416: Document some restrictions on the default string representations of numeri...
kpinc [Wed, 21 Oct 2020 17:13:50 +0000 (12:13 -0500)] 
bpo-39416: Document some restrictions on the default string representations of numeric classes (GH-18111)

[bpo-39416](): Document string representations of the Numeric classes

This is a change to the specification of the Python language.

The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes.  That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.

Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/

5 years agobpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)
Batuhan Taskaya [Wed, 21 Oct 2020 13:49:22 +0000 (16:49 +0300)] 
bpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)

* bpo-41747: Ensure all dataclass methods uses their parents' qualname

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agoUpdate tzdata to 2020.3 (GH-22856)
Paul Ganssle [Wed, 21 Oct 2020 13:40:43 +0000 (09:40 -0400)] 
Update tzdata to 2020.3 (GH-22856)

TBH I had forgotten that we pin this 😅, and it's been updated quite a few times since we added this.

5 years agoDoc: Fix a typo/error in the docs for cached bytecode (GH-22445)
Zackery Spytz [Wed, 21 Oct 2020 08:36:03 +0000 (02:36 -0600)] 
Doc: Fix a typo/error in the docs for cached bytecode (GH-22445)

5 years agoDoc: Do not suggest `s[::-1]` for reversed order (GH-22457)
Andre Delfino [Wed, 21 Oct 2020 08:25:07 +0000 (05:25 -0300)] 
Doc: Do not suggest `s[::-1]` for reversed order (GH-22457)

5 years agoDoc: Remove old Python version from future stmt (GH-21802)
Andre Delfino [Wed, 21 Oct 2020 05:45:13 +0000 (02:45 -0300)] 
Doc: Remove old Python version from future stmt (GH-21802)

5 years agoDoc: Do not encourage using a base class name in a derived class (GH-22177)
Andre Delfino [Wed, 21 Oct 2020 05:25:05 +0000 (02:25 -0300)] 
Doc: Do not encourage using a base class name in a derived class (GH-22177)

5 years agobpo-41902: Micro optimization for range.index if step is 1 (GH-22479)
Dong-hee Na [Wed, 21 Oct 2020 02:29:56 +0000 (11:29 +0900)] 
bpo-41902: Micro optimization for range.index if step is 1 (GH-22479)

5 years agobpo-23706: Add newline parameter to pathlib.Path.write_text (GH-22420) (GH-22420)
Максим [Wed, 21 Oct 2020 02:08:19 +0000 (05:08 +0300)] 
bpo-23706: Add newline parameter to pathlib.Path.write_text (GH-22420) (GH-22420)

* Add _newline_ parameter to `pathlib.Path.write_text()`
* Update documentation of `pathlib.Path.write_text()`
* Add test case for `pathlib.Path.write_text()` calls with _newline_ parameter passed

Automerge-Triggered-By: GH:methane
5 years agobpo-41902: Micro optimization for compute_item of range (GH-22492)
Dong-hee Na [Wed, 21 Oct 2020 01:29:14 +0000 (10:29 +0900)] 
bpo-41902: Micro optimization for compute_item of range (GH-22492)

5 years agoUpdate idlelib/help.html to current Sphinx output (GH-22833)
Terry Jan Reedy [Wed, 21 Oct 2020 00:56:01 +0000 (20:56 -0400)] 
Update idlelib/help.html to current Sphinx output (GH-22833)

idle.rst is unchanged

5 years agobpo-41586: Attempt to make the pipesize tests more robust. (GH-22839)
Gregory P. Smith [Wed, 21 Oct 2020 00:37:20 +0000 (17:37 -0700)] 
bpo-41586: Attempt to make the pipesize tests more robust. (GH-22839)

Several buildbots are failing on these, likely due to an inability to
set the pipe size to the desired test value.

5 years agobpo-42010: [docs] Clarify subscription of types (GH-22822)
kj [Tue, 20 Oct 2020 23:38:08 +0000 (07:38 +0800)] 
bpo-42010: [docs] Clarify subscription of types (GH-22822)

5 years agobpo-29981: Add examples and update index for set, dict, and generator comprehensions...
Florian Dahlitz [Tue, 20 Oct 2020 21:27:07 +0000 (23:27 +0200)] 
bpo-29981: Add examples and update index for set, dict, and generator comprehensions'(GH-20272)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agobpo-42041: Clarify how subprocess searches for the executable (GH-22715)
Paul Moore [Tue, 20 Oct 2020 20:02:24 +0000 (21:02 +0100)] 
bpo-42041: Clarify how subprocess searches for the executable (GH-22715)

Clarify in the subprocess documentation how searching for the executable to run works, noting that ``sys.executable`` is the recommended way to find the current interpreter.

5 years agoMinor tweaks to typing union objects doc (GH-22741)
Andre Delfino [Tue, 20 Oct 2020 20:00:56 +0000 (17:00 -0300)] 
Minor tweaks to typing union objects doc (GH-22741)

Automerge-Triggered-By: @merwok
5 years agobpo-41192: Add documentation of undocumented audit events (GH-21308)
Saiyang Gou [Tue, 20 Oct 2020 19:23:15 +0000 (12:23 -0700)] 
bpo-41192: Add documentation of undocumented audit events (GH-21308)

5 years agobpo-38144: Re-add accidentally removed audition for glob. (GH-22805)
Serhiy Storchaka [Tue, 20 Oct 2020 16:45:38 +0000 (19:45 +0300)] 
bpo-38144: Re-add accidentally removed audition for glob. (GH-22805)

5 years agobpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew Clove...
Steve Dower [Tue, 20 Oct 2020 14:54:13 +0000 (15:54 +0100)] 
bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew Clover (GH-22817)

5 years agobpo-41192: Clarify the sys module's description of the auditing feature (GH-22768)
Andrew Kuchling [Tue, 20 Oct 2020 14:41:02 +0000 (10:41 -0400)] 
bpo-41192: Clarify the sys module's description of the auditing feature (GH-22768)

Co-authored-by: Éric Araujo <merwok@netwok.org>
5 years agobpo-39693: mention KeyError in tarfile extractfile documentation (GH-18639)
Andrey Doroschenko [Tue, 20 Oct 2020 14:05:01 +0000 (17:05 +0300)] 
bpo-39693: mention KeyError in tarfile extractfile documentation (GH-18639)

Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
5 years agobpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)
Miro Hrončok [Tue, 20 Oct 2020 12:21:08 +0000 (14:21 +0200)] 
bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)

5 years agobpo-30612: Tweak Windows registry path syntax in the docs (GH-20281)
Zackery Spytz [Tue, 20 Oct 2020 12:01:12 +0000 (06:01 -0600)] 
bpo-30612: Tweak Windows registry path syntax in the docs (GH-20281)

5 years agobpo-38324: Fix test__locale.py Windows failures (GH-20529)
TIGirardi [Tue, 20 Oct 2020 11:39:52 +0000 (08:39 -0300)] 
bpo-38324: Fix test__locale.py Windows failures (GH-20529)

Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows

5 years agomd5module: Fix doc strings variable names (GH-22722)
Jakub Jelen [Tue, 20 Oct 2020 09:10:43 +0000 (11:10 +0200)] 
md5module: Fix doc strings variable names (GH-22722)

5 years agoDoc: Add missing spaces after period for `posix_spawn` (GH-22730)
Tomer Cohen [Tue, 20 Oct 2020 09:08:58 +0000 (12:08 +0300)] 
Doc: Add missing spaces after period for `posix_spawn` (GH-22730)

5 years agobpo-41491: plistlib: accept hexadecimal integer values in xml plist files (GH-22764)
Ronald Oussoren [Tue, 20 Oct 2020 07:26:33 +0000 (09:26 +0200)] 
bpo-41491: plistlib: accept hexadecimal integer values in xml plist files (GH-22764)

5 years agobpo-42093: Add opcode cache for LOAD_ATTR (GH-22803)
Pablo Galindo [Tue, 20 Oct 2020 05:22:44 +0000 (06:22 +0100)] 
bpo-42093: Add opcode cache for LOAD_ATTR (GH-22803)

5 years agobpo-4356: Add key function support to the bisect module (GH-20556)
Raymond Hettinger [Tue, 20 Oct 2020 05:04:01 +0000 (22:04 -0700)] 
bpo-4356: Add key function support to the bisect module (GH-20556)

5 years agobpo-38912: fix close before connect callback in test_asyncio SSL tests (GH-22691)
Justin Turner Arthur [Tue, 20 Oct 2020 01:18:57 +0000 (20:18 -0500)] 
bpo-38912: fix close before connect callback in test_asyncio SSL tests (GH-22691)

Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it.

5 years agobpo-41586: Add pipesize parameter to subprocess & F_GETPIPE_SZ and F_SETPIPE_SZ to...
Ruben Vorderman [Mon, 19 Oct 2020 23:30:02 +0000 (01:30 +0200)] 
bpo-41586: Add pipesize parameter to subprocess & F_GETPIPE_SZ and F_SETPIPE_SZ to fcntl. (GH-21921)

* Add F_SETPIPE_SZ and F_GETPIPE_SZ to fcntl module
* Add pipesize parameter for subprocess.Popen class

This will allow the user to control the size of the pipes.
On linux the default is 64K. When a pipe is full it blocks for writing.
When a pipe is empty it blocks for reading. On processes that are
very fast this can lead to a lot of wasted CPU cycles. On a typical
Linux system the max pipe size is 1024K which is much better.
For high performance-oriented libraries such as xopen it is nice to
be able to set the pipe size.

The workaround without this feature is to use my_popen_process.stdout.fileno() in
conjuction with fcntl and 1031 (value of F_SETPIPE_SZ) to acquire this behavior.

5 years agobpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)
Mark Sapiro [Mon, 19 Oct 2020 22:49:19 +0000 (15:49 -0700)] 
bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)

This PR replaces #1977. The reason for the replacement is two-fold.

The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit.

Also the tests are different. The test_nonascii_as_string_without_cte test in #1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness.

Automerge-Triggered-By: @warsaw
5 years agobpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)
Zackery Spytz [Mon, 19 Oct 2020 22:47:37 +0000 (16:47 -0600)] 
bpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)

It was moved out of the limited API in 7d95e4072169911b228c9e42367afb5f17fd3db0.
This change re-enables it from 3.10, to avoid generating invalid extension modules for earlier versions.

5 years agobpo-40901: Describe what "interface name" means on Windows (GH-20694)
Jakub Stasiak [Mon, 19 Oct 2020 22:30:58 +0000 (00:30 +0200)] 
bpo-40901: Describe what "interface name" means on Windows (GH-20694)

5 years agobpo-41784: make PyUnicode_AsUTF8AndSize part of the limited API (GH-22252)
Alex Gaynor [Mon, 19 Oct 2020 22:17:50 +0000 (18:17 -0400)] 
bpo-41784: make PyUnicode_AsUTF8AndSize part of the limited API (GH-22252)

5 years agobpo-41217: Fix incorrect note in the asyncio.create_subprocess_shell() docs (GH-21360)
Zackery Spytz [Mon, 19 Oct 2020 22:08:34 +0000 (16:08 -0600)] 
bpo-41217: Fix incorrect note in the asyncio.create_subprocess_shell() docs (GH-21360)

On Windows, the default asyncio event loop is ProactorEventLoop (as of 3.8).

5 years agobpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)
Jason R. Coombs [Mon, 19 Oct 2020 22:06:05 +0000 (18:06 -0400)] 
bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-41292: Fixes dead link to cx_freeze from Windows FAQ (GH-21463)
Michel Samia [Mon, 19 Oct 2020 22:02:43 +0000 (00:02 +0200)] 
bpo-41292: Fixes dead link to cx_freeze from Windows FAQ (GH-21463)

5 years agoLink to the msvcrt module from the Windows FAQ (#22268)
abdo [Mon, 19 Oct 2020 21:46:21 +0000 (00:46 +0300)] 
Link to the msvcrt module from the Windows FAQ (#22268)

5 years agobpo-38320: Clarify that expectedFailure is satisfied by either failure or error of...
Irit Katriel [Mon, 19 Oct 2020 21:27:16 +0000 (22:27 +0100)] 
bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740)

5 years agobpo-42089: Sync with current cpython branch of importlib_metadata (GH-22775)
Barry Warsaw [Mon, 19 Oct 2020 21:14:21 +0000 (14:14 -0700)] 
bpo-42089: Sync with current cpython branch of importlib_metadata (GH-22775)

~~The only differences are in the test files.~~

Automerge-Triggered-By: @jaraco
5 years agobpo-42084: Language aware diff headers (GH-22776)
Raymond Hettinger [Mon, 19 Oct 2020 19:13:01 +0000 (12:13 -0700)] 
bpo-42084: Language aware diff headers (GH-22776)

5 years agobpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762)
Ronald Oussoren [Mon, 19 Oct 2020 18:16:21 +0000 (20:16 +0200)] 
bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762)

5 years agobpo-42051: Reject XML entity declarations in plist files (#22760)
Ronald Oussoren [Mon, 19 Oct 2020 18:13:49 +0000 (20:13 +0200)] 
bpo-42051: Reject XML entity declarations in plist files (#22760)

5 years agobpo-39107: Updated Tcl and Tk to 8.6.10 in Windows installer (GH-22405)
Steve Dower [Mon, 19 Oct 2020 15:55:10 +0000 (16:55 +0100)] 
bpo-39107: Updated Tcl and Tk to 8.6.10 in Windows installer (GH-22405)

5 years agobpo-41192: Fix some broken anchors for audit event entries (#21310)
Saiyang Gou [Mon, 19 Oct 2020 14:52:42 +0000 (07:52 -0700)] 
bpo-41192: Fix some broken anchors for audit event entries (#21310)

5 years agoCorrect name of bytecode in change note. (GH-22723)
Mark Shannon [Mon, 19 Oct 2020 12:20:33 +0000 (13:20 +0100)] 
Correct name of bytecode in change note. (GH-22723)

5 years agobpo-19270: Fixed sched.scheduler.cancel to cancel correct event (GH-22729)
Bar Harel [Mon, 19 Oct 2020 07:33:43 +0000 (10:33 +0300)] 
bpo-19270: Fixed sched.scheduler.cancel to cancel correct event (GH-22729)

5 years agobpo-40484: Document compiler flags under AST module (GH-19885)
Batuhan Taskaya [Mon, 19 Oct 2020 01:14:11 +0000 (04:14 +0300)] 
bpo-40484: Document compiler flags under AST module (GH-19885)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
5 years agobpo-40492: Fix --outfile with relative path when the program changes it working dir...
Anthony Sottile [Sun, 18 Oct 2020 20:48:31 +0000 (13:48 -0700)] 
bpo-40492: Fix --outfile with relative path when the program changes it working dir (GH-19910)