Skip to content

Commit bed8fd2

Browse files
committed
Merge branch 'master' into debt/py36
2 parents ab33995 + 216397d commit bed8fd2

File tree

6 files changed

+152
-65
lines changed

6 files changed

+152
-65
lines changed

.github/workflows/main.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Automated Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
matrix:
9+
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
10+
platform: [ubuntu-latest, macos-latest, windows-latest]
11+
runs-on: ${{ matrix.platform }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python }}
18+
- name: Install tox
19+
run: |
20+
python -m pip install tox
21+
- name: Run tests
22+
run: tox
23+
env:
24+
TOXENV: python
25+
26+
qa:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Setup Python
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.9
34+
- name: Install tox
35+
run: |
36+
python -m pip install tox
37+
- name: Run checks
38+
run: tox
39+
env:
40+
TOXENV: qa
41+
42+
coverage:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Setup Python
47+
uses: actions/setup-python@v2
48+
with:
49+
python-version: 3.9
50+
- name: Install tox
51+
run: |
52+
python -m pip install tox
53+
- name: Evaluate coverage
54+
run: tox
55+
env:
56+
TOXENV: cov
57+
58+
benchmark:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Setup Python
63+
uses: actions/setup-python@v2
64+
with:
65+
python-version: 3.9
66+
- name: Install tox
67+
run: |
68+
python -m pip install tox
69+
- name: Run benchmarks
70+
run: tox
71+
env:
72+
TOXENV: perf
73+
74+
diffcov:
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Setup Python
79+
uses: actions/setup-python@v2
80+
with:
81+
python-version: 3.9
82+
- name: Install tox
83+
run: |
84+
python -m pip install tox
85+
- name: Evaluate coverage
86+
run: tox
87+
env:
88+
TOXENV: diffcov
89+
90+
docs:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v2
94+
- name: Setup Python
95+
uses: actions/setup-python@v2
96+
with:
97+
python-version: 3.9
98+
- name: Install tox
99+
run: |
100+
python -m pip install tox
101+
- name: Build docs
102+
run: tox
103+
env:
104+
TOXENV: docs
105+
106+
release:
107+
needs: test
108+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
109+
runs-on: ubuntu-latest
110+
111+
steps:
112+
- uses: actions/checkout@v2
113+
- name: Setup Python
114+
uses: actions/setup-python@v2
115+
with:
116+
python-version: 3.9
117+
- name: Install tox
118+
run: |
119+
python -m pip install tox
120+
- name: Release
121+
run: tox -e release
122+
env:
123+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitlab-ci.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
``importlib_metadata``
33
=========================
44

5-
``importlib_metadata`` is a library to access the metadata for a Python
6-
package. It is intended to be ported to Python 3.8.
5+
``importlib_metadata`` is a library to access the metadata for a
6+
Python package.
7+
8+
As of Python 3.8, this functionality has been added to the
9+
`Python standard library
10+
<https://docs.python.org/3/library/importlib.metadata.html>`_.
11+
This package supplies backports of that functionality including
12+
improvements added to subsequent Python versions.
713

814

915
Usage
@@ -30,7 +36,7 @@ tools (or other conforming packages). It does not support:
3036
Project details
3137
===============
3238

33-
* Project home: https://gitlab.com/python-devs/importlib_metadata
34-
* Report bugs at: https://gitlab.com/python-devs/importlib_metadata/issues
35-
* Code hosting: https://gitlab.com/python-devs/importlib_metadata.git
36-
* Documentation: http://importlib_metadata.readthedocs.io/
39+
* Project home: https://github.com/python/importlib_metadata
40+
* Report bugs at: https://github.com/python/importlib_metadata/issues
41+
* Code hosting: https://github.com/python/importlib_metadata
42+
* Documentation: https://importlib_metadata.readthedocs.io/

docs/index.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Python 3.7 and newer (backported as :doc:`importlib_resources <importlib_resourc
1010
versions of Python), this can eliminate the need to use the older and less
1111
efficient ``pkg_resources`` package.
1212

13-
``importlib_metadata`` is a backport of Python 3.8's standard library
14-
:doc:`importlib.metadata <library/importlib.metadata>` module for Python 2.7, and 3.4 through 3.7. Users of
15-
Python 3.8 and beyond are encouraged to use the standard library module.
13+
``importlib_metadata`` supplies a backport of
14+
:doc:`importlib.metadata <library/importlib.metadata>` as found in
15+
Python 3.8 and later for earlier Python releases. Users of
16+
Python 3.8 and beyond are encouraged to use the standard library module
17+
when possible and fall back to ``importlib_metadata`` when necessary.
1618
When imported on Python 3.8 and later, ``importlib_metadata`` replaces the
1719
DistributionFinder behavior from the stdlib, but leaves the API in tact.
1820
Developers looking for detailed API descriptions should refer to the Python
@@ -32,10 +34,10 @@ The documentation here includes a general :ref:`usage <using>` guide.
3234
Project details
3335
===============
3436

35-
* Project home: https://gitlab.com/python-devs/importlib_metadata
36-
* Report bugs at: https://gitlab.com/python-devs/importlib_metadata/issues
37-
* Code hosting: https://gitlab.com/python-devs/importlib_metadata.git
38-
* Documentation: http://importlib_metadata.readthedocs.io/
37+
* Project home: https://github.com/python/importlib_metadata
38+
* Report bugs at: https://github.com/python/importlib_metadata/issues
39+
* Code hosting: https://github.com/python/importlib_metadata
40+
* Documentation: https://importlib_metadata.readthedocs.io/
3941

4042

4143
Indices and tables

tests/fixtures.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import tempfile
66
import textwrap
77
import contextlib
8-
import test.support
8+
9+
from .py39compat import FS_NONASCII
910

1011

1112
@contextlib.contextmanager
@@ -213,7 +214,7 @@ def build_files(file_defs, prefix=pathlib.Path()):
213214

214215
class FileBuilder:
215216
def unicode_filename(self):
216-
return test.support.FS_NONASCII or \
217+
return FS_NONASCII or \
217218
self.skip("File system does not support non-ascii.")
218219

219220

tests/py39compat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
try:
2+
from test.support.os_helpers import FS_NONASCII
3+
except ImportError:
4+
from test.support import FS_NONASCII # noqa

0 commit comments

Comments
 (0)