Commit graph

109134 commits

Author SHA1 Message Date
Victor Stinner 801bb0b503
bpo-43103: Add configure --without-static-libpython (GH-24418)
Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.

Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.
2021-02-17 11:14:42 +01:00
Christian Reich 6a4177516b
Update urllib2.rst (GH-24236)
fixed a minor glitch in the order of two words.
2021-02-16 16:47:02 -08:00
Erlend Egeberg Aasland cc54001c2e
bpo-40170: Always define PyIter_Check() as a function (GH-24548) 2021-02-16 16:05:58 +01:00
Nicholas Sim 17dbd4078b
bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)
This change is backward compatible since C extension modules
must not include "pytime.h" directly, but only include "Python.h".
2021-02-16 13:04:38 +01:00
Erlend Egeberg Aasland 871eb4237b
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535) 2021-02-16 08:50:00 +01:00
Zackery Spytz 8a8b5df93f
bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500) 2021-02-16 01:14:13 +01:00
Dustin Rodrigues 755f3c1521
bpo-42819, readline: Disable bracketed paste (GH-24108) 2021-02-16 00:28:24 +01:00
Pablo Galindo 813db24f7c
Add a warning block around the get_referrers() documentation (GH-24511) 2021-02-15 23:03:38 +00:00
Pablo Galindo d0204963ec
bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541) 2021-02-15 22:15:49 +00:00
Pablo Galindo ab2d481639
bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R (GH-24539) 2021-02-15 22:35:48 +01:00
Ken Jin a2f0654b0a
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536) 2021-02-15 09:00:20 -08:00
Erlend Egeberg Aasland 4bb2a1ebc5
bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533) 2021-02-15 17:19:24 +01:00
Adam Goldschmidt fcbe0cb04d
bpo-42967: only use '&' as a query string separator (#24297)
bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().

urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.


Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
2021-02-14 14:41:57 -08:00
Erlend Egeberg Aasland 1b57426e3a
bpo-43210: Fix byteswap comment in sha512.module.c (GH-24518) 2021-02-14 23:14:26 +09:00
Dong-hee Na 3cf0833f42
bpo-43152: Update assert statement to remove unused warning (GH-24473) 2021-02-14 15:54:39 +09:00
Terry Jan Reedy b676f5f809
bpo-43202: More codeop._maybe_compile clean-ups (GH-24512)
Add comment, end others with period, remove unused variables,
initialize others only when needed, and add explicit return.
2021-02-13 01:49:18 -05:00
Zackery Spytz 762fe7deed
bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-02-12 23:57:12 -05:00
Gregory P. Smith fd053fdd39
bpo-43172: readline now passes its tests when built against libedit (GH-24499)
bpo-43172: readline now passes its tests when built against libedit.

Existing irreconcilable API differences remain in readline.get_begidx
and readline.get_endidx behavior based on libreadline vs libedit use.
A note about that has been documented.
2021-02-12 12:04:46 -08:00
Erlend Egeberg Aasland 5ec7d53558
bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507)
Automerge-Triggered-By: GH:tiran
2021-02-12 02:34:11 -08:00
Terry Jan Reedy 2068b261e9
bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)
The return used to be after code that was ignored when there was a code object.
2021-02-11 19:31:10 -05:00
Inada Naoki fedd86df24
bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498) 2021-02-12 09:06:47 +09:00
Erlend Egeberg Aasland ea46579067
bpo-40956: Fix segfault when Connection.backup is called without target (GH-24503) 2021-02-11 01:04:02 +02:00
Tom Forbes 749d40a53f
Fix link to sqlite3 enable_shared_cache documentation (GH-24496) 2021-02-10 19:56:16 +02:00
Inada Naoki bdb941be42
bpo-42217: compiler: merge same co_code and co_linetable objects (GH-23056) 2021-02-10 09:20:42 +09:00
Pablo Galindo dbb228189b
bpo-43163: Handle unclosed parentheses in codeop (GH-24483) 2021-02-09 20:07:38 +00:00
Steve Dower b74396c316
bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485)
This ensures that ceval.c can be debugged.
Also remove some irrelevant options from the pragma.
2021-02-09 18:13:36 +00:00
Ken Jin da21f7b6e1
bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) 2021-02-08 17:58:50 -08:00
Ken Jin 5f77dee056
Improve docs of PEP 604 Union (#24301) 2021-02-08 17:57:11 -08:00
Ethan Furman d65b9033d6
bpo-43162: [Enum] deprecate enum member.member access (GH-24486)
In 3.5 (?) a speed optimization made it possible to access members as
attributes of other members, i.e. ``Color.RED.BLUE``.  This was always
discouraged in the docs, and other recent optimizations has made that
one no longer necessary.  Because some may be relying on it anyway, it
is being deprecated in 3.10, and will be removed in 3.11.
2021-02-08 17:32:38 -08:00
Roland Hieber e1f7769513
bpo-13501: allow choosing between readline and libedit (GH-24189)
In contrast to macOS, libedit is available as its own include file and
library on Linux systems to prevent file name clashes. So if both
libraries are available on the system, readline is currently chosen by
default; and if only libedit is available, it is not found at all. This
patch adds a way to link against libedit by adding the following
arguments to configure:

  --with-readline           link against libreadline (the default)
  --with-readline=editline  link against libeditline
  --with-readline=no        disable building the readline module
  --without-readline        (same)

The runtime detection of libedit vs. readline was already done in commit
7105319ada (2019-12-04, serge-sans-paille: "bpo-38634: Allow
non-apple build to cope with libedit (GH-16986)").

Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline")
Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD")
Co-authored-by: Enji Cooper (ngie-eign)
Co-authored-by: Martin Panter (vadmium)
Co-authored-by: Robert Marshall (kellinm)
2021-02-08 17:05:25 -08:00
Asheesh Laroia bf2e7e55d7
bpo-40692: Run more test_concurrent_futures tests (GH-20239)
In the case of multiprocessing.synchronize() being missing, the
test_concurrent_futures test suite now skips only the tests that
require multiprocessing.synchronize().

Validate that multiprocessing.synchronize exists as part of
_check_system_limits(), allowing ProcessPoolExecutor to raise
NotImplementedError during __init__, rather than crashing with
ImportError during __init__ when creating a lock imported from
multiprocessing.synchronize.

Use _check_system_limits() to disable tests of
ProcessPoolExecutor on systems without multiprocessing.synchronize.

Running the test suite without multiprocessing.synchronize reveals
that Lib/compileall.py crashes when it uses a ProcessPoolExecutor.
Therefore, change Lib/compileall.py to call _check_system_limits()
before creating the ProcessPoolExecutor.

Note that both Lib/compileall.py and Lib/test/test_compileall.py
were attempting to sanity-check ProcessPoolExecutor by expecting
ImportError. In multiprocessing.resource_tracker, sem_unlink() is also absent
on platforms where POSIX semaphores aren't available. Avoid using
sem_unlink() if it, too, does not exist.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-02-08 03:15:51 +00:00
Raymond Hettinger 30a8b28396
bpo-43147: Remove archaic terminology. (GH-24462) 2021-02-07 16:44:42 -08:00
Pablo Galindo 206cbdab16
bpo-43149: Improve error message for exception group without parentheses (GH-24467) 2021-02-07 18:42:21 +00:00
Terry Jan Reedy 0ec57e25c9
bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)
These 3 statements cannot be used at module scope -- nor in exec with one namespace.
2021-02-07 00:28:50 -05:00
Andrew Tennikoff 5f18c22339
Simple typo fix (GH-24448) 2021-02-05 10:17:01 -08:00
Zackery Spytz 4bb332cfd1
Fix a typo in a deprecation warning (GH-24423) 2021-02-05 22:09:17 +09:00
Zackery Spytz effaec0bb5
bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450)
PyObject_RichCompareBool() returns -1 on error, but this case is
not handled by the find_in_strong_cache() function.  Any exception
raised by PyObject_RichCompareBool() should be propagated.
2021-02-05 10:25:30 +02:00
Raymond Hettinger 755c6e637a
Minor readability improvements. Also note performance impact of __slots__. (GH-24456) 2021-02-04 22:05:42 -08:00
Raymond Hettinger d9dda32040
Reduce overhead on random timings (GH-24455) 2021-02-04 21:36:03 -08:00
Inada Naoki d938816acf
bpo-35295: Remove outdated comment. (GH-24453) 2021-02-05 13:21:28 +09:00
Raymond Hettinger b6d68aa08b
bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) 2021-02-04 15:52:16 -08:00
Ken Jin 196d4deaf4
bpo-42882: Fix MSVC warnings in pystate.c (GH-24440)
_PyRuntimeState.unicode_ids.next_index type is Py_ssize_t.
2021-02-04 23:08:03 +01:00
Ken Jin 28873a7050
Fix signed/unsigned comparison to avoid compilation warning (GH-24441) 2021-02-04 21:38:18 +00:00
dependabot[bot] 497b5649cf
build(deps): bump actions/cache from v2.1.3 to v2.1.4 (#24446)
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.3 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.3...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-04 12:57:10 -08:00
Mariatta Wijaya d30951d4ff
Fix dependabot.yml file (GH-24443)
The `target-branch` field doesn't seem to support array.
Since it defaults to the default branch anyway, we should just remove the `target-branch` field from the config.
2021-02-04 11:22:34 -08:00
Dong-hee Na f917c243c5
bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428) 2021-02-04 08:32:55 +09:00
Pablo Galindo d4e6ed7e5f
bpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436) 2021-02-03 23:29:26 +00:00
Harry bfe544d2f2
Fix typo (GH-23019)
Fixed possible typo in comment
2021-02-03 13:25:28 -08:00
dependabot[bot] aa4caf9887
build(deps): bump actions/upload-artifact from v2.2.1 to v2.2.2 (GH-24411)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.1...e448a9b857ee2131e752b06002bf0e093c65e571)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 13:22:27 -08:00
Pablo Galindo 12d0a7642f
Post 3.10.0a5 2021-02-03 06:15:44 +00:00