pyproject: drop py3.10 support
This commit is contained in:
parent
c3c483823a
commit
4fcc20b7be
|
@ -8,6 +8,7 @@ Release Notes
|
|||
1.0.0
|
||||
-----
|
||||
|
||||
* Drop support for Python 3.10.
|
||||
* Fix metadata schema violation for URLs with whitespace in them
|
||||
* [Ruby Gem] Support extracting metadata from Gemspec files, not just Gems
|
||||
|
||||
|
|
|
@ -13,21 +13,13 @@ The following attributes are supported:
|
|||
"""
|
||||
|
||||
import logging
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
from gentle.generators import AbstractGenerator
|
||||
from gentle.metadata import MetadataXML
|
||||
from gentle.metadata.utils import extract_name_email, extract_remote_id
|
||||
|
||||
try:
|
||||
try:
|
||||
import tomllib
|
||||
except ModuleNotFoundError:
|
||||
import tomli as tomllib # type: ignore
|
||||
_HAS_TOMLLIB = True
|
||||
except ModuleNotFoundError:
|
||||
_HAS_TOMLLIB = False
|
||||
|
||||
logger = logging.getLogger("cargo")
|
||||
|
||||
|
||||
|
@ -85,4 +77,4 @@ class CargoGenerator(AbstractGenerator):
|
|||
|
||||
@property
|
||||
def active(self) -> bool:
|
||||
return _HAS_TOMLLIB and self.cargo_toml.is_file()
|
||||
return self.cargo_toml.is_file()
|
||||
|
|
|
@ -16,6 +16,7 @@ The following attributes are supported:
|
|||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
import tomllib
|
||||
|
||||
from gentle.generators import AbstractGenerator
|
||||
from gentle.generators.python import (
|
||||
|
@ -28,15 +29,6 @@ from gentle.metadata import MetadataXML
|
|||
from gentle.metadata.types import Person
|
||||
from gentle.metadata.utils import extract_remote_id
|
||||
|
||||
try:
|
||||
try:
|
||||
import tomllib
|
||||
except ModuleNotFoundError:
|
||||
import tomli as tomllib # type: ignore
|
||||
_HAS_TOMLLIB = True
|
||||
except ModuleNotFoundError:
|
||||
_HAS_TOMLLIB = False
|
||||
|
||||
logger = logging.getLogger("pyproject")
|
||||
|
||||
|
||||
|
@ -76,4 +68,4 @@ class PyprojectGenerator(AbstractGenerator):
|
|||
|
||||
@property
|
||||
def active(self) -> bool:
|
||||
return _HAS_TOMLLIB and self.pyproject_toml.is_file()
|
||||
return self.pyproject_toml.is_file()
|
||||
|
|
|
@ -13,7 +13,7 @@ authors = [
|
|||
dynamic = ["version", "description"]
|
||||
readme = "README.md"
|
||||
license = {file = "LICENSE"}
|
||||
requires-python = ">=3.10"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"portage",
|
||||
"lxml"
|
||||
|
@ -36,8 +36,6 @@ keywords = ["gentoo", "ebuild", "metadata", "upstream", "maintainer"]
|
|||
pkginfo = ["pkginfo"]
|
||||
# DOAP
|
||||
rdf = ["rdflib"]
|
||||
# Cargo.toml, pyproject.toml
|
||||
toml = ["tomli; python_version <= '3.11'"]
|
||||
# Python packaging
|
||||
wheel = ["build"]
|
||||
# package.yaml, pubspec.yaml, shard.yml
|
||||
|
@ -93,7 +91,6 @@ check_untyped_defs = true
|
|||
module = [
|
||||
"_pytest.*",
|
||||
"portage.*",
|
||||
"tomllib.*",
|
||||
"xml.sax._exceptions",
|
||||
"xmldiff.*"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue