Skip to content

Commit 79cea4c

Browse files
authored
Merge pull request #20 from planetlabs/python-312
Add support for Python 3.12, drop support for Python 3.6
2 parents ae21aa2 + 949163d commit 79cea4c

File tree

11 files changed

+87
-2466
lines changed

11 files changed

+87
-2466
lines changed

Diff for: .github/workflows/actions.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,11 @@ name: Run tests
22
on: [push, pull_request]
33

44
jobs:
5-
# Note that if we want to keep testing on Python 3.6, we need to test on
6-
# an older ubuntu. Once we don't care about 3.6 any longer we can drop this.
7-
test-client-old-python:
8-
runs-on: ubuntu-20.04
9-
strategy:
10-
matrix:
11-
python: ['3.6']
12-
steps:
13-
- name: Setup Python
14-
uses: actions/[email protected]
15-
with:
16-
python-version: ${{ matrix.python }}
17-
- name: Check out repository code
18-
uses: actions/checkout@v2
19-
- name: Test
20-
run: |
21-
pip install -e .[test]
22-
py.test
235
test-client:
246
runs-on: ubuntu-latest
257
strategy:
268
matrix:
27-
python: [3.8, 3.9, '3.10']
9+
python: [3.8, 3.9, '3.10', '3.12']
2810
steps:
2911
- name: Setup Python
3012
uses: actions/[email protected]

Diff for: .gitlab-ci.yml.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish-pypi:
1919
image: {{PLANET_CI_IMAGE}}
2020
script:
2121
- rm -rf dist
22-
- python3 setup.py sdist bdist_wheel
22+
- python -m build
2323
- find dist
2424
- twine upload -r pypi --skip-existing dist/*
2525
tags:

Diff for: MANIFEST.in

-16
This file was deleted.

Diff for: cosmolog/__init__.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1414
# License for the specific language governing permissions and limitations under
1515
# the License.
16-
17-
from ._version import get_versions
16+
import sys
1817

1918
from .cosmologger import CosmologEvent
2019
from .cosmologger import Cosmologger
@@ -29,5 +28,10 @@
2928
'CosmologgerException', 'CosmologEvent',
3029
'LEVELS', 'setup_logging']
3130

32-
__version__ = get_versions()['version']
33-
del get_versions
31+
32+
if sys.version_info >= (3, 8):
33+
from importlib.metadata import version
34+
else:
35+
from importlib_metadata import version
36+
37+
__version__ = version

0 commit comments

Comments
 (0)