Skip to content

Commit 60e8c6a

Browse files
authored
Migrate to pyproject.toml and bump minimum Python version to 3.9 (#1459)
* Migrate to pyproject.toml * Add .venv to .gitignore * Exclude tests in MANIFEST.in * Move pytest into pyproject.toml * Remove unused coveralls * Restore requirements_dev.txt Needed for CI venv cache and readthedocs. * Exclude .venv for flake8 * Bump minimum Python version to 3.9
1 parent 99205d3 commit 60e8c6a

14 files changed

+49
-92
lines changed

Diff for: .coveragerc

-19
This file was deleted.

Diff for: .flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# W605: invalid escape sequence
1010
[flake8]
1111
ignore=E128,E701,E702,E731,W503,W605
12-
exclude=compat.py,venv
12+
exclude=compat.py,venv,.venv
1313
per-file-ignores =
1414
tests/payloads.py:E501
1515
max-complexity = -1

Diff for: .github/ISSUE_TEMPLATE/BUG_REPORT.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ body:
5050
id: python
5151
attributes:
5252
label: Python Version
53-
placeholder: eg. 3.8.17
53+
placeholder: eg. 3.9.20
5454
validations:
5555
required: true
5656
- type: input

Diff for: .github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
CACHE_VERSION: 1
15-
DEFAULT_PYTHON: 3.8
15+
DEFAULT_PYTHON: 3.9
1616

1717
jobs:
1818
lint-flake8:

Diff for: .github/workflows/pypi.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
types: [published]
1010

1111
env:
12-
DEFAULT_PYTHON: 3.8
12+
DEFAULT_PYTHON: 3.9
1313

1414
jobs:
1515
build:
@@ -27,9 +27,8 @@ jobs:
2727
- name: Install dependencies and build
2828
run: |
2929
pip install -U pip
30-
pip install -r requirements.txt
31-
pip install setuptools twine wheel
32-
python setup.py sdist bdist_wheel
30+
pip install build twine
31+
python -m build
3332
3433
- name: Verify README
3534
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pip-selfcheck.json
2626
pyvenv.cfg
2727
MANIFEST
2828
venv/
29+
.venv/
2930

3031
# path for the test lib.
3132
plex/

Diff for: .readthedocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2
55
build:
66
os: ubuntu-22.04
77
tools:
8-
python: "3.8"
8+
python: "3.9"
99

1010
sphinx:
1111
configuration: docs/conf.py

Diff for: MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include README.rst
2-
include requirements.txt
2+
recursive-exclude tests *

Diff for: package.json

-5
This file was deleted.

Diff for: pyproject.toml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[project]
2+
name = "PlexAPI"
3+
authors = [
4+
{ name = "Michael Shepanski", email = "[email protected]" }
5+
]
6+
description = "Python bindings for the Plex API."
7+
readme = "README.rst"
8+
requires-python = ">=3.9"
9+
keywords = ["plex", "api"]
10+
license = {file = "LICENSE.txt"}
11+
classifiers = [
12+
"Operating System :: OS Independent",
13+
"Programming Language :: Python :: 3",
14+
"License :: OSI Approved :: BSD License",
15+
]
16+
dependencies = ["requests"]
17+
dynamic = ["version"]
18+
19+
[project.optional-dependencies]
20+
alert = ["websocket-client>=1.3.3"]
21+
22+
[project.urls]
23+
Homepage = "https://github.com/pkkid/python-plexapi"
24+
Documentation = "https://python-plexapi.readthedocs.io"
25+
26+
[tool.setuptools.dynamic]
27+
version = {attr = "plexapi.const.__version__"}
28+
29+
[build-system]
30+
requires = ["setuptools", "wheel"]
31+
build-backend = "setuptools.build_meta"
32+
33+
[tool.pytest.ini_options]
34+
markers = [
35+
"client: this is a client test.",
36+
"req_client: require a client to run this test.",
37+
"anonymously: test plexapi anonymously.",
38+
"authenticated: test plexapi authenticated.",
39+
]

Diff for: pytest.ini

-6
This file was deleted.

Diff for: requirements.txt

-5
This file was deleted.

Diff for: requirements_dev.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
# PlexAPI requirements to run py.test.
33
# pip install -r requirements_dev.txt
44
#---------------------------------------------------------
5-
coveralls==4.0.1
65
flake8==7.1.1
76
pillow==10.4.0
8-
pytest==8.3.3
7+
pytest==8.3.2
98
pytest-cache==1.0
109
pytest-cov==5.0.0
1110
pytest-mock==3.14.0

Diff for: setup.py

-46
This file was deleted.

0 commit comments

Comments
 (0)