diff --git a/morgan/configurator.py b/morgan/configurator.py index c543997..f350bb7 100644 --- a/morgan/configurator.py +++ b/morgan/configurator.py @@ -1,17 +1,11 @@ import argparse -from collections import OrderedDict import configparser import os import platform import sys import sysconfig - -from packaging.version import Version - -if Version(platform.python_version()) < Version('3.8'): - import importlib_metadata as metadata -else: - import importlib.metadata as metadata +from collections import OrderedDict +from importlib import metadata def generate_env(name: str = "local"): @@ -23,7 +17,7 @@ def generate_env(name: str = "local"): """ config = configparser.ConfigParser() - config["env.{}".format(name)] = { + config[f'env.{name}'] = { 'os_name': os.name, 'platform_tag': sysconfig.get_platform(), 'sys_platform': sys.platform, diff --git a/pyproject.toml b/pyproject.toml index 50c9d2b..59aa1e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,14 +12,13 @@ authors = [ license = { file="LICENSE" } keywords = [ "pypi", "mirror", "packages", "pypi-mirror" ] readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ #"packaging~=21.3", # hatchling 1.27.0 requires packaging>=24.2, but you have packaging 21.3 which is incompatible. "packaging~=24.2", # packaging.utils.InvalidSdistFilename: Invalid sdist filename (invalid version): 'expandvars-0.6.0-macosx-10.15-x86_64.tar.gz' (old versions) # solved in morgan/__init__.py - "importlib-metadata~=4.12.0; python_version < '3.8'", "tomli~=2.0.1", ] classifiers = [ @@ -31,10 +30,12 @@ classifiers = [ "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", - "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 :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", ] @@ -56,4 +57,4 @@ morgan = "morgan:main" [tool.black] line-length = 80 -target-version = ['py37'] +target-version = ['py38']