Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: python/cpython
Choose a Base Repository
python/cpython
1st1/cpython
Acidburn0zzz/cpython
AlvinRenNo1/cpython
Andreasyin/cpython
ApproximateIdentity/cpython
AraHaan/cpython
Atishay990/cpython
CLANNADHH/cpython
CNXTEoEorg/cpython-1
ChyiYaqing/cpython
CuriousLearner/cpython
DalavanCloud/cpython
DarkmaneTheRobot/cpython
Darshan-excellence/cpython
EpicWink/cpython
ErikHendriks/cpython
Frankenstein1836/cpython
FrostyFeng/cpython
GPHemsley/cpython
HeidiWindkraft/strict_cpython
JacksonKearl/cpython
Jesse-Bakker/cpython
Kamos86/cpython
KanesAccount/cpython
KrzysztofSzewczyk/Zaskroniec
LALINUX2019/cpython
LenochkaNSK18/cpython
Li-Michael/cpython
Longinushadow/cpython
Longturd/cpython
MuhammadZubair210/cpython
Munyola/cpython
Neo23x0/cpython
NoahGWood/cpython
OnePPCDev/cpython
OpenGemini/cpython
PadmajaVB/cpython
PatrickRudgeri/cpython
PraveenChaudhary/cpython
RekGRpth/cpython
Rosuav/cpython
Seluj78/cpython
Silver-Taurus/cpython
SimiCode/cpython
SystemicCypher/cpython
Uberi/cpython
VIP21/cpython
VisualMemory/cpython
VonBluebaugh/cpython
Wind-River/cpython
Xhollo/cpython
ZhangYunfang/cpython
aclements/cpython
agoose77/cpython
ahcub/cpython
airboat/cpython
aixtools/cpython
ajayjoshi879/cpython
amey589/cpython
andrekorol/cpython
animenon/cpython
arantebw/cpython
babara34r/cpython
badrkamel/cpython
berkerpeksag/cpython
bharel/cpython
bmeck/cpython
bmoffatt/cpython
borisuvarov/cpython
bytebuild/cpython
cagney/cpython
cannibal-4852/cpython
cccl/cpython
codeanynote/cpython
contail/cpython
damngamerz/cpython
delimitry/cpython
delivrance/cpython
deltaIncrement/cpython
devesh-verma/cpython
dhimmel/cpython
dilenondelfino/cpython
dk1978/cpython
dsoprea/cpython
dstanek/cpython
ethanhs/cpython
fishing161/cpython
fonsp/cpython
fpnp/cpython
frankmadao/cpython
freakboy3742/cpython
freddrake/andresdelfino-cpython
fredrikaverpil/cpython
gowtham5699/cpython
greatspider135/cpython
gvanrossum/cpython
hackfengJam/cpython
hkkhuang/cpython
hongweipeng/cpython
imzhong/cpython
jackass0528/cpython
jansure/cpython
jaraco/cpython
jdemeyer/cpython
jishanshaikh4/cpython
jmzanker/cpython
jnwlkr/cpython
jonejiang/cpython
kadler/cpython
khanhqthai/cpython
koreindian/cpython
kovidgoyal/cpython
kripken/cpython
kuhlenough/cpython-for-VxWorks
kushaldas/cpython
kw-andy/cpython
longshifeng/cpython
luojun001/cpython
luoshuxiao/cpython
marcosmagno/cpython
markshannon/cpython
miss-islington/cpython
mkiever/cpython
ml451953014/cpython
mohisen/cpython
nanjekyejoannah/cpython
nhuduy/cpython
niubanjin/cpython
oconnor663/cpython
ohei/cpython
oranav/cpython
pablogsal/cpython
passengeryjy/cpython
pedrorhian944/cpython
podshumok/cpython
pomidoroshev/cpython
pxinwr/cpython
pynickle/cpython
pythoncapi/cpython
ratnania/cpython
rdb/cpython
refoo/cpython
remitamine/cpython
rhettinger/cpython
rkialashaki/cpython
rohitsr24/cpython
samuelcolvin/cpython
scharron/cpython
schedutron/cpython
seanharr11/cpython
sebospc/cpython
serhiy-storchaka/cpython
shabnam99/cpython
shangzhipei/cpython
sheldonzeng/cpython
shlomif/cpython
sisuad/cpython
snjypl/cpython
stackless-dev/stackless
stealthcopter/cpython
sthagen/cpython
subhashissuara/cpython
sudonitesh/cpython
supitchayapat/cpython
swizl/cnpython
taborda11/cpython
thomascherickal/cpython
tiangolo/cpython
tim-one/cpython
tonybaloney/cpython
tonydapiza/cpython
tovrstra/cpython
trenchmortar/cpython
tripmani/cpython
trishnaguha/cpython
tvikneshwar/cpython
tzickel/cpython
ukbaranwal/cpython
ukysung/cpython
unscientific/cpython
val314159/cpython
veltata/cpython
vlad-tokarev/cpython
vmsp/cpython
vsajip/cpython
vstinner/cpython
worldhema/cpython
wylllorenz/cpython
xmanrui/cpython
ycq091044/cpython
yewsGitHub/cpython
yuc8939/cpython
yutiansut/cpython
yyang42/cpython
zhang-hong-yang/cpython
zhangch9/cpython
zhangyangyu/cpython
zooba/cpython
zsxmatthew/cpython
Nothing to show
base: master
head repository: python/cpython
Choose a Head Repository
python/cpython
1st1/cpython
Acidburn0zzz/cpython
AlvinRenNo1/cpython
Andreasyin/cpython
ApproximateIdentity/cpython
AraHaan/cpython
Atishay990/cpython
CLANNADHH/cpython
CNXTEoEorg/cpython-1
ChyiYaqing/cpython
CuriousLearner/cpython
DalavanCloud/cpython
DarkmaneTheRobot/cpython
Darshan-excellence/cpython
EpicWink/cpython
ErikHendriks/cpython
Frankenstein1836/cpython
FrostyFeng/cpython
GPHemsley/cpython
HeidiWindkraft/strict_cpython
JacksonKearl/cpython
Jesse-Bakker/cpython
Kamos86/cpython
KanesAccount/cpython
KrzysztofSzewczyk/Zaskroniec
LALINUX2019/cpython
LenochkaNSK18/cpython
Li-Michael/cpython
Longinushadow/cpython
Longturd/cpython
MuhammadZubair210/cpython
Munyola/cpython
Neo23x0/cpython
NoahGWood/cpython
OnePPCDev/cpython
OpenGemini/cpython
PadmajaVB/cpython
PatrickRudgeri/cpython
PraveenChaudhary/cpython
RekGRpth/cpython
Rosuav/cpython
Seluj78/cpython
Silver-Taurus/cpython
SimiCode/cpython
SystemicCypher/cpython
Uberi/cpython
VIP21/cpython
VisualMemory/cpython
VonBluebaugh/cpython
Wind-River/cpython
Xhollo/cpython
ZhangYunfang/cpython
aclements/cpython
agoose77/cpython
ahcub/cpython
airboat/cpython
aixtools/cpython
ajayjoshi879/cpython
amey589/cpython
andrekorol/cpython
animenon/cpython
arantebw/cpython
babara34r/cpython
badrkamel/cpython
berkerpeksag/cpython
bharel/cpython
bmeck/cpython
bmoffatt/cpython
borisuvarov/cpython
bytebuild/cpython
cagney/cpython
cannibal-4852/cpython
cccl/cpython
codeanynote/cpython
contail/cpython
damngamerz/cpython
delimitry/cpython
delivrance/cpython
deltaIncrement/cpython
devesh-verma/cpython
dhimmel/cpython
dilenondelfino/cpython
dk1978/cpython
dsoprea/cpython
dstanek/cpython
ethanhs/cpython
fishing161/cpython
fonsp/cpython
fpnp/cpython
frankmadao/cpython
freakboy3742/cpython
freddrake/andresdelfino-cpython
fredrikaverpil/cpython
gowtham5699/cpython
greatspider135/cpython
gvanrossum/cpython
hackfengJam/cpython
hkkhuang/cpython
hongweipeng/cpython
imzhong/cpython
jackass0528/cpython
jansure/cpython
jaraco/cpython
jdemeyer/cpython
jishanshaikh4/cpython
jmzanker/cpython
jnwlkr/cpython
jonejiang/cpython
kadler/cpython
khanhqthai/cpython
koreindian/cpython
kovidgoyal/cpython
kripken/cpython
kuhlenough/cpython-for-VxWorks
kushaldas/cpython
kw-andy/cpython
longshifeng/cpython
luojun001/cpython
luoshuxiao/cpython
marcosmagno/cpython
markshannon/cpython
miss-islington/cpython
mkiever/cpython
ml451953014/cpython
mohisen/cpython
nanjekyejoannah/cpython
nhuduy/cpython
niubanjin/cpython
oconnor663/cpython
ohei/cpython
oranav/cpython
pablogsal/cpython
passengeryjy/cpython
pedrorhian944/cpython
podshumok/cpython
pomidoroshev/cpython
pxinwr/cpython
pynickle/cpython
pythoncapi/cpython
ratnania/cpython
rdb/cpython
refoo/cpython
remitamine/cpython
rhettinger/cpython
rkialashaki/cpython
rohitsr24/cpython
samuelcolvin/cpython
scharron/cpython
schedutron/cpython
seanharr11/cpython
sebospc/cpython
serhiy-storchaka/cpython
shabnam99/cpython
shangzhipei/cpython
sheldonzeng/cpython
shlomif/cpython
sisuad/cpython
snjypl/cpython
stackless-dev/stackless
stealthcopter/cpython
sthagen/cpython
subhashissuara/cpython
sudonitesh/cpython
supitchayapat/cpython
swizl/cnpython
taborda11/cpython
thomascherickal/cpython
tiangolo/cpython
tim-one/cpython
tonybaloney/cpython
tonydapiza/cpython
tovrstra/cpython
trenchmortar/cpython
tripmani/cpython
trishnaguha/cpython
tvikneshwar/cpython
tzickel/cpython
ukbaranwal/cpython
ukysung/cpython
unscientific/cpython
val314159/cpython
veltata/cpython
vlad-tokarev/cpython
vmsp/cpython
vsajip/cpython
vstinner/cpython
worldhema/cpython
wylllorenz/cpython
xmanrui/cpython
ycq091044/cpython
yewsGitHub/cpython
yuc8939/cpython
yutiansut/cpython
yyang42/cpython
zhang-hong-yang/cpython
zhangch9/cpython
zhangyangyu/cpython
zooba/cpython
zsxmatthew/cpython
Nothing to show
compare: 3.8
Checking mergeability… Don’t worry, you can still create the pull request.
This comparison is big! We’re only showing the most recent 250 commits
Commits on Nov 27, 2019
…H-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
… entries to prevent infinite recursion (GH-17397)

(cherry picked from commit 9bbcbc9)

Co-authored-by: Bruno P. Kinoshita <kinow@users.noreply.github.com>
…et_name__ (GH-17364)

(cherry picked from commit 1bddf89)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
Commits on Nov 28, 2019
SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit ea9835c)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit 02519f7)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
…hook are invoked (GH-17392)

Also fixes some potential segfaults in unraisable hook handling.
Commits on Nov 29, 2019
Commits on Dec 01, 2019
(cherry picked from commit 575d0b4)

Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
(cherry picked from commit fdafa1d)

Co-authored-by: idomic <michael.ido@gmail.com>
* bpo-38449: Add tricky test cases

* bpo-38449: Reflect codereview
(cherry picked from commit 2fe4c48)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Dec 02, 2019
Make ssl tests less strict and also accept TLSv3 as the default maximum
version. This change unbreaks test_min_max_version on Fedora 32.

https://bugs.python.org/issue38815
(cherry picked from commit 34864d1)

Co-authored-by: torsava <torsava@redhat.com>
…put format (GH-17418)

(cherry picked from commit a62ad47)

Co-authored-by: Matthew Rollings <1211162+stealthcopter@users.noreply.github.com>
Commits on Dec 03, 2019
Update docstring for `multiprocessing.Pool.map` to mention `pool.starmap()`.

Prev PR: #17367  @aeros

https://bugs.python.org/issue27873
(cherry picked from commit eb48a45)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Commits on Dec 04, 2019
(cherry picked from commit 808769f)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
The readline module now detects if Python is linked to libedit at runtime
on all platforms.  Previously, the check was only done on macOS.

If Python is used as a library by a binary linking to libedit, the linker
resolves the rl_initialize symbol required by the readline module against
libedit instead of libreadline, which leads to a segfault.

Take advantage of the existing supporting code to have readline module being
compatible with both situations.
(cherry picked from commit 7105319)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.
(cherry picked from commit 8b78796)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Dec 05, 2019
…H-17450)

Since c64a1a6 two assertions were indented and thus ignored when running test_hmac.

This PR fixes it. As the change is quite trivial I didn't add a NEWS entry.


https://bugs.python.org/issue38270
(cherry picked from commit 8943318)


Co-authored-by: stratakis <cstratak@redhat.com>


https://bugs.python.org/issue38270



Automerge-Triggered-By: @tiran
…H-17277)

parse_message_id() was improperly using a token defined inside an exception
handler, which was raising `UnboundLocalError` on parsing an invalid value.

https://bugs.python.org/issue38698
(cherry picked from commit bb81549)

Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
Commits on Dec 06, 2019
GH-13135)

Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute.

https://bugs.python.org/issue36820

Automerge-Triggered-By: @pablogsal
(cherry picked from commit b64334c)

Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
…ges (GH-17480)

Note that the support is not actually enabled yet, and so we won't be publishing these packages. However, for those who want to build it themselves (even by reusing the Azure Pipelines definition), it's now relatively easy to enable.
On most platforms, the `environ` symbol is accessible everywhere.

In a dylib on OSX, it's not easily accessible, you need to find it with
_NSGetEnviron.

The code was caching the *value* of environ. But a setenv() can change the value,
leaving garbage at the old value. Fix: don't cache the value of environ, just
read it every time.
(cherry picked from commit 723f71a)

