-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-relative-to
- Loading branch information
Showing
19 changed files
with
181 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,62 @@ | ||
[build-system] | ||
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"] | ||
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.1"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "importlib_metadata" | ||
authors = [ | ||
{ name = "Jason R. Coombs", email = "[email protected]" }, | ||
] | ||
description = "Read metadata from Python packages" | ||
readme = "README.rst" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"zipp>=0.5", | ||
'typing-extensions>=3.6.4; python_version < "3.8"', | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Source = "https://github.com/python/importlib_metadata" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
# upstream | ||
"pytest >= 6, != 8.1.*", | ||
"pytest-checkdocs >= 2.4", | ||
"pytest-cov", | ||
"pytest-mypy", | ||
"pytest-enabler >= 2.2", | ||
"pytest-ruff >= 0.2.1", | ||
|
||
# local | ||
'importlib_resources>=1.3; python_version < "3.9"', | ||
"packaging", | ||
"pyfakefs", | ||
"flufl.flake8", | ||
"pytest-perf >= 0.9.2", | ||
"jaraco.test >= 5.4", | ||
] | ||
doc = [ | ||
# upstream | ||
"sphinx >= 3.5", | ||
"jaraco.packaging >= 9.3", | ||
"rst.linker >= 1.9", | ||
"furo", | ||
"sphinx-lint", | ||
|
||
# tidelift | ||
"jaraco.tidelift >= 1.4", | ||
|
||
# local | ||
] | ||
perf = ["ipython"] | ||
|
||
[tool.setuptools_scm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import contextlib | ||
|
||
from .py39 import import_helper | ||
|
||
|
||
@contextlib.contextmanager | ||
def isolated_modules(): | ||
""" | ||
Save modules on entry and cleanup on exit. | ||
""" | ||
(saved,) = import_helper.modules_setup() | ||
try: | ||
yield | ||
finally: | ||
import_helper.modules_cleanup(saved) | ||
|
||
|
||
vars(import_helper).setdefault('isolated_modules', isolated_modules) |
Oops, something went wrong.