cpython/Doc/whatsnew
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
..
2.0.rst [docs] Improve the markup of powers (GH-28598) 2021-09-28 22:40:57 +02:00
2.1.rst bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378) 2021-07-27 00:11:55 +02:00
2.2.rst bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378) 2021-07-27 00:11:55 +02:00
2.3.rst bpo-44740: Make minor edits to lowercasing "internet" and "web". (GH-27385) 2021-07-27 10:57:52 +02:00
2.4.rst
2.5.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.6.rst Docs: FIX broken links. (GH-13491) 2019-05-25 20:02:24 +02:00
2.7.rst [docs] Improve the markup of powers (GH-28598) 2021-09-28 22:40:57 +02:00
3.0.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
3.1.rst [docs] Improve the markup of powers (GH-28598) 2021-09-28 22:40:57 +02:00
3.2.rst bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935) 2022-01-26 20:39:15 -08:00
3.3.rst bpo-40204, doc: Fix syntax of C variables (GH-21846) 2020-08-13 22:11:50 +02:00
3.4.rst bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378) 2021-07-27 00:11:55 +02:00
3.5.rst bpo-40204: Fix reference to terms in the doc (GH-21865) 2020-08-14 12:20:05 +02:00
3.6.rst Doc: some rst linting. (GH-30149) 2021-12-17 13:55:03 +01:00
3.7.rst bpo-43774: Document configure options (GH-25283) 2021-04-08 22:32:21 +02:00
3.8.rst bpo-36384: [doc] Mention CVE-2021-29921 fix in 3.8.12 (GH-27824) 2021-08-19 10:55:49 +02:00
3.9.rst bpo-45447: Add entry to What's new 3.9 (GH-31305) 2022-02-12 21:11:19 -05:00
3.10.rst Fix missing import in dataclass code snippet (GH-29214) 2022-02-14 12:01:53 -08:00
3.11.rst bpo-40059: Add tomllib (PEP-680) (GH-31498) 2022-03-08 09:26:13 +01:00
changelog.rst
index.rst Doc: What's new in Python 3.11 (GH-25963) 2021-05-07 10:06:45 +02:00