Co-authored-by: Benoit Hudson <benoit@imgspc.com>
Commits on Dec 07, 2019
(cherry picked from commit 7ddcd0c)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…Python version (GH-17484)

(cherry picked from commit 969ae7a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…ncio functions (GH-16457) (#17496)

https://bugs.python.org/issue37404
(cherry picked from commit 892f9e0)

Co-authored-by: idomic <michael.ido@gmail.com>
test_openssl_version now accepts version 3.0.0.

getpeercert() no longer returns IPv6 addresses with a trailing new line.

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


https://bugs.python.org/issue38820
(cherry picked from commit 2b7de66)


Co-authored-by: Christian Heimes <christian@python.org>


https://bugs.python.org/issue38820



Automerge-Triggered-By: @tiran
Commits on Dec 08, 2019
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.

https://bugs.python.org/issue38979

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 28c9163)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
Commits on Dec 09, 2019
…H-17503)

This adds a new InvalidMessageID token to the email header parser which can be
used to represent invalid message-id headers in the parse tree.
(cherry picked from commit 68157da)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
…H-17504)

Fix a potential IndexError when passing an empty value to the message-id
parser. Instead, HeaderParseError should be raised.
(cherry picked from commit 3ae4ea1)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
…espace (GH-17421)

https://bugs.python.org/issue38673
(cherry picked from commit 109fc27)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.
(cherry picked from commit cd90a52)

Co-authored-by: Elena Oat <oat.elena@gmail.com>
Fix test_pty: if the process is the session leader, closing the
master file descriptor raises a SIGHUP signal: simply ignore SIGHUP
when running the tests.
(cherry picked from commit a1838ec)

Co-authored-by: Victor Stinner <vstinner@python.org>
array.array: Document that tostring() and fromstring() deprecated
aliases will be removed in Python 3.9.
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
GH-17311) (#17529)

(cherry picked from commit ab513a3)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…H-9518) (#17531)

(cherry picked from commit d219cc4)

Co-authored-by: Yury Selivanov <yury@magic.io>
(cherry picked from commit e89e159)

Co-authored-by: Steve Dower <steve.dower@python.org>
…H-17530)

* Issue 38992: avoid fsum test failure

* Add NEWS entry
(cherry picked from commit bba873e)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
…se a deprecation warning (GH-17540)

(cherry picked from commit b8cbe74)

Co-authored-by: Steve Dower <steve.dower@python.org>
Also allows winreg.CloseKey() to accept same types as other functions.
(cherry picked from commit ee17e37)

Co-authored-by: Steve Dower <steve.dower@python.org>
(cherry picked from commit 232689b)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
Commits on Dec 10, 2019
This has happened on some versions of Ubuntu.
(cherry picked from commit bbc4162)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
…17538)

(cherry picked from commit c18b805)

Co-authored-by: Tim Gates <tim.gates@iress.com>
(cherry picked from commit abdeb57)

Co-authored-by: Steve Dower <steve.dower@python.org>
Python 3.8.1rc1
Automerge-Triggered-By: @pablogsal
(cherry picked from commit d0802d0)

Co-authored-by: Steve Dower <steve.dower@python.org>
Commits on Dec 11, 2019
…-17569)

* bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 including improved docs for custom finders and better serialization support in EntryPoints.

* 📜🤖 Added by blurb_it.

* Correct module reference
(cherry picked from commit b7a0109)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Commits on Dec 13, 2019
… for if_stmt (GH-17582) (GH-17589)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
(cherry picked from commit 8289e27)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
Commits on Dec 14, 2019
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c7)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
… (GH-17600)

(cherry picked from commit 5936a4c)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Commits on Dec 15, 2019
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit b08d3f7)

Co-authored-by: Guido van Rossum <guido@python.org>
Commits on Dec 16, 2019
Commit 6b5b013 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (GH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.

Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
(cherry picked from commit 092435e)

Co-authored-by: Toke Høiland-Jørgensen <toke@redhat.com>
Commits on Dec 17, 2019
…nt()'s *reuse_address* parameter (GH-17595). (#17630)

(cherry picked from commit f501db2)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: tirkarthi
(cherry picked from commit 1988344)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…acOS Catalina (GH-17636)
Commits on Dec 18, 2019
… CALL (GH-17645) (GH-17649)

… 
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 50d4f12)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>





https://bugs.python.org/issue39080
…GH-17647)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

(cherry picked from commit 9707e8e)
…H-17652) (GH-17655)

Fix test_ressources_gced_in_workers() of test_concurrent_futures:
explicitly stop the manager to prevent leaking a child process
running in the background after the test completes.

(cherry picked from commit 673c393)
Commits on Dec 19, 2019
Python 3.8.1
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>





https://bugs.python.org/issue38316



Automerge-Triggered-By: @vstinner
Commits on Dec 20, 2019
… docs table (GH-17408)

Adds` __module__ ` entries for function & method types in inspect docs table.

https://bugs.python.org/issue38918
(cherry picked from commit f522a6d)

Co-authored-by: Parth Sharma <parthsharma2@users.noreply.github.com>
Commits on Dec 22, 2019
"HH", "MM" and "ffffff" are enclosed with double back quotes, but "SS" is left being bare
(cherry picked from commit 068768f)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
Commits on Dec 23, 2019
Fixes a nearly word for word duplication of a sentence that appears
earlier in the caution section of datetime.datetime.fromisoformat in
Doc/Library/datetime.rst.

No issue created as it's a trivial change.

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

Co-authored-by: Michael Morehouse <640167+yawpitch@users.noreply.github.com>
(cherry picked from commit b0d4949)

Co-authored-by: Jesús Cea <jcea@jcea.es>

Co-authored-by: Jesús Cea <jcea@jcea.es>
Commits on Dec 24, 2019
(cherry picked from commit 025eeaa)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Commits on Dec 25, 2019
The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without:
```
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
```
The other change is a typo fix
(cherry picked from commit 5c7ed75)

Co-authored-by: William Ayd <william.ayd@icloud.com>
(cherry picked from commit 279d8df)

Co-authored-by: John Belmonte <john@neggie.net>
A character "i" is omitted.
(cherry picked from commit 527f9de)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
…H-7917) (GH-17677)

(cherry picked from commit e28aff5)

Co-authored-by: Fabio Sangiovanni <4040184+sanjioh@users.noreply.github.com>
Commits on Dec 27, 2019
)

`time.clock()` was removed in Python 3.8, but it was still mentioned
in the documentation for when `time.get_clock_info()` is given the
argument `'clock'`. This commit removes that mention.
(cherry picked from commit 91874bb)

Co-authored-by: Michael Wayne Goodman <goodman.m.w@gmail.com>
…bute. (GH-17702)

(cherry picked from commit c0052f3)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Commits on Dec 28, 2019
…e Python stdlib files (GH-17721)

(cherry picked from commit ef7eaaf)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
(cherry picked from commit 98f0f04)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Commits on Dec 29, 2019
funtion -> function; configuraton -> configuration; defintitions -> definitions;
focusses -> focuses; necesarily -> necessarily; follwing -> following;
Excape -> Escape,

(cherry picked from commit 6c7bb38)
(cherry picked from commit 32a12ae)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
Commits on Dec 30, 2019
…ntation (GH-17608)

* __enter__ is now looked up before __exit__ to give a more intuitive error message
* add pseudo-code equivalent for the with statement
* fix pseudo-code for the async with statement to use a finally clause
* use SUITE rather than BLOCK for consistency with the language grammar

Patch by Géry Ogam.
(cherry picked from commit 226e6e7)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Hold strong references to list elements while calling PyObject_RichCompareBool().
(cherry picked from commit d9e561d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Tag memoryview, range, and tuple as classes, the same as list, etcetera, in
the library manual built-in functions list.
(cherry picked from commit ee9ff05)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Dec 31, 2019
(cherry picked from commit d0c92e8)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
GH-17764)

* [3.8] bpo-38588: Fix possible crashes in dict and list when calling PyObject_RichCompareBool (GH-17734)

Take strong references before calling PyObject_RichCompareBool to protect against the case
where the object dies during the call.
(cherry picked from commit 2d5bf56)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

* Update Objects/listobject.c

@methane's suggestion

Co-Authored-By: Inada Naoki <songofacandy@gmail.com>

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit ba82ee8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Jan 01, 2020
…H-17778)

(cherry picked from commit 37143a8)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
(cherry picked from commit 22424c0)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Remove extra space to fix formatting and avoid from splitting text in to strings.

https://bugs.python.org/issue39183
(cherry picked from commit 149175c)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Commits on Jan 03, 2020
(cherry picked from commit 946b29e)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit 32f1443)

Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit e02ab59)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Commits on Jan 04, 2020
(cherry picked from commit 3a5de51)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Commits on Jan 05, 2020
…y argument (GH-17826)

(cherry picked from commit ec007cb)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Ignore leading dots and no longer ignore a trailing newline.
(cherry picked from commit 6a265f0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…H-17618)

No longer import the re module if it is not needed.
(cherry picked from commit 41ec17e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…rue. (GH-17616)

(cherry picked from commit b19c0d7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name
or a list thereof for all options. Based on patch Giovanni Lombardo.
(cherry picked from commit 5ea7bb2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…7837)

(cherry picked from commit b121a4a)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
(cherry picked from commit e6ae90d)

Co-authored-by: Oleg Höfling <hoefling@users.noreply.github.com>
(cherry picked from commit abc0c4f)

Co-authored-by: HongWeipeng <961365124@qq.com>
…s well (GH-17694)

To be consistent with document layout, it should say when the feature was added.
Although it's mentioned few other places in the doc but it's not explicitly say that at that place.

https://bugs.python.org/issue39130
(cherry picked from commit 94d9cfc)

Co-authored-by: Khalid Mammadov <khalidmammadov9@gmail.com>
Commits on Jan 06, 2020
(cherry picked from commit d6c08db)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
…GH-17851) (#17854)

(cherry picked from commit ee94bdb)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…17864) (GH-17865)

Fixes error attempting to bind to IPv4 address.
(cherry picked from commit 7cdc31a)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…-17860)

(cherry picked from commit 5ec91f7)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit a76ba36)

Co-authored-by: Steve Dower <steve.dower@python.org>
…H-17818)

(cherry picked from commit 7b79dc9)

Co-authored-by: Anthony Wee <awee@box.com>
https://bugs.python.org/issue39041

Automerge-Triggered-By: @zooba
(cherry picked from commit b1ce22d)

Co-authored-by: Steve Dower <steve.dower@python.org>
Commits on Jan 07, 2020
(cherry picked from commit f4800b8)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit ca94677)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
https://bugs.python.org/issue39191.
(cherry picked from commit 10ac0cd)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…nabledFor (GH-17689) (GH-17897)

(cherry picked from commit 950c679)
GH-17780)

Correctly parenthesize filter-based statements that contain lambda
expressions in lib2to3.
(cherry picked from commit b821173)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 08, 2020
(cherry picked from commit 2e6a8ef)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 09, 2020
…ion_bind. (GH-17908)

(cherry picked from commit 5cae042)

Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
GH-17896)

\+ this also adds a stronger warning against sharing objects between (sub-)interpreters.

https://bugs.python.org/issue39161
(cherry picked from commit 6c5d661)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit ed36781)

Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix typo in test's docstring. contination -> continuation.
(cherry picked from commit 2f65aa4)

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

Co-authored-by: Daniel Hahler <github@thequod.de>
The fix changes copy_location() to require an extra node from which to extract the end location, and fixing all 5 call sites.

https://bugs.python.org/issue39235
(cherry picked from commit a796d8e)

Co-authored-by: Guido van Rossum <guido@python.org>
Commits on Jan 10, 2020
* Add test cases for dataclasses.

* Add test for repr output of field.
* Add test for ValueError to be raised when both default and default_factory are passed.
(cherry picked from commit eef1b02)


Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>

Automerge-Triggered-By: @ericvsmith
Commits on Jan 11, 2020
Host as None in address raises TypeError since it should be string, bytes or bytearray.
(cherry picked from commit 43682f1)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
* bpo-39297: Update for importlib_metadata 1.4. Includes performance updates.

* 📜🤖 Added by blurb_it.

* Update blurb

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 136735c)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Commits on Jan 12, 2020
https://bugs.python.org/issue39233
(cherry picked from commit 9a669d5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
…6552)

Motivation for this PR (comment from @vstinner in bpo issue):
```
Warning seen o AMD64 Ubuntu Shared 3.x buildbot:
https://buildbot.python.org/all/GH-/builders/141/builds/2593

test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
```
The following implementation details for the new method are TBD:

1) Public vs private

2) Inclusion in `close()`

3) Name

4) Coroutine vs subroutine method

5) *timeout* parameter

If it's a private method, 3, 4, and 5 are significantly less important.

I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this.

https://bugs.python.org/issue38356
(cherry picked from commit 0ca7cc7)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…-17960) (GH-17964)

Although the underlying libffi issue remains open, adding these
checks have caused problems in third-party projects which are in
widespread use. See the issue for examples.

The corresponding tests have also been skipped.

(cherry picked from commit c12440c)
Copying property objects results in a TypeError. Steps to reproduce:

```
>>> import copy
>>> obj = property()
>>> copy.copy(obj)
````

This affects both shallow and deep copying.
My idea for a fix is to add property objects to the list of "atomic" objects in the copy module.
These already include types like functions and type objects.

I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :)

https://bugs.python.org/issue38293
(cherry picked from commit 9f3fc6c)

Co-authored-by: Guðni Natan Gunnarsson <1493259+GudniNatan@users.noreply.github.com>
…n the AST docs (GH-17172)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 6680f4a)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Commits on Jan 13, 2020
(cherry picked from commit 7ba6f18)

Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
Specify that sys.float_info.min is only the minimum normalized float.
Commits on Jan 14, 2020
…H-17588) (GH-17642)

Fix `NameError` in `zipimport` during hash validation and add a regression test.

(cherry picked from commit 79f02fe)



https://bugs.python.org/issue39033
(cherry picked from commit b4cdb3f)

Co-authored-by: Kyle Pollina <kylepollina@protonmail.com>
Commits on Jan 15, 2020
Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be81
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d393)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
…H-17932) (GH-18015)

Since 3.7 `successful` raises a `ValueError` as explained in the next text block from the documentation:

_Changed in version 3.7: If the result is not ready, ValueError is raised instead of AssertionError._

No issue associated with this PR.
Should be backported in 3.7 and 3.8.
(cherry picked from commit dc0284e)


Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>

Automerge-Triggered-By: @pitrou
Commits on Jan 16, 2020
The previous double colon was wrongly place directly after Therefore.
Which produced a block without syntax highlighting. This fixes it
by separating the double colon from the text. As a result, sphinx now
properly highlights the python code.

https://bugs.python.org/issue39348
(cherry picked from commit fad8b56)

Co-authored-by: Oz N Tiram <oz.tiram@noris.de>
Commits on Jan 17, 2020
(cherry picked from commit ef8844f)

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>
Commits on Jan 19, 2020
(cherry picked from commit 558f078)

Co-authored-by: Michael Haas <micha2718l@gmail.com>
Update Misc/valgrind-python.supp to suppress the false alarm.
(cherry picked from commit d8ef644)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
…eed (GH-16630)

Some objects like Py_None are not initialized with conventional means
that prepare the circular linked list pointers, leaving them unlinked
from the rest of the objects. For those objects, NULL pointers does
not mean that they are freed, so we need to skip the check in those
cases.
(cherry picked from commit 36e33c3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Commits on Jan 20, 2020
Mention that the function implicitly creates new event loop only if called from the main thread.
(cherry picked from commit 2c49bec)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit a96e06d)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…H-18054)

(cherry picked from commit 8d57a41)

Co-authored-by: Peter Bittner <django@bittner.it>
Commits on Jan 21, 2020
(cherry picked from commit 8698b34)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Fix comments and add tests for editor newline_and_indent_event method.
Remove unused None default for function parameter of pyparse find_good_parse_start method
and code triggered by that default.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ec64640)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f)

Co-authored-by: William Chargin <wchargin@gmail.com>
testPerm() and testComb() belong to MathTests, not to IsCloseTests().

(cherry picked from commit 59e2d26)
(cherry picked from commit 47be7d0)

Co-authored-by: Keith Erskine <toastie604@gmail.com>

Co-authored-by: Keith Erskine <toastie604@gmail.com>
Commits on Jan 22, 2020
….c floatobject.c. (GH-18105)

(cherry picked from commit 0d5eac8)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Update os.unsetenv() documentation: it is not available on Windows.
https://bugs.python.org/issue39425

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 14d80d0)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 23, 2020
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
IDLE does not pass a non-default _synchre in any of its calls to
pyparse.find_good_parse_start.
(cherry picked from commit f9e07e1)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH-18118)

* bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
(cherry picked from commit 79f89e6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 7142df5)

Co-authored-by: Shanavas M <shanavas.m2@gmail.com>
…GH-18117) (GH-18148)

When communicate() is called in a loop, it crashes when the child process
has already closed any piped standard stream, but still continues to be running

Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>.
(cherry picked from commit d3ae95e)

Co-authored-by: Alex Rebert <alex@forallsecure.com>





https://bugs.python.org/issue35182
Commits on Jan 24, 2020
Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs.

https://bugs.python.org/issue39426
(cherry picked from commit e9652e8)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* Add test for nested async decorator patch.
* Add test for side_effect and wraps with a function.
* Add test for side_effect with an exception in the iterable.
(cherry picked from commit 54f743e)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Use `from ... import ...` to ensure module is fully loaded before accessing its attributes.
(cherry picked from commit 9017e0b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Jan 25, 2020
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit d0d9fa8)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
…mock (GH-16784) (GH-18167)

If an autospecced object is attached using attach_mock the
child would be a function with mock object as attribute from
which signature has to be derived.

(cherry picked from commit 66b00a9)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
2 authors and csabella
Fixed the name of the contributor (@selik).
(cherry picked from commit 9bfb4a7)

Co-authored-by: fireattack <human.peng@gmail.com>
(cherry picked from commit 7de6174)

Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
…H-18187)

(cherry picked from commit 4b09dc7)

Co-authored-by: Windson yang <wiwindson@outlook.com>
…-17872) (GH-17875)

(cherry picked from commit 2e9012a)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
Commits on Jan 26, 2020
…ods (GH-18190)

(cherry picked from commit 62865f4)

Co-authored-by: Matthew Kokotovich <mkokotovich@gmail.com>
Commits on Jan 27, 2020
(cherry picked from commit 7023288)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Expose dialog buttons to test code and complete their test coverage.
Complete test coverage for highlights and keys tabs.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit dd023ad)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
typeof overlap, and number of overlaps.
(cherry picked from commit 2824c45)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Jan 28, 2020
…18226) (GH-18227)

* Change the source for the SAT data to a primary source.
* Fix typo in the standard deviation
* Clarify that the binomial probabalities are just for the Python room.
(cherry picked from commit 01bf219)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
…on Windows (GH-17961)

In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows.

Path.expanduser/home still honored HOME despite being documented as behaving the same
as os.path.expanduser. This makes them also ignore HOME so that both implementations
behave the same way again.
(cherry picked from commit c45a2aa)

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
…re (GH-18093)

(cherry picked from commit 13c1c35)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 148610d)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
)

(cherry picked from commit 0be3246)

Co-authored-by: Adam Meily <ameily@users.noreply.github.com>
Commits on Jan 29, 2020
Some of the *SetItem methods in the C API steal a reference to the
given value. This annotates the better behaved ones to assure the
reader that these are not the ones with the inconsistent behaviour.

* 📜🤖 Added by blurb_it.

* make docs consistent with signature

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit e1e8000)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
(cherry picked from commit 35eac45)

Co-authored-by: Julien Palard <julien@palard.fr>
XFS filesystem is limited to 32-bit timestamp, but the utimensat()
syscall doesn't fail. Moreover, there is a VFS bug which returns
a cached timestamp which is different than the value on disk.

https://bugzilla.redhat.com/show_bug.cgi?id=1795576
https://bugs.python.org/issue39460GH-msg360952
(cherry picked from commit 3cb49b6)

Co-authored-by: Victor Stinner <vstinner@python.org>
Replace check for whether something is a method in the mock module. The
previous version fails on PyPy, because there no method wrappers exist
(everything looks like a regular Python-defined function). Thus the
isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check
returns True for any descriptor, not just methods.

This condition could also return erroneously True in CPython for
C-defined descriptors.

Instead to decide whether something is a method, just check directly
whether it's a function defined on the class. This passes all tests on
CPython and fixes the bug on PyPy.
(cherry picked from commit a327677)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Commits on Jan 30, 2020
(cherry picked from commit 2e6569b)

Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
)

Skip test_zipfile.test_add_file_after_2107() if time.localtime()
fails with OverflowError. It is the case on AIX 6.1 for example.
(cherry picked from commit c232c91)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Jan 31, 2020
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit bfdeaa3)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Commits on Feb 02, 2020
… Pickler instance (GH-18266) (#18316)

https://bugs.python.org/issue39492

Automerge-Triggered-By: @pitrou
(cherry picked from commit 0f2f35e)

Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
Commits on Feb 03, 2020
…e.shortDescription (GH-18175) (#18323)

(cherry picked from commit 032de73)

Co-authored-by: Steve Cirelli <scirelli+git@gmail.com>
(cherry picked from commit b94737a)

Co-authored-by: James Corbett <james.h.corbett@gmail.com>
…ial (GH-16973)

(cherry picked from commit 5807efd)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Commits on Feb 04, 2020
Improvements in listsort.txt and a comment in sortperf.py.

Automerge-Triggered-By: @csabella
(cherry picked from commit 24e5ad4)

Co-authored-by: Stefan Pochmann <stefan.pochmann@gmail.com>
Adds an additional assertion check based on a race condition for `test__xxsubinterpreters.DestroyTests.test_still_running` discovered in the bpo issue.

https://bugs.python.org/issue37224
(cherry picked from commit f03a8f8)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…-18295)

When called on a closed object, readinto() segfaults on account
of a write to a freed buffer:

    ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core
    ==220553==  Access not within mapped region at address 0x2A
    ==220553==    at 0x48408A0: memmove (vg_replace_strmem.c:1272)
    ==220553==    by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253)

Reproducer:

    reader = open ("/dev/zero", "rb")
    _void  = reader.read (42)
    reader.close ()
    reader.readinto (bytearray (42)) GH-GH-GH- BANG!

The problem exists since 2012 when commit dc46945 added code
to free the read buffer on close().

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
(cherry picked from commit cb1c074)

Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
Commits on Feb 05, 2020
…pty modules (GH-17824)

(cherry picked from commit 95f6001)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
…GH-17791)

(cherry picked from commit 89ae20b)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
…H-18359)

(cherry picked from commit 787b6d5)

Co-authored-by: schwarzichet <15522755+schwarzichet@users.noreply.github.com>
Commits on Feb 06, 2020
…8360)

(cherry picked from commit 54b4f14)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Some numerator types used (specifically NumPy) decides to not
return a Python boolean for the "a != b" operation. Using the equivalent
call to bool() guarantees a bool return also for such types.
(cherry picked from commit 427c84f)

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
To print the exports to stdout, the gendef command requires the option "-". Without this option, no output is generated.
(cherry picked from commit 2545fa8)

Co-authored-by: Baljak <baljci@hotmail.com>
(cherry picked from commit 446463f)

Co-authored-by: Julien Palard <julien@palard.fr>
Commits on Feb 08, 2020
… node (GH-18405) (GH-18408)

(cherry picked from commit d2e1098)





https://bugs.python.org/issue39579



Automerge-Triggered-By: @gvanrossum
….8 (GH-17884)

Minor fix in documentation:

- `sys.__unraisablehook__` is new in version 3.8
- Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`)
(cherry picked from commit 0edc2c7)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
Commits on Feb 09, 2020
…nces (GH-18421) (GH-18423)

