importlib-metadata 7.1.0__tar.gz → 7.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.github/workflows/main.yml +8 -3
  2. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.readthedocs.yaml +5 -1
  3. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/NEWS.rst +10 -0
  4. {importlib_metadata-7.1.0/importlib_metadata.egg-info → importlib_metadata-7.2.0}/PKG-INFO +24 -24
  5. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/__init__.py +4 -1
  6. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0/importlib_metadata.egg-info}/PKG-INFO +24 -24
  7. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata.egg-info/SOURCES.txt +0 -1
  8. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata.egg-info/requires.txt +5 -7
  9. importlib_metadata-7.2.0/pyproject.toml +62 -0
  10. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/pytest.ini +4 -1
  11. importlib_metadata-7.2.0/setup.cfg +4 -0
  12. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/compat/py39.py +1 -1
  13. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/fixtures.py +7 -26
  14. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/test_api.py +1 -1
  15. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/test_main.py +1 -1
  16. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tox.ini +3 -3
  17. importlib_metadata-7.1.0/pyproject.toml +0 -5
  18. importlib_metadata-7.1.0/setup.cfg +0 -54
  19. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.coveragerc +0 -0
  20. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.editorconfig +0 -0
  21. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.github/FUNDING.yml +0 -0
  22. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.github/dependabot.yml +0 -0
  23. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.gitignore +0 -0
  24. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/.pre-commit-config.yaml +0 -0
  25. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/LICENSE +0 -0
  26. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/README.rst +0 -0
  27. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/SECURITY.md +0 -0
  28. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/conftest.py +0 -0
  29. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/__init__.py +0 -0
  30. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/api.rst +0 -0
  31. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/conf.py +0 -0
  32. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/history.rst +0 -0
  33. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/index.rst +0 -0
  34. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/docs/migration.rst +0 -0
  35. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/exercises.py +0 -0
  36. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_adapters.py +0 -0
  37. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_collections.py +0 -0
  38. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_compat.py +0 -0
  39. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_functools.py +0 -0
  40. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_itertools.py +0 -0
  41. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_meta.py +0 -0
  42. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/_text.py +0 -0
  43. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/compat/__init__.py +0 -0
  44. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/compat/py39.py +0 -0
  45. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/diagnose.py +0 -0
  46. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata/py.typed +0 -0
  47. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata.egg-info/dependency_links.txt +0 -0
  48. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/importlib_metadata.egg-info/top_level.txt +0 -0
  49. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/mypy.ini +0 -0
  50. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/ruff.toml +0 -0
  51. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/__init__.py +0 -0
  52. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/_context.py +0 -0
  53. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/_path.py +0 -0
  54. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/compat/__init__.py +0 -0
  55. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/compat/py312.py +0 -0
  56. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/compat/test_py39_compat.py +0 -0
  57. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/__init__.py +0 -0
  58. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/example-21.12-py3-none-any.whl +0 -0
  59. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/example-21.12-py3.6.egg +0 -0
  60. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/example2-1.0.0-py3-none-any.whl +0 -0
  61. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/sources/example/example/__init__.py +0 -0
  62. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/sources/example/setup.py +0 -0
  63. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/sources/example2/example2/__init__.py +0 -0
  64. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/data/sources/example2/pyproject.toml +0 -0
  65. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/test_integration.py +0 -0
  66. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/tests/test_zip.py +0 -0
  67. {importlib_metadata-7.1.0 → importlib_metadata-7.2.0}/towncrier.toml +0 -0
@@ -4,8 +4,11 @@ on:
4
4
  merge_group:
5
5
  push:
6
6
  branches-ignore:
7
- # disabled for jaraco/skeleton#103
8
- # - gh-readonly-queue/** # Temporary merge queue-related GH-made branches
7
+ # temporary GH branches relating to merge queues (jaraco/skeleton#93)
8
+ - gh-readonly-queue/**
9
+ tags:
10
+ # required if branches-ignore is supplied (jaraco/skeleton#103)
11
+ - '**'
9
12
  pull_request:
10
13
 
11
14
  permissions:
@@ -28,10 +31,10 @@ env:
28
31
  jobs:
29
32
  test:
30
33
  strategy:
34
+ # https://blog.jaraco.com/efficient-use-of-ci-resources/
31
35
  matrix:
32
36
  python:
33
37
  - "3.8"
34
- - "3.11"
35
38
  - "3.12"
36
39
  platform:
37
40
  - ubuntu-latest
@@ -42,6 +45,8 @@ jobs:
42
45
  platform: ubuntu-latest
43
46
  - python: "3.10"
44
47
  platform: ubuntu-latest
48
+ - python: "3.11"
49
+ platform: ubuntu-latest
45
50
  - python: pypy3.10
46
51
  platform: ubuntu-latest
47
52
  runs-on: ${{ matrix.platform }}
@@ -3,10 +3,14 @@ python:
3
3
  install:
4
4
  - path: .
5
5
  extra_requirements:
6
- - docs
6
+ - doc
7
7
 
8
8
  # required boilerplate readthedocs/readthedocs.org#10401
9
9
  build:
10
10
  os: ubuntu-lts-latest
11
11
  tools:
12
12
  python: latest
13
+ # post-checkout job to ensure the clone isn't shallow jaraco/skeleton#114
14
+ jobs:
15
+ post_checkout:
16
+ - git fetch --unshallow || true
@@ -1,3 +1,13 @@
1
+ v7.2.0
2
+ ======
3
+
4
+ Features
5
+ --------
6
+
7
+ - Deferred select imports in for speedup (python/cpython#109829).
8
+ - Updated fixtures for python/cpython#120801.
9
+
10
+
1
11
  v7.1.0
2
12
  ======
3
13
 
@@ -1,39 +1,39 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: importlib_metadata
3
- Version: 7.1.0
3
+ Version: 7.2.0
4
4
  Summary: Read metadata from Python packages
5
- Home-page: https://github.com/python/importlib_metadata
6
- Author: Jason R. Coombs
7
- Author-email: jaraco@jaraco.com
5
+ Author-email: "Jason R. Coombs" <jaraco@jaraco.com>
6
+ Project-URL: Homepage, https://github.com/python/importlib_metadata
8
7
  Classifier: Development Status :: 5 - Production/Stable
9
8
  Classifier: Intended Audience :: Developers
10
9
  Classifier: License :: OSI Approved :: Apache Software License
11
10
  Classifier: Programming Language :: Python :: 3
12
11
  Classifier: Programming Language :: Python :: 3 :: Only
13
12
  Requires-Python: >=3.8
13
+ Description-Content-Type: text/x-rst
14
14
  License-File: LICENSE
15
15
  Requires-Dist: zipp>=0.5
16
16
  Requires-Dist: typing-extensions>=3.6.4; python_version < "3.8"
17
- Provides-Extra: testing
18
- Requires-Dist: pytest>=6; extra == "testing"
19
- Requires-Dist: pytest-checkdocs>=2.4; extra == "testing"
20
- Requires-Dist: pytest-cov; extra == "testing"
21
- Requires-Dist: pytest-mypy; platform_python_implementation != "PyPy" and extra == "testing"
22
- Requires-Dist: pytest-enabler>=2.2; extra == "testing"
23
- Requires-Dist: pytest-ruff>=0.2.1; extra == "testing"
24
- Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra == "testing"
25
- Requires-Dist: packaging; extra == "testing"
26
- Requires-Dist: pyfakefs; extra == "testing"
27
- Requires-Dist: flufl.flake8; extra == "testing"
28
- Requires-Dist: pytest-perf>=0.9.2; extra == "testing"
29
- Requires-Dist: jaraco.test>=5.4; extra == "testing"
30
- Provides-Extra: docs
31
- Requires-Dist: sphinx>=3.5; extra == "docs"
32
- Requires-Dist: jaraco.packaging>=9.3; extra == "docs"
33
- Requires-Dist: rst.linker>=1.9; extra == "docs"
34
- Requires-Dist: furo; extra == "docs"
35
- Requires-Dist: sphinx-lint; extra == "docs"
36
- Requires-Dist: jaraco.tidelift>=1.4; extra == "docs"
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
19
+ Requires-Dist: pytest-checkdocs>=2.4; extra == "test"
20
+ Requires-Dist: pytest-cov; extra == "test"
21
+ Requires-Dist: pytest-mypy; extra == "test"
22
+ Requires-Dist: pytest-enabler>=2.2; extra == "test"
23
+ Requires-Dist: pytest-ruff>=0.2.1; extra == "test"
24
+ Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra == "test"
25
+ Requires-Dist: packaging; extra == "test"
26
+ Requires-Dist: pyfakefs; extra == "test"
27
+ Requires-Dist: flufl.flake8; extra == "test"
28
+ Requires-Dist: pytest-perf>=0.9.2; extra == "test"
29
+ Requires-Dist: jaraco.test>=5.4; extra == "test"
30
+ Provides-Extra: doc
31
+ Requires-Dist: sphinx>=3.5; extra == "doc"
32
+ Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
33
+ Requires-Dist: rst.linker>=1.9; extra == "doc"
34
+ Requires-Dist: furo; extra == "doc"
35
+ Requires-Dist: sphinx-lint; extra == "doc"
36
+ Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
37
37
  Provides-Extra: perf
38
38
  Requires-Dist: ipython; extra == "perf"
39
39
 
@@ -18,7 +18,7 @@ import itertools
18
18
  import posixpath
19
19
  import collections
20
20
 
21
- from . import _adapters, _meta
21
+ from . import _meta
22
22
  from .compat import py39
23
23
  from ._collections import FreezableDefaultDict, Pair
24
24
  from ._compat import (
@@ -461,6 +461,9 @@ class Distribution(DeprecatedNonAbstract):
461
461
  Custom providers may provide the METADATA file or override this
462
462
  property.
463
463
  """
464
+ # deferred for performance (python/cpython#109829)
465
+ from . import _adapters
466
+
464
467
  opt_text = (
465
468
  self.read_text('METADATA')
466
469
  or self.read_text('PKG-INFO')
@@ -1,39 +1,39 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: importlib_metadata
3
- Version: 7.1.0
3
+ Version: 7.2.0
4
4
  Summary: Read metadata from Python packages
5
- Home-page: https://github.com/python/importlib_metadata
6
- Author: Jason R. Coombs
7
- Author-email: jaraco@jaraco.com
5
+ Author-email: "Jason R. Coombs" <jaraco@jaraco.com>
6
+ Project-URL: Homepage, https://github.com/python/importlib_metadata
8
7
  Classifier: Development Status :: 5 - Production/Stable
9
8
  Classifier: Intended Audience :: Developers
10
9
  Classifier: License :: OSI Approved :: Apache Software License
11
10
  Classifier: Programming Language :: Python :: 3
12
11
  Classifier: Programming Language :: Python :: 3 :: Only
13
12
  Requires-Python: >=3.8
13
+ Description-Content-Type: text/x-rst
14
14
  License-File: LICENSE
15
15
  Requires-Dist: zipp>=0.5
16
16
  Requires-Dist: typing-extensions>=3.6.4; python_version < "3.8"
17
- Provides-Extra: testing
18
- Requires-Dist: pytest>=6; extra == "testing"
19
- Requires-Dist: pytest-checkdocs>=2.4; extra == "testing"
20
- Requires-Dist: pytest-cov; extra == "testing"
21
- Requires-Dist: pytest-mypy; platform_python_implementation != "PyPy" and extra == "testing"
22
- Requires-Dist: pytest-enabler>=2.2; extra == "testing"
23
- Requires-Dist: pytest-ruff>=0.2.1; extra == "testing"
24
- Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra == "testing"
25
- Requires-Dist: packaging; extra == "testing"
26
- Requires-Dist: pyfakefs; extra == "testing"
27
- Requires-Dist: flufl.flake8; extra == "testing"
28
- Requires-Dist: pytest-perf>=0.9.2; extra == "testing"
29
- Requires-Dist: jaraco.test>=5.4; extra == "testing"
30
- Provides-Extra: docs
31
- Requires-Dist: sphinx>=3.5; extra == "docs"
32
- Requires-Dist: jaraco.packaging>=9.3; extra == "docs"
33
- Requires-Dist: rst.linker>=1.9; extra == "docs"
34
- Requires-Dist: furo; extra == "docs"
35
- Requires-Dist: sphinx-lint; extra == "docs"
36
- Requires-Dist: jaraco.tidelift>=1.4; extra == "docs"
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
19
+ Requires-Dist: pytest-checkdocs>=2.4; extra == "test"
20
+ Requires-Dist: pytest-cov; extra == "test"
21
+ Requires-Dist: pytest-mypy; extra == "test"
22
+ Requires-Dist: pytest-enabler>=2.2; extra == "test"
23
+ Requires-Dist: pytest-ruff>=0.2.1; extra == "test"
24
+ Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra == "test"
25
+ Requires-Dist: packaging; extra == "test"
26
+ Requires-Dist: pyfakefs; extra == "test"
27
+ Requires-Dist: flufl.flake8; extra == "test"
28
+ Requires-Dist: pytest-perf>=0.9.2; extra == "test"
29
+ Requires-Dist: jaraco.test>=5.4; extra == "test"
30
+ Provides-Extra: doc
31
+ Requires-Dist: sphinx>=3.5; extra == "doc"
32
+ Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
33
+ Requires-Dist: rst.linker>=1.9; extra == "doc"
34
+ Requires-Dist: furo; extra == "doc"
35
+ Requires-Dist: sphinx-lint; extra == "doc"
36
+ Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
37
37
  Provides-Extra: perf
38
38
  Requires-Dist: ipython; extra == "perf"
39
39
 
@@ -13,7 +13,6 @@ mypy.ini
13
13
  pyproject.toml
14
14
  pytest.ini
15
15
  ruff.toml
16
- setup.cfg
17
16
  towncrier.toml
18
17
  tox.ini
19
18
  .github/FUNDING.yml
@@ -3,7 +3,7 @@ zipp>=0.5
3
3
  [:python_version < "3.8"]
4
4
  typing-extensions>=3.6.4
5
5
 
6
- [docs]
6
+ [doc]
7
7
  sphinx>=3.5
8
8
  jaraco.packaging>=9.3
9
9
  rst.linker>=1.9
@@ -14,10 +14,11 @@ jaraco.tidelift>=1.4
14
14
  [perf]
15
15
  ipython
16
16
 
17
- [testing]
18
- pytest>=6
17
+ [test]
18
+ pytest!=8.1.*,>=6
19
19
  pytest-checkdocs>=2.4
20
20
  pytest-cov
21
+ pytest-mypy
21
22
  pytest-enabler>=2.2
22
23
  pytest-ruff>=0.2.1
23
24
  packaging
@@ -26,8 +27,5 @@ flufl.flake8
26
27
  pytest-perf>=0.9.2
27
28
  jaraco.test>=5.4
28
29
 
29
- [testing:platform_python_implementation != "PyPy"]
30
- pytest-mypy
31
-
32
- [testing:python_version < "3.9"]
30
+ [test:python_version < "3.9"]
33
31
  importlib_resources>=1.3
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.1"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "importlib_metadata"
7
+ authors = [
8
+ { name = "Jason R. Coombs", email = "jaraco@jaraco.com" },
9
+ ]
10
+ description = "Read metadata from Python packages"
11
+ readme = "README.rst"
12
+ classifiers = [
13
+ "Development Status :: 5 - Production/Stable",
14
+ "Intended Audience :: Developers",
15
+ "License :: OSI Approved :: Apache Software License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ ]
19
+ requires-python = ">=3.8"
20
+ dependencies = [
21
+ "zipp>=0.5",
22
+ 'typing-extensions>=3.6.4; python_version < "3.8"',
23
+ ]
24
+ dynamic = ["version"]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/python/importlib_metadata"
28
+
29
+ [project.optional-dependencies]
30
+ test = [
31
+ # upstream
32
+ "pytest >= 6, != 8.1.*",
33
+ "pytest-checkdocs >= 2.4",
34
+ "pytest-cov",
35
+ "pytest-mypy",
36
+ "pytest-enabler >= 2.2",
37
+ "pytest-ruff >= 0.2.1",
38
+
39
+ # local
40
+ 'importlib_resources>=1.3; python_version < "3.9"',
41
+ "packaging",
42
+ "pyfakefs",
43
+ "flufl.flake8",
44
+ "pytest-perf >= 0.9.2",
45
+ "jaraco.test >= 5.4",
46
+ ]
47
+ doc = [
48
+ # upstream
49
+ "sphinx >= 3.5",
50
+ "jaraco.packaging >= 9.3",
51
+ "rst.linker >= 1.9",
52
+ "furo",
53
+ "sphinx-lint",
54
+
55
+ # tidelift
56
+ "jaraco.tidelift >= 1.4",
57
+
58
+ # local
59
+ ]
60
+ perf = ["ipython"]
61
+
62
+ [tool.setuptools_scm]
@@ -1,6 +1,9 @@
1
1
  [pytest]
2
2
  norecursedirs=dist build .tox .eggs
3
- addopts=--doctest-modules
3
+ addopts=
4
+ --doctest-modules
5
+ --import-mode importlib
6
+ consider_namespace_packages=true
4
7
  filterwarnings=
5
8
  ## upstream
6
9
 
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -2,7 +2,7 @@ from jaraco.test.cpython import from_test_support, try_import
2
2
 
3
3
 
4
4
  os_helper = try_import('os_helper') or from_test_support(
5
- 'FS_NONASCII', 'skip_unless_symlink'
5
+ 'FS_NONASCII', 'skip_unless_symlink', 'temp_dir'
6
6
  )
7
7
  import_helper = try_import('import_helper') or from_test_support(
8
8
  'modules_setup', 'modules_cleanup'
@@ -1,10 +1,8 @@
1
- import os
2
1
  import sys
3
2
  import copy
4
3
  import json
5
4
  import shutil
6
5
  import pathlib
7
- import tempfile
8
6
  import textwrap
9
7
  import functools
10
8
  import contextlib
@@ -26,29 +24,12 @@ except (ImportError, AttributeError):
26
24
 
27
25
 
28
26
  @contextlib.contextmanager
29
- def tempdir():
30
- tmpdir = tempfile.mkdtemp()
31
- try:
32
- yield pathlib.Path(tmpdir)
33
- finally:
34
- shutil.rmtree(tmpdir)
35
-
36
-
37
- @contextlib.contextmanager
38
- def save_cwd():
39
- orig = os.getcwd()
40
- try:
41
- yield
42
- finally:
43
- os.chdir(orig)
44
-
45
-
46
- @contextlib.contextmanager
47
- def tempdir_as_cwd():
48
- with tempdir() as tmp:
49
- with save_cwd():
50
- os.chdir(str(tmp))
51
- yield tmp
27
+ def tmp_path():
28
+ """
29
+ Like os_helper.temp_dir, but yields a pathlib.Path.
30
+ """
31
+ with os_helper.temp_dir() as path:
32
+ yield pathlib.Path(path)
52
33
 
53
34
 
54
35
  @contextlib.contextmanager
@@ -69,7 +50,7 @@ class Fixtures:
69
50
  class SiteDir(Fixtures):
70
51
  def setUp(self):
71
52
  super().setUp()
72
- self.site_dir = self.fixtures.enter_context(tempdir())
53
+ self.site_dir = self.fixtures.enter_context(tmp_path())
73
54
 
74
55
 
75
56
  class OnSysPath(Fixtures):
@@ -109,7 +109,7 @@ class APITests(
109
109
  Entry points should only be exposed for the first package
110
110
  on sys.path with a given name (even when normalized).
111
111
  """
112
- alt_site_dir = self.fixtures.enter_context(fixtures.tempdir())
112
+ alt_site_dir = self.fixtures.enter_context(fixtures.tmp_path())
113
113
  self.fixtures.enter_context(self.add_sys_path(alt_site_dir))
114
114
  alt_pkg = {
115
115
  "DistInfo_pkg-1.1.0.dist-info": {
@@ -135,7 +135,7 @@ class NameNormalizationTests(fixtures.OnSysPath, fixtures.SiteDir, unittest.Test
135
135
  fixtures.build_files(self.make_pkg('abc'), self.site_dir)
136
136
  before = list(_unique(distributions()))
137
137
 
138
- alt_site_dir = self.fixtures.enter_context(fixtures.tempdir())
138
+ alt_site_dir = self.fixtures.enter_context(fixtures.tmp_path())
139
139
  self.fixtures.enter_context(self.add_sys_path(alt_site_dir))
140
140
  fixtures.build_files(self.make_pkg('ABC'), alt_site_dir)
141
141
  after = list(_unique(distributions()))
@@ -9,7 +9,7 @@ passenv =
9
9
  HOME
10
10
  usedevelop = True
11
11
  extras =
12
- testing
12
+ test
13
13
 
14
14
  [testenv:diffcov]
15
15
  description = run tests and check that diff from main is covered
@@ -24,8 +24,8 @@ commands =
24
24
  [testenv:docs]
25
25
  description = build the documentation
26
26
  extras =
27
- docs
28
- testing
27
+ doc
28
+ test
29
29
  changedir = docs
30
30
  commands =
31
31
  python -m sphinx -W --keep-going . {toxinidir}/build/html
@@ -1,5 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [tool.setuptools_scm]
@@ -1,54 +0,0 @@
1
- [metadata]
2
- name = importlib_metadata
3
- author = Jason R. Coombs
4
- author_email = jaraco@jaraco.com
5
- description = Read metadata from Python packages
6
- long_description = file:README.rst
7
- url = https://github.com/python/importlib_metadata
8
- classifiers =
9
- Development Status :: 5 - Production/Stable
10
- Intended Audience :: Developers
11
- License :: OSI Approved :: Apache Software License
12
- Programming Language :: Python :: 3
13
- Programming Language :: Python :: 3 :: Only
14
-
15
- [options]
16
- include_package_data = true
17
- python_requires = >=3.8
18
- install_requires =
19
- zipp>=0.5
20
- typing-extensions>=3.6.4; python_version < "3.8"
21
-
22
- [options.extras_require]
23
- testing =
24
- pytest >= 6
25
- pytest-checkdocs >= 2.4
26
- pytest-cov
27
- pytest-mypy; \
28
- python_implementation != "PyPy"
29
- pytest-enabler >= 2.2
30
- pytest-ruff >= 0.2.1
31
-
32
- importlib_resources>=1.3; python_version < "3.9"
33
- packaging
34
- pyfakefs
35
- flufl.flake8
36
- pytest-perf >= 0.9.2
37
- jaraco.test >= 5.4
38
- docs =
39
- sphinx >= 3.5
40
- jaraco.packaging >= 9.3
41
- rst.linker >= 1.9
42
- furo
43
- sphinx-lint
44
-
45
- jaraco.tidelift >= 1.4
46
- perf =
47
- ipython
48
-
49
- [options.entry_points]
50
-
51
- [egg_info]
52
- tag_build =
53
- tag_date = 0
54
-