Skip to content

Commit

Permalink
Merge pull request #10035 from hukkin/tomli
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored Jul 12, 2021
2 parents ad3d498 + 1915c4d commit bd5ac26
Show file tree
Hide file tree
Showing 22 changed files with 815 additions and 1,450 deletions.
1 change: 1 addition & 0 deletions news/10034.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support TOML v1.0.0 syntax in ``pyproject.toml``.
4 changes: 2 additions & 2 deletions src/pip/_internal/pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from collections import namedtuple
from typing import Any, List, Optional

from pip._vendor import toml
from pip._vendor import tomli
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement

from pip._internal.exceptions import InstallationError
Expand Down Expand Up @@ -59,7 +59,7 @@ def load_pyproject_toml(

if has_pyproject:
with open(pyproject_toml, encoding="utf-8") as f:
pp_toml = toml.load(f)
pp_toml = tomli.load(f)
build_system = pp_toml.get("build-system")
else:
build_system = None
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_vendor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Vendoring Policy
pure Python.
* Any modifications made to libraries **MUST** be noted in
``pip/_vendor/README.rst`` and their corresponding patches **MUST** be
included ``tools/automation/vendoring/patches``.
included ``tools/vendoring/patches``.
* Vendored libraries should have corresponding ``vendored()`` entries in
``pip/_vendor/__init__.py``.

Expand Down Expand Up @@ -118,7 +118,7 @@ Automatic Vendoring

Vendoring is automated via the `vendoring <https://pypi.org/project/vendoring/>`_ tool from the content of
``pip/_vendor/vendor.txt`` and the different patches in
``tools/automation/vendoring/patches``.
``tools/vendoring/patches``.
Launch it via ``vendoring sync . -v`` (requires ``vendoring>=0.2.2``).


Expand Down
4 changes: 1 addition & 3 deletions src/pip/_vendor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,5 @@ def vendored(modulename):
vendored("requests.packages.urllib3.util.url")
vendored("resolvelib")
vendored("tenacity")
vendored("toml")
vendored("toml.encoder")
vendored("toml.decoder")
vendored("tomli")
vendored("urllib3")
2 changes: 1 addition & 1 deletion src/pip/_vendor/pep517/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import logging
import os
from pip._vendor import toml
import toml
import shutil

from .envbuild import BuildEnvironment
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/pep517/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
import os
from os.path import isfile, join as pjoin
from pip._vendor.toml import TomlDecodeError, load as toml_load
from toml import TomlDecodeError, load as toml_load
import shutil
from subprocess import CalledProcessError
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/pep517/envbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import os
import logging
from pip._vendor import toml
import toml
import shutil
from subprocess import check_call
import sys
Expand Down
1 change: 0 additions & 1 deletion src/pip/_vendor/toml.pyi

This file was deleted.

25 changes: 0 additions & 25 deletions src/pip/_vendor/toml/__init__.py

This file was deleted.

Loading

0 comments on commit bd5ac26

Please sign in to comment.