(cherry picked from commit c6dedde)

Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>

Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
Commits on Feb 10, 2020
…re (GH-18315)

(cherry picked from commit 5305cc9)

Co-authored-by: idomic <michael.ido@gmail.com>
(cherry picked from commit 3ed4d25)

Co-authored-by: Don Kirkby <donkirkby@users.noreply.github.com>
…mentation (GH-18435)

documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63.
(cherry picked from commit d68e0a8)

Co-authored-by: Carl <Carl-Ty@users.noreply.github.com>
In the font configuration window, remove duplicated font names.
(cherry picked from commit ed335cf)

Co-authored-by: Victor Stinner <vstinner@python.org>
Replaced the period with a comma.

Automerge-Triggered-By: @Mariatta
(cherry picked from commit d47d0c8)

Co-authored-by: Bonifacio de Oliveira <bonifacio.segundo@gmail.com>
Clarifies that the use of `shlex.split` is more instructive than
normative, and provides a simpler example.

https://bugs.python.org/issue13826
(cherry picked from commit 95d024d)

Co-authored-by: Tim D. Smith <github@tim-smith.us>
There was an extra space in the url markup, causing the documentation not rendered properly.

https://bugs.python.org/issue39594
(cherry picked from commit 37c55b2)

Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
Commits on Feb 11, 2020
Complete previous patch.
(cherry picked from commit 96ce227)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.

Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007.  Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.

Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`.

https://bugs.python.org/issue38374
(cherry picked from commit 4eb9f43)

Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
Python 3.8.2rc1
* Add tests for case insensitive check of types and extensions as fallback.
* Add tests for data url with no comma.
* Add tests for read_mime_types.
* Add tests for the mimetypes cli and refactor __main__ code to private function.
* Restore mimetypes.knownfiles value at the end of the test.
(cherry picked from commit d8efc14)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Commits on Feb 12, 2020
(cherry picked from commit 029e840)

Co-authored-by: @RandyMcMillan <randy.lee.mcmillan@gmail.com>
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:

Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts
(cherry picked from commit e6be9b5)

Co-authored-by: Andy Lester <andy@petdance.com>
* Improve zipfile.Path performance on zipfiles with a large number of entries.

* 📜🤖 Added by blurb_it.

* Add bpo to blurb

* Sync with importlib_metadata 1.5 (6fe70ca)

* Update blurb.

* Remove compatibility code

* Add stubs module, omitted from earlier commit

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit e5bd736)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
(cherry picked from commit 95905ce)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
* Always set the text attribute.
* Correct the offset attribute for non-ascii sources.
(cherry picked from commit 0cc6b5e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
bpo-21016, bpo-1294959: The pydoc and trace modules now use the
sysconfig module to get the path to the Python standard library, to
support uncommon installation path like /usr/lib64/python3.9/ on
Fedora.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
(cherry picked from commit 4fac7ed)

Co-authored-by: Victor Stinner <vstinner@python.org>
…GH-18477)

(cherry picked from commit 6e619c4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Feb 13, 2020
(cherry picked from commit 597ebed)

Co-authored-by: Andy Lester <andy@petdance.com>
…`resource`, `shutil`, `signal`, `syslog` (GH-18407)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
…ed (GH-18475) (GH-18501)

The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a
agen.aclose() coroutine object. It accidentally also prevented you
from calling aclose() at all on an async generator that was already
closed or exhausted. This commit fixes it so we're only blocking the
actually illegal cases, while allowing the legal cases.

The new tests failed before this patch. Also confirmed that this fixes
the test failures we were seeing in Trio with Python dev builds:
  python-trio/trio#1396


https://bugs.python.org/issue39606
(cherry picked from commit 925dc7f)


Co-authored-by: Nathaniel J. Smith <njs@pobox.com>


https://bugs.python.org/issue39606



Automerge-Triggered-By: @njsmith
Commits on Feb 14, 2020
…-18456)

https://bugs.python.org/issue39545
(cherry picked from commit f632736)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined.  This change stops `_XOPEN_SOURCE` begin set on HP-UX

Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit a9edf44)

Co-authored-by: Ian Norton <inorton@gmail.com>
…t char *. (GH-18511)

(cherry picked from commit 7386a70)

Co-authored-by: Andy Lester <andy@petdance.com>
Commits on Feb 16, 2020
GH-18525)

This reverts commit 0f3187c.

The change broke the backwards compatibility of parsing behavior in a
patch release of Python (3.8.1). A decision was taken to revert this
patch in 3.8.2.

In https://bugs.python.org/issue27657 it was decided that the previous
behavior like

>>> urlparse('localhost:8080')
ParseResult(scheme='', netloc='', path='localhost:8080', params='', query='', fragment='')

>>> urlparse('undefined:8080')
ParseResult(scheme='', netloc='', path='undefined:8080', params='', query='', fragment='')

needs to be preserved in patch releases as number of users rely upon it.

Explicitly mention the releases involved with the revert in NEWS.
Adopt the wording suggested by @ned-deily.
Commits on Feb 17, 2020
…H-18514)

(cherry picked from commit 85a2eef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Feb 18, 2020
Test when find_good_parse_start should return 0.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ffda25f)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
…fix_chars (GH-18337) (GH-18543)

When `allow_abbrev` was first added, disabling the abbreviation of
long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967)).  As a fix,
b1e4d1b (contained in v3.8) ignores `allow_abbrev=False` for a
given argument string if the string does _not_ start with "--"
(i.e. it doesn't look like a long option).

This fix, however, doesn't take into account that long options can
start with alternative characters specified via `prefix_chars`,
introducing a regression: `allow_abbrev=False` has no effect on long
options that start with an alternative prefix character.

The most minimal fix would be to replace the "starts with --" check
with a "starts with two prefix_chars characters".  But
`_get_option_tuples` already distinguishes between long and short
options, so let's instead piggyback off of that check by moving the
`allow_abbrev` condition into `_get_option_tuples`.





https://bugs.python.org/issue39546
(cherry picked from commit 8edfc47)


Co-authored-by: Kyle Meyer <kyle@kyleam.com>


https://bugs.python.org/issue39546



Automerge-Triggered-By: @encukou
Python 3.8.2rc2
…l names in distutils (GH-18150) (GH-18546)

Make it export the correct init symbol also on Windows.

https://bugs.python.org/issue39432
(cherry picked from commit 9538bc9)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
…ild (GH-18357) (GH-18548)

https://bugs.python.org/issue39555

Co-authored-by: Steve Dower <steve.dower@python.org>

(cherry picked from commit ab0d892)
Commits on Feb 19, 2020
(cherry picked from commit ab6423f)

Co-authored-by: ananthan-123 <ananthakrishnan15.2001@gmail.com>
Commits on Feb 20, 2020
)

(cherry picked from commit 9b833e0)

Co-authored-by: Stefan Krah <skrah@bytereef.org>

Co-authored-by: Stefan Krah <skrah@bytereef.org>
…H-18569) (#18574)

(cherry picked from commit 1246d89)

Co-authored-by: Stefan Krah <skrah@bytereef.org>

Co-authored-by: Stefan Krah <skrah@bytereef.org>
(cherry picked from commit c0cb8be)

Co-authored-by: Stefan Krah <skrah@bytereef.org>

Co-authored-by: Stefan Krah <skrah@bytereef.org>
https://bugs.python.org/issue39184

Automerge-Triggered-By: @zooba
(cherry picked from commit 6c444d0)

Co-authored-by: Steve Dower <steve.dower@python.org>
Commits on Feb 21, 2020
…18581) (#18584)

(cherry picked from commit 90930e6)

Authored-by: Stefan Krah <skrah@bytereef.org>
…-17036)

Make the definition of the width more explicit that it includes any
extra signs added by other options.

https://bugs.python.org/issue38657

Automerge-Triggered-By: @Mariatta
(cherry picked from commit 424e568)

Co-authored-by: Pete Wicken <2273100+JamoBox@users.noreply.github.com>
The current content is not rendered since the syntax is not correct.
(cherry picked from commit d4d17fd)

Co-authored-by: Julien Danjou <julien@danjou.info>
Showing 1,136 changed files with 51,163 additions and 26,675 deletions.
@@ -42,7 +42,7 @@ jobs:
testRunPlatform: macos

pool:
vmImage: xcode9-macos10.13
vmImage: macos-10.14

steps:
- template: ./macos-steps.yml
@@ -59,7 +59,7 @@ jobs:
variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1c
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1c
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
@@ -131,7 +131,7 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016
vmImage: windows-2019

strategy:
matrix:
@@ -145,7 +145,7 @@ jobs:
buildOpt: '-p x64'
testRunTitle: '$(Build.SourceBranchName)-win64'
testRunPlatform: win64
maxParallel: 2
maxParallel: 4

steps:
- template: ./windows-steps.yml
@@ -14,6 +14,8 @@ steps:

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
continueOnError: true
timeoutInMinutes: 30

- task: PublishTestResults@2
displayName: 'Publish Test Results'
@@ -40,7 +40,7 @@ jobs:
testRunPlatform: macos

pool:
vmImage: xcode9-macos10.13
vmImage: macos-10.14

steps:
- template: ./macos-steps.yml
@@ -59,7 +59,7 @@ jobs:
variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
testRunPlatform: linux
openssl_version: 1.1.1c
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1c
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
@@ -131,7 +131,7 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016
vmImage: windows-2019

strategy:
matrix:
@@ -145,7 +145,10 @@ jobs:
buildOpt: '-p x64'
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
testRunPlatform: win64
maxParallel: 2
winarm64:
arch: arm64
buildOpt: '-p arm64'
maxParallel: 4

steps:
- template: ./windows-steps.yml
@@ -0,0 +1,129 @@
name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)

variables:
__RealSigningCertificate: 'Python Software Foundation'
# QUEUE TIME VARIABLES
# GitRemote: python
# SourceTag:
# DoPGO: true
# SigningCertificate: 'Python Software Foundation'
# SigningDescription: 'Built: $(Build.BuildNumber)'
# DoLayout: true
# DoMSIX: true
# DoNuget: true
# DoEmbed: true
# DoMSI: true
# DoPublish: false
# PyDotOrgUsername: ''
# PyDotOrgServer: ''
# BuildToPublish: ''

trigger: none
pr: none

stages:
- stage: Build
displayName: Build binaries
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-build.yml

- stage: Sign
displayName: Sign binaries
dependsOn: Build
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-sign.yml

- stage: Layout
displayName: Generate layouts
dependsOn: Sign
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-layout-full.yml
- template: windows-release/stage-layout-embed.yml
- template: windows-release/stage-layout-nuget.yml

- stage: Pack
dependsOn: Layout
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-pack-nuget.yml

- stage: Test
dependsOn: Pack
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-test-embed.yml
- template: windows-release/stage-test-nuget.yml

- stage: Layout_MSIX
displayName: Generate MSIX layouts
dependsOn: Sign
condition: and(succeeded(), and(eq(variables['DoMSIX'], 'true'), not(variables['BuildToPublish'])))
jobs:
- template: windows-release/stage-layout-msix.yml

- stage: Pack_MSIX
displayName: Package MSIX
dependsOn: Layout_MSIX
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-pack-msix.yml

- stage: Build_MSI
displayName: Build MSI installer
dependsOn: Sign
condition: and(succeeded(), and(eq(variables['DoMSI'], 'true'), not(variables['BuildToPublish'])))
jobs:
- template: windows-release/stage-msi.yml

- stage: Test_MSI
displayName: Test MSI installer
dependsOn: Build_MSI
condition: and(succeeded(), not(variables['BuildToPublish']))
jobs:
- template: windows-release/stage-test-msi.yml

- stage: PublishPyDotOrg
displayName: Publish to python.org
dependsOn: ['Test_MSI', 'Test']
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
jobs:
- template: windows-release/stage-publish-pythonorg.yml

- stage: PublishNuget
displayName: Publish to nuget.org
dependsOn: Test
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
jobs:
- template: windows-release/stage-publish-nugetorg.yml

- stage: PublishStore
displayName: Publish to Store
dependsOn: Pack_MSIX
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
jobs:
- template: windows-release/stage-publish-store.yml


- stage: PublishExistingPyDotOrg
displayName: Publish existing build to python.org
dependsOn: []
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
jobs:
- template: windows-release/stage-publish-pythonorg.yml

- stage: PublishExistingNuget
displayName: Publish existing build to nuget.org
dependsOn: []
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
jobs:
- template: windows-release/stage-publish-nugetorg.yml

- stage: PublishExistingStore
displayName: Publish existing build to Store
dependsOn: []
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
jobs:
- template: windows-release/stage-publish-store.yml
@@ -0,0 +1,84 @@
parameters:
ShouldPGO: false

steps:
- template: ./checkout.yml

- powershell: |
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)"
Write-Host "##vso[task.setvariable variable=VersionNumber]$($d.PythonVersionNumber)"
Write-Host "##vso[task.setvariable variable=VersionHex]$($d.PythonVersionHex)"
Write-Host "##vso[task.setvariable variable=VersionUnique]$($d.PythonVersionUnique)"
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)"
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)-$(Name)"
displayName: 'Extract version numbers'

- ${{ if eq(parameters.ShouldPGO, 'false') }}:
- powershell: |
$env:SigningCertificate = $null
.\PCbuild\build.bat -v -p $(Platform) -c $(Configuration)
displayName: 'Run build'
env:
IncludeUwp: true
Py_OutDir: '$(Build.BinariesDirectory)\bin'
- ${{ if eq(parameters.ShouldPGO, 'true') }}:
- powershell: |
$env:SigningCertificate = $null
.\PCbuild\build.bat -v -p $(Platform) --pgo
displayName: 'Run build with PGO'
env:
IncludeUwp: true
Py_OutDir: '$(Build.BinariesDirectory)\bin'
- powershell: |
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
$tool = (gci -r "$kitroot\Bin\*\x64\signtool.exe" | sort FullName -Desc | select -First 1)
if (-not $tool) {
throw "SDK is not available"
}
Write-Host "##vso[task.prependpath]$($tool.Directory)"
displayName: 'Add WinSDK tools to path'

- powershell: |
$env:SigningCertificate = $null
$(_HostPython) PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch)
makecat "${env:CAT}.cdf"
del "${env:CAT}.cdf"
if (-not (Test-Path "${env:CAT}.cat")) {
throw "Failed to build catalog file"
}
displayName: 'Generate catalog'
env:
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
PYTHON_HEXVERSION: $(VersionHex)

- task: PublishPipelineArtifact@0
displayName: 'Publish binaries'
condition: and(succeeded(), not(and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate'])))
inputs:
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
artifactName: bin_$(Name)

- task: PublishPipelineArtifact@0
displayName: 'Publish binaries for signing'
condition: and(succeeded(), and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate']))
inputs:
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
artifactName: unsigned_bin_$(Name)

- task: CopyFiles@2
displayName: 'Layout Artifact: symbols'
inputs:
sourceFolder: $(Build.BinariesDirectory)\bin\$(Arch)
targetFolder: $(Build.ArtifactStagingDirectory)\symbols\$(Name)
flatten: true
contents: |
**\*.pdb
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: symbols'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)\symbols'
ArtifactName: symbols
@@ -0,0 +1,21 @@
parameters:
depth: 3

steps:
- checkout: none

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch https://github.com/$(GitRemote)/cpython.git .
displayName: 'git clone ($(GitRemote)/$(SourceTag))'
condition: and(succeeded(), and(variables['GitRemote'], variables['SourceTag']))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch $(Build.Repository.Uri) .
displayName: 'git clone (<default>/$(SourceTag))'
condition: and(succeeded(), and(not(variables['GitRemote']), variables['SourceTag']))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch https://github.com/$(GitRemote)/cpython.git .
displayName: 'git clone ($(GitRemote)/<default>)'
condition: and(succeeded(), and(variables['GitRemote'], not(variables['SourceTag'])))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch $(Build.Repository.Uri) .
displayName: 'git clone'
condition: and(succeeded(), and(not(variables['GitRemote']), not(variables['SourceTag'])))
@@ -0,0 +1,17 @@
# Locate the Windows SDK and add its binaries directory to PATH
#
# `toolname` can be overridden to use a different marker file.

parameters:
toolname: signtool.exe

steps:
- powershell: |
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
$tool = (gci -r "$kitroot\Bin\*\${{ parameters.toolname }}" | sort FullName -Desc | select -First 1)
if (-not $tool) {
throw "SDK is not available"
}
Write-Host "##vso[task.prependpath]$($tool.Directory)"
Write-Host "Adding $($tool.Directory) to PATH"
displayName: 'Add WinSDK tools to path'
@@ -0,0 +1,28 @@
parameters:
GPGKeyFile: $(GPGKey)
GPGPassphrase: $(GPGPassphrase)
Files: '*'
WorkingDirectory: $(Build.BinariesDirectory)

steps:
- task: DownloadSecureFile@1
name: gpgkey
inputs:
secureFile: ${{ parameters.GPGKeyFile }}
displayName: 'Download GPG key'

- powershell: |
git clone https://github.com/python/cpython-bin-deps --branch gpg --single-branch --depth 1 --progress -v "gpg"
gpg/gpg2.exe --import "$(gpgkey.secureFilePath)"
(gci -File ${{ parameters.Files }}).FullName | %{
gpg/gpg2.exe -ba --batch --passphrase ${{ parameters.GPGPassphrase }} $_
"Made signature for $_"
}
displayName: 'Generate GPG signatures'
workingDirectory: ${{ parameters.WorkingDirectory }}

- powershell: |
$p = gps "gpg-agent" -EA 0
if ($p) { $p.Kill() }
displayName: 'Kill GPG agent'
condition: true

No commit comments for this range

You can’t perform that action at this time.