Commit Graph

113639 Commits

Author SHA1 Message Date
Miss Islington (bot) 7bfeb8a606
[3.11] Improve logging documentation with example and additional cookbook re… (GH-93644) (GH-93647) 2022-06-09 17:28:34 +01:00
Miss Islington (bot) 4c41f21153
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)
(cherry picked from commit 5a4af3ab03)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 09:12:51 -07:00
Łukasz Langa 2084f9479c
[3.11] gh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH-93463) (GH-93636)
Note: This change is not effective on Microsoft Windows.

Cookies can store sensitive information and should therefore be protected
against unauthorized third parties. This is also described in issue #79096.

The filesystem permissions are currently set to 644, everyone can read the
file. This commit changes the permissions to 600, only the creater of the file
can read and modify it. This improves security, because it reduces the attack
surface. Now the attacker needs control of the user that created the cookie or
a ways to circumvent the filesystems permissions.

This change is backwards incompatible. Systems that rely on world-readable
cookies will breake. However, one could argue that those are misconfigured in
the first place.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pascal Wittmann <mail@pascal-wittmann.de>
Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 16:16:37 +02:00
Miss Islington (bot) 92f8786ef8
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93638)
(cherry picked from commit a5ba0f4ebc)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-09 16:15:33 +02:00
Miss Islington (bot) 98bbbbe46d
gh-93616: Fix env changed issue in test_modulefinder (GH-93617)
(cherry picked from commit cffa4f7854)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 00:02:39 -07:00
Christian Heimes 47a7855f41
[3.11] gh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602) (GH-93613)
* gh-93575: Use correct way to calculate PyUnicode struct sizes

* Add comment to keep test_sys and test_unicode in sync

* Fix case code < 256.
(cherry picked from commit 5442561c1a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 22:21:20 +02:00
Christian Heimes 1b7942acb2
[3.11] gh-90473: Define HOSTRUNNER for WASI (GH-93606) (GH-93612)
(cherry picked from commit 22df2e0322)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 22:21:04 +02:00
Christian Heimes abd022383b
[3.11] gh-93584: Make all install+tests targets depends on all (GH-93589) (GH-93603)
All install targets use the "all" target as synchronization point to
prevent race conditions with PGO builds. PGO builds use recursive make,
which can lead to two parallel `./python setup.py build` processes that
step on each others toes.

"test" targets now correctly compile PGO build in a clean repo.
(cherry picked from commit 243ed5439c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 17:24:30 +02:00
Irit Katriel ce07de9059
[3.11] GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483) (GH-93601)
(cherry picked from commit f8eae6f5c3)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-08 16:16:46 +01:00
Miss Islington (bot) 68aae80159
gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (GH-93526)
(cherry picked from commit 875de61c29)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-08 04:07:15 -07:00
Miss Islington (bot) 121ab58e03
GH-93521: For dataclasses, filter out `__weakref__` slot if present in bases (GH-93535)
(cherry picked from commit 5849af7a80)

Co-authored-by: Bluenix <bluenixdev@gmail.com>
2022-06-07 18:17:56 -07:00
Miss Islington (bot) f26d1b5b53
Fix `PurePath.relative_to` links in the pathlib documentation. (GH-93268)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.
(cherry picked from commit 8ef7929baf)

Co-authored-by: jacksonriley <52106215+jacksonriley@users.noreply.github.com>
2022-06-07 12:11:10 -07:00
Miss Islington (bot) 52032554ae
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353)
(cherry picked from commit 70690c7233)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-07 05:28:11 -07:00
Miss Islington (bot) faf0cf7ac6
gh-57539: Increase calendar test coverage (GH-93468) (GH-93564)
(cherry picked from commit f0d0be3493)

Co-authored-by: Sean Fleming
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-06-07 12:21:04 +02:00
Miss Islington (bot) 2a24421054
gh-88831: In docs for asyncio.create_task, explain why strong references to tasks are needed (GH-93258) (GH-93566)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 75ceae05c1)

Co-authored-by: Andreas Grommek <76997441+agrommek@users.noreply.github.com>
2022-06-07 12:14:06 +02:00
Miss Islington (bot) 07c3cbad95
gh-86986: bump min sphinx version to 3.2 (GH-93337) (GH-93561)
(cherry picked from commit 57e8ee7086)

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2022-06-07 10:21:47 +02:00
Miss Islington (bot) 008bcdec11
Grammar fix to socket error string (GH-93523) (GH-93560)
(cherry picked from commit 890c3be8fb)

Co-authored-by: Evorage <owner@evorage.com>
2022-06-07 10:10:24 +02:00
Miss Islington (bot) e139dee1f7
Fix contributor name in WhatsNew 3.11 (GH-93556)
(cherry picked from commit 74039330f2)

Co-authored-by: Samodya Abeysiriwardane <379594+sransara@users.noreply.github.com>
2022-06-06 21:49:47 -07:00
Miss Islington (bot) fd4dad5cca
[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552) (GH-93553)
(cherry picked from commit 46fde1feb5)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-06-06 20:51:13 +02:00
Miss Islington (bot) a712c4b26c
Remove action=None kwarg from Barrier docs (GH-93538) (GH-93551)
(cherry picked from commit 71c8f96971)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-06-06 20:10:12 +02:00
Miss Islington (bot) 6787a8f146
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534) (GH-93550)
WASI does not have the ``chmod(2)`` syscall yet.
(cherry picked from commit 22fed605e0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:51 +02:00
Christian Heimes 986ce4e613
[3.11] gh-90473: Skip POSIX tests that don't apply to WASI (GH-93536) (GH-93540)
(cherry picked from commit 80a39daecd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:22 +02:00
Miss Islington (bot) f46e30f9d4
gh-83728: Add hmac.new default parameter deprecation (GH-91939) (GH-93544)
(cherry picked from commit 56b5daf159)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-06-06 19:09:51 +02:00
Miss Islington (bot) e8404f46b3
asyncio.Barrier docs: Fix typo (GH-93371)
taks -> tasks
(cherry picked from commit 8584981a58)

Co-authored-by: Omer Katz <omer.katz@omerkatz.com>
2022-06-06 07:54:44 -07:00
Miss Islington (bot) 20be4a11fe
gh-90473: WASI requires proper open(2) flags (GH-93529)
(cherry picked from commit 4c71d22c4f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 03:32:23 -07:00
Miss Islington (bot) a848a9894d
gh-93247: Fix assert function in asyncio locks test (GH-93248)
(cherry picked from commit 9081bbd036)

Co-authored-by: Cyker Way <cykerway@gmail.com>
2022-06-05 18:47:07 -07:00
Miss Islington (bot) 2220dc50df
gh-89973: Fix re.error in the fnmatch module. (GH-93072)
Character ranges with upper bound less that lower bound (e.g. [c-a])
are now interpreted as empty ranges, for compatibility with other glob
pattern implementations. Previously it was re.error.
(cherry picked from commit 0902c3d8ed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-05 02:39:11 -07:00
Miss Islington (bot) a8bd502e57
gh-90473: wasmtime does not support absolute symlinks (GH-93490)
(cherry picked from commit 6f8367d348)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-05 01:26:38 -07:00
Miss Islington (bot) c21f2bdaf1
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505) (gh-93509)
(cherry picked from commit 713eb184b5)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2022-06-05 15:47:12 +09:00
Miss Islington (bot) d97e2c52d3
gh-93442: Make C++ version of _Py_CAST work with 0/NULL. (GH-93500) (gh-93507)
Add C++ overloads for _Py_CAST_impl() to handle 0/NULL.  This will allow
C++ extensions that pass 0 or NULL to macros using _Py_CAST() to
continue to compile.  Without this, you get an error like:

    invalid ‘static_cast’ from type ‘int’ to type ‘_object*’

The modern way to use a NULL value in C++ is to use nullptr.  However,
we want to not break extensions that do things the old way.

Co-authored-by: serge-sans-paille
(cherry picked from commit 8bcc3fa345)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2022-06-05 14:15:59 +09:00
Miss Islington (bot) 4443c285a6
Fix missing word in sys.float_info docstring (GH-93489) (GH-93495)
(cherry picked from commit e12f34b6d8)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2022-06-04 20:23:53 +01:00
Miss Islington (bot) 1497d7fdef
gh-92886: Fix test that fails when running with `-O` in `test_imaplib.py` (GH-93237)
(cherry picked from commit 8150b8cf7f)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
2022-06-03 20:38:16 -07:00
Miss Islington (bot) 9f101c23a4
gh-93156 - fix negative indexing into absolute `pathlib.PurePath().parents` (GH-93273)
When a `_PathParents` object has a drive or a root, the length of the
object is *one less* than than the length of `self._parts`, which resulted
in an off-by-one error when `path.parents[-n]` was fed through to
`self._parts[:-n - 1]`. In particular, `path.parents[-1]` was a malformed
path object with spooky properties.

This is addressed by adding `len(self)` to negative indices.
(cherry picked from commit f32e6b48d1)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2022-06-03 14:57:54 -07:00
Miss Islington (bot) e4113be63c
gh-84461: Skip dtrace/network tests that are enabled by -u all (GH-93473)
(cherry picked from commit 1a8a0ddb1c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-03 13:40:20 -07:00
Miss Islington (bot) fae93ab163
[3.11] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) (GH-93458)
(cherry picked from commit b9509ba7a9)


Co-authored-by: Petr Viktorin <encukou@gmail.com>

Automerge-Triggered-By: GH:encukou
2022-06-03 08:25:58 -07:00
Miss Islington (bot) 71fae642c0
test.pythoninfo: Fix typo, Py_REF_DEBUG => Py_TRACE_REFS (GH-93467)
(cherry picked from commit d8f40ead92)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-06-03 07:18:49 -07:00
Ken Jin 74b91b1763
[3.11] gh-93433: Fix dis doc example output (GH-93434) (GH-93460)
(cherry picked from commit debf4c1ec5)
2022-06-03 21:26:43 +08:00
Miss Islington (bot) 1d2b766100
gh-90473: Skip and document more failing tests on WASI (GH-93436)
- Mark more ``umask()`` cases
- ``dup()`` is not supported
- ``/dev/null`` is not available
- document missing features
- mark more modules as not available
(cherry picked from commit 069c96f84c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-02 23:50:44 -07:00
Miss Islington (bot) e798f698e5
gh-92932: dis._unpack_opargs should handle EXTENDED_ARG_QUICK (gh-92945)
(cherry picked from commit b013804134)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-06-02 20:02:55 -07:00
Miss Islington (bot) 376d53771d
gh-93418: Fix an assert when an f-string expression is followed by an '=', but no closing brace. (gh-93419) (gh-93422)
(cherry picked from commit ee70c70aa9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2022-06-01 21:04:27 -04:00
Pablo Galindo ae0cf8eab5
Post 3.11.0b3 2022-06-01 16:28:12 +01:00
Pablo Galindo eb0004c271
Python 3.11.0b3 2022-06-01 14:07:53 +01:00
Miss Islington (bot) 90f9b8b9e8
gh-92597: Improve error message for AST nodes with invalid ranges (GH-93398) (GH-93414)
(cherry picked from commit 8a221a8537)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-06-01 14:05:40 +01:00
Miss Islington (bot) d779e5d16e
Remove the execution bit to some socket-related files. (GH-93368)
(cherry picked from commit 5247389369)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-06-01 00:35:15 -07:00
Miss Islington (bot) 3265ff9ccc
gh-93345: Fix a crash in substitution of nested TypeVar after TypeVarTuple (GH-93346)
For example: tuple[*Ts, list[T]][int, str, bool]
(cherry picked from commit f545fc955a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-05-31 23:43:38 -07:00
Miss Islington (bot) 00f8fe9564
[3.11] gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335) (#92484)
* gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335)
(cherry picked from commit 9d25db9db1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Regenerate ABI file

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2022-06-01 03:13:27 +01:00
Miss Islington (bot) b425d887aa
gh-92597: Ensure that AST nodes without explicit end positions can be compiled (GH-93359)
(cherry picked from commit 705eaec28f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-05-31 16:26:16 -07:00
Miss Islington (bot) 29bfabe970
gh-69093: Fix Setup.local.in rule for _sqlite3 (GH-93380)
(cherry picked from commit 8a5e3c2ec6)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-31 12:53:27 -07:00
Miss Islington (bot) 3a62701452
Remove VOC reference (93333)
VOC has been archived by the BeeWare project, and they are instead
embedding CPython, rather than transpiling to Java bytecode.
(cherry picked from commit bb900712a5)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2022-05-31 10:46:37 -07:00
Pablo Galindo 5024a9b7d1
Post 3.11.0b2 2022-05-31 14:16:08 +01:00