Commit Graph

3455 Commits

Author SHA1 Message Date
Brett Cannon 87eec70d97
Deprecate audioop (GH-32392) 2022-04-07 12:27:35 -07:00
Victor Stinner 85addfb9c6
bpo-35134: Remove the Include/code.h header file (GH-32385)
Remove the Include/code.h header file. C extensions should only
include the main <Python.h> header file.

Python.h includes directly Include/cpython/code.h instead.
2022-04-07 02:29:52 +02:00
Serhiy Storchaka 884eba3c76
bpo-26579: Add object.__getstate__(). (GH-2821)
Copying and pickling instances of subclasses of builtin types
bytearray, set, frozenset, collections.OrderedDict, collections.deque,
weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes
implemented as slots.
2022-04-06 20:00:14 +03:00
Petr Viktorin d79f118d04
bpo-47115: Document which parts of structs are in limited API/stable ABI (GH-32196)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-04-06 16:50:45 +02:00
Victor Stinner 2b4f2f5fa4
Revert "bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)" (GH-32343)
* Revert "bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)"

This reverts commit f877b40e3f.

* Revert "bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)"

This reverts commit b9a5522dd9.
2022-04-06 13:58:07 +02:00
Julien Palard 1d3e743599
[doc] Add missing backtick. (GH-32355) 2022-04-06 13:40:37 +02:00
Ken Jin 9ffe47df54
bpo-47189: What's New in 3.11: Faster CPython (GH-32235)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-04-06 19:38:25 +08:00
Brett Cannon c1d93b6411
bpo-47061: deprecate the `aifc` module (GH-32134)
Co-authored-by: Christian Heimes <christian@python.org>
2022-04-05 12:05:48 -07:00
Hugo van Kemenade 75280944e5
bpo-46607: Add DeprecationWarning for LegacyInterpolation, deprecated in docs since 3.2 (GH-30927) 2022-04-05 08:15:11 -07:00
Erlend Egeberg Aasland a7551247e7
bpo-41930: Add support for SQLite serialise/deserialise API (GH-26728)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-04-05 07:15:25 -07:00
Irit Katriel 0aa8d5cbd8
bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221) 2022-04-05 12:49:08 +01:00
Irit Katriel 32091df41c
bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309) 2022-04-05 12:06:22 +01:00
Oleg Iarygin 5a7506de73
Fix "Contributed ... in bpo-bpo-45847" (GH-32299) 2022-04-04 21:17:54 -04:00
Julien Palard 7f9c084fde
[doc] fix superfluous backtick in front of role. (GH-32220) 2022-04-02 15:08:36 +02:00
Serhiy Storchaka 1be3260a90
bpo-47152: Convert the re module into a package (GH-32177)
The sre_* modules are now deprecated.
2022-04-02 11:35:13 +03:00
Irit Katriel 04e07c258f
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231) 2022-04-01 13:59:38 +01:00
Victor Stinner f877b40e3f
bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)
Move the private _PyFrameEvalFunction type, and private
_PyInterpreterState_GetEvalFrameFunc() and
_PyInterpreterState_SetEvalFrameFunc() functions to the internal C
API. The _PyFrameEvalFunction callback function type now uses the
_PyInterpreterFrame type which is part of the internal C API.

Update the _PyFrameEvalFunction documentation.
2022-04-01 10:55:00 +02:00
Victor Stinner b9a5522dd9
bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)
Move the private undocumented _PyEval_EvalFrameDefault() function to
the internal C API. The function now uses the _PyInterpreterFrame
type which is part of the internal C API.
2022-04-01 10:17:57 +02:00
Mark Shannon 74b95d86e0
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114) 2022-03-31 17:13:25 +01:00
Irit Katriel a00518d9ad
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115) 2022-03-31 14:14:15 +01:00
Erlend Egeberg Aasland b36d222110
bpo-45847: Port _tkinter to PY_STDLIB_MOD (GH-31698)
- Remove ``--with-tclk-*`` options from `configure`
- Use pkg-config to detect `_tkinter` dependencies (Tcl/Tk, X11)
- Manual override via environment variables `TCLTK_CFLAGS` and `TCLTK_LIBS`
2022-03-31 03:19:08 -07:00
Hugo van Kemenade 6881ea936e
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124) 2022-03-30 12:00:27 +01:00
Ma Lin 356997cccc
bpo-35859: Fix a few long-standing bugs in re engine (GH-12427)
In rare cases, capturing group could get wrong result.

Regular expression engines in Perl and Java have similar bugs.
The new behavior now matches the behavior of more modern
RE engines: in the regex module and in PHP, Ruby and Node.js.
2022-03-29 17:31:01 +03:00
Christian Heimes 5fd8c574e0
bpo-47098: Replace Keccak Code Package with tiny_sha3 (GH-32060) 2022-03-26 21:36:08 +01:00
Christian Heimes b16b6bb8da
bpo-47095: Use libb2 to provide blake2 implementation (GH-32059) 2022-03-26 20:52:24 +01:00
Kurt McKee c07ca1aab6
Fix some typos in whatsnew (GH-32098)
* Fix some typos and phrasing

* Convert the `hash()` text to a link

* Remove definite article
2022-03-25 10:32:05 -07:00
Mark Shannon d7163bb35d
bpo-42197: Don't create `f_locals` dictionary unless we actually need it. (GH-32055)
* `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer called during profile and tracing.
 (Contributed by Fabio Zadrozny)

* Make accesses to a frame's `f_locals` safe from C code, not relying on calls to `PyFrame_FastToLocals` or `PyFrame_LocalsToFast`.

* Document new `PyFrame_GetLocals` C-API function.
2022-03-25 12:57:50 +00:00
Tomáš Hrnčiar 12c0012cf9
bpo-40465: Document random module changes in 3.11 What's new (#31818) 2022-03-24 15:22:58 +02:00
Russel Webber c62b944dfc
bpo-31582: Created a new documentation section describing sys.path initialization (GH-31082) 2022-03-23 17:29:40 +00:00
Victor Stinner b0f886d1bc
bpo-46836: Add Doc/c-api/frame.rst (GH-32051)
Reorganize the documentation of the PyFrameObject C API.
2022-03-23 13:19:13 +01:00
Serhiy Storchaka a25a985535
bpo-28080: Add support for the fallback encoding in ZIP files (GH-32007)
* Add the metadata_encoding parameter in the zipfile.ZipFile constructor.
* Add the --metadata-encoding option in the zipfile CLI.

Co-authored-by: Stephen J. Turnbull <stephen@xemacs.org>
2022-03-22 11:52:55 +02:00
Serhiy Storchaka c6cd3cc93c
bpo-47081: Replace "qualifiers" with "quantifiers" in the re module documentation (GH-32028)
It is a more commonly used term.
2022-03-22 11:44:47 +02:00
Serhiy Storchaka 345b390ed6
bpo-433030: Add support of atomic grouping in regular expressions (GH-31982)
* Atomic grouping: (?>...).
* Possessive quantifiers: x++, x*+, x?+, x{m,n}+.
  Equivalent to (?>x+), (?>x*), (?>x?), (?>x{m,n}).

Co-authored-by: Jeffrey C. Jacobs <timehorse@users.sourceforge.net>
2022-03-21 18:28:22 +02:00
Serhiy Storchaka 92a6abf72e
bpo-47066: Convert a warning about flags not at the start of the regular expression into error (GH-31994) 2022-03-19 16:10:44 +02:00
Hugo van Kemenade 7747384643
bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891)
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.
2022-03-18 12:45:37 -07:00
Miro Hrončok 48d9262699
bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation schemes (GH-31034)
Define *posix_venv* and *nt_venv* sysconfig installation schemes
to be used for bootstrapping new virtual environments.
Add *venv* sysconfig installation scheme to get the appropriate one of the above.
The schemes are identical to the pre-existing
*posix_prefix* and *nt* install schemes.
The venv module now uses the *venv* scheme to create new virtual environments
instead of hardcoding the paths depending only on the platform. Downstream
Python distributors customizing the *posix_prefix* or *nt* install
scheme in a way that is not compatible with the install scheme used in
virtual environments are encouraged not to customize the *venv* schemes.
When Python itself runs in a virtual environment,
sysconfig.get_default_scheme and
sysconfig.get_preferred_scheme with `key="prefix"` returns
*venv*.
2022-03-18 10:53:29 +01:00
Serhiy Storchaka c2e3c06139
bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839) 2022-03-17 13:05:52 +02:00
Victor Stinner 29624e769c
bpo-31415: importtime was made by Inada Naoki (GH-31875) 2022-03-14 10:39:33 -07:00
Alex Grönholm 9f04ee569c
bpo-46805: Add low level UDP socket functions to asyncio (GH-31455) 2022-03-13 18:42:29 +02:00
Victor Stinner 882d8096c2
bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657)
Add new functions to pack and unpack C double (serialize and
deserialize):

* PyFloat_Pack2(), PyFloat_Pack4(), PyFloat_Pack8()
* PyFloat_Unpack2(), PyFloat_Unpack4(), PyFloat_Unpack8()

Document these functions and add unit tests.

Rename private functions and move them from the internal C API
to the public C API:

* _PyFloat_Pack2() => PyFloat_Pack2()
* _PyFloat_Pack4() => PyFloat_Pack4()
* _PyFloat_Pack8() => PyFloat_Pack8()
* _PyFloat_Unpack2() => PyFloat_Unpack2()
* _PyFloat_Unpack4() => PyFloat_Unpack4()
* _PyFloat_Unpack8() => PyFloat_Unpack8()

Replace the "unsigned char*" type with "char*" which is more common
and easy to use.
2022-03-12 00:10:02 +01:00
Victor Stinner 7854012077
bpo-46917: math.nan is now always available (GH-31793) 2022-03-10 17:47:18 +01:00
Victor Stinner 9b51fd5d13
bpo-46917: Require IEEE 754 to build Python (GH-31790)
Building Python now requires support of IEEE 754 floating point
numbers.
2022-03-10 14:37:19 +01:00
Erlend Egeberg Aasland e801e88744
bpo-45138: Revert GH-28240: Expand traced SQL statements (GH-31788)
This reverts commit d1777515f9.

Automerge-Triggered-By: GH:JelleZijlstra
2022-03-09 09:39:49 -08:00
Serhiy Storchaka 02fbaf4887
bpo-46245: Add optional parameter dir_fd in shutil.rmtree() (GH-30365) 2022-03-09 14:29:33 +02:00
Ken Jin 5eb03b1b51
Fix 3.11 what's new formatting (GH-31763) 2022-03-09 19:31:56 +08:00
Erlend Egeberg Aasland d1777515f9
bpo-45138: Expand traced SQL statements in `sqlite3` trace callback (GH-28240) 2022-03-08 18:46:40 -08:00
Taneli Hukkinen 591f6754b5
bpo-40059: Add tomllib (PEP-680) (GH-31498)
This adds a new standard library module, `tomllib`, for parsing TOML.

The implementation is based on Tomli (https://github.com/hukkin/tomli).

## Steps taken (converting `tomli` to `tomllib`)

- Move everything in `tomli:src/tomli` to `Lib/tomllib`. Exclude `py.typed`.
- Remove `__version__ = ...` line from `Lib/tomllib/__init__.py`
- Move everything in `tomli:tests` to `Lib/test/test_tomllib`. Exclude the following test data dirs recursively:
  - `tomli:tests/data/invalid/_external/`
  - `tomli:tests/data/valid/_external/`
- Create `Lib/test/test_tomllib/__main__.py`:

  ```python
  import unittest

  from . import load_tests


  unittest.main()
  ```


- Add the following to `Lib/test/test_tomllib/__init__.py`:

  ```python
  import os
  from test.support import load_package_tests

  def load_tests(*args):
      return load_package_tests(os.path.dirname(__file__), *args)
  ```

  Also change `import tomli as tomllib` to `import tomllib`.

- In `cpython/Lib/tomllib/_parser.py` replace `__fp` with `fp` and `__s` with
  `s`. Add the `/` to `load` and `loads` function signatures.

- Run `make regen-stdlib-module-names`

- Create `Doc/library/tomllib.rst` and reference it in `Doc/library/fileformats.rst`
2022-03-08 09:26:13 +01:00
Inada Naoki 2d8b764210
bpo-46864: Deprecate PyBytesObject.ob_shash. (GH-31598) 2022-03-06 11:39:10 +09:00
Victor Stinner ec4a580f7c
bpo-46355: Update pythoncapi_compat project URL (GH-31670) 2022-03-04 00:46:56 +01:00
Inada Naoki 9833bb91e4
bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) 2022-03-02 08:09:28 +09:00