diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 07c081b..e2c3253 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -4,21 +4,19 @@ on: push: pull_request: - jobs: - run-test: + run-tox: name: test-${{ matrix.python-version }} runs-on: "ubuntu-latest" strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" - - "pypy-3.7" + - "3.13.0-rc.1 - 3.13" - "pypy-3.8" - "pypy-3.9" - "pypy-3.10" @@ -27,49 +25,45 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.architecture }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install --upgrade tox setuptools - pip list + pip install --upgrade pip + pip install --upgrade tox - name: Run tests run: | tox -e py - + run-lint: name: lint runs-on: "ubuntu-latest" strategy: matrix: python-version: - - "3.10" + - "3.12" fail-fast: false steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.architecture }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install --upgrade tox setuptools - pip list + pip install --upgrade pip + pip install --upgrade tox - name: Run lint run: | diff --git a/README.rst b/README.rst index 4adaa2a..b3f5c90 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ Use **pip**: $ pip install python-mimeparse -It supports Python 3.7+ and PyPy. +It supports Python 3.8+ and PyPy. Functions --------- diff --git a/mimeparse.py b/mimeparse.py index 14b567c..84f069d 100644 --- a/mimeparse.py +++ b/mimeparse.py @@ -1,4 +1,4 @@ -__version__ = '1.6.0' +__version__ = '2.0.0a1' __author__ = 'Joe Gregorio' __email__ = 'joe@bitworking.org' __license__ = 'MIT License' diff --git a/pyproject.toml b/pyproject.toml index c4ef621..0d0e0e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,56 @@ [build-system] - build-backend = "setuptools.build_meta" - requires = [ - "setuptools>=47", - "wheel>=0.34", - ] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=47", + "wheel>=0.34", +] + +[project] +name = "python-mimeparse" +readme = "README.rst" +dynamic = ["version"] +dependencies = [] +requires-python = ">=3.8" +description = "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges." +license = {text = "MIT"} +authors = [ + {name = "DB Tsai", email = "dbtsai@dbtsai.com"}, +] +maintainers = [ + {name = "Falconry team", email = "mail@kgriffs.com"}, +] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Python Modules", +] +keywords = ["mime-type", "media-type"] + +[project.optional-dependencies] +test = ["pytest"] + +[project.urls] +Homepage = "https://github.com/falconry/python-mimeparse" +"Issue Tracker" = "https://github.com/falconry/python-mimeparse/issues" +Funding = "https://opencollective.com/falcon" +Chat = "https://gitter.im/falconry/user" + +[tool.setuptools] +license-files = ["LICENSE"] +py-modules = ["mimeparse"] + +[tool.setuptools.dynamic] +version = {attr = "mimeparse.__version__"} diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5973b76..0000000 --- a/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = python-mimeparse -version = attr: mimeparse.__version__ -description = A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges. -long_description = file: README.rst -long_description_content_type = text/x-rst -url = https://github.com/falconry/python-mimeparse -author = DB Tsai -author_email = dbtsai@dbtsai.com -maintainer = Falcon team -maintainer_email = mail@kgriffs.com -license = MIT -license_file = LICENSE -classifiers = - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Topic :: Internet :: WWW/HTTP - Topic :: Software Development :: Libraries :: Python Modules -keywords = - mime-type -project_urls = - Issue Tracker=https://github.com/falconry/python-mimeparse - -[options] -python_requires = >=3.7 -py_modules = mimeparse -install_requires = -tests_require = - pytest diff --git a/setup.py b/setup.py deleted file mode 100755 index 6068493..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup()