summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml176
1 files changed, 118 insertions, 58 deletions
diff --git a/pyproject.toml b/pyproject.toml
index a61cae0..497dcfb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,40 @@
+[project]
+name = "pendulum"
+version = "3.0.0"
+description = "Python datetimes made easy"
+readme = "README.rst"
+requires-python = ">=3.8"
+license = { text = "MIT License" }
+authors = [{ name = "Sébastien Eustace", email = "sebastien@eustace.io>" }]
+keywords = ['datetime', 'date', 'time']
+
+classifiers = [
+ "License :: OSI Approved :: MIT License",
+ "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",
+]
+
+dependencies = [
+ "python-dateutil>=2.6",
+ "tzdata>=2020.1",
+ 'backports.zoneinfo>=0.2.1; python_version < "3.9"',
+ 'time-machine>=2.6.0; implementation_name != "pypy"',
+ 'importlib-resources>=5.9.0; python_version < "3.9"'
+]
+
+[project.urls]
+Homepage = "https://pendulum.eustace.io"
+Documentation = "https://pendulum.eustace.io/docs"
+Repository = "https://github.com/sdispater/pendulum"
+
+
[tool.poetry]
name = "pendulum"
-version = "3.0.0a1"
+version = "3.0.0b1"
description = "Python datetimes made easy"
authors = ["Sébastien Eustace <sebastien@eustace.io>"]
license = "MIT"
@@ -10,90 +44,119 @@ repository = "https://github.com/sdispater/pendulum"
documentation = "https://pendulum.eustace.io/docs"
keywords = ['datetime', 'date', 'time']
-packages = [
- { include = "pendulum" },
- { include = "tests", format = "sdist" },
-]
-include = [
- { path = "meson.build", format = "sdist" },
- { path = "pendulum/py.typed" },
- # C extensions must be included in the wheel distributions
- { path = "pendulum/_extensions/*.so", format = "wheel" },
- { path = "pendulum/_extensions/*.pyd", format = "wheel" },
- { path = "pendulum/parsing/*.so", format = "wheel" },
- { path = "pendulum/parsing/*.pyd", format = "wheel" },
-]
-
[tool.poetry.dependencies]
-python = "^3.7"
-python-dateutil = "^2.6"
-"backports.zoneinfo" = { version = "^0.2.1", python = ">=3.7,<3.9" }
-time-machine = { version = "^2.6.0", markers = "implementation_name != 'pypy'" }
+python = ">=3.8"
+python-dateutil = ">=2.6"
+"backports.zoneinfo" = { version = ">=0.2.1", python = "<3.9" }
+time-machine = { version = ">=2.6.0", markers = "implementation_name != 'pypy'", optional = true }
tzdata = ">=2020.1"
-importlib-resources = { version = "^5.9.0", python = ">=3.7,<3.9" }
+importlib-resources = { version = ">=5.9.0", python = "<3.9" }
[tool.poetry.group.test.dependencies]
pytest = "^7.1.2"
-pytest-cov = "^3.0.0"
pytz = ">=2022.1"
-time-machine = "^2.7.1"
+time-machine = ">=2.6.0"
+pytest-benchmark = "^4.0.0"
[tool.poetry.group.doc.dependencies]
mkdocs = "^1.0"
-pymdown-extensions = "^6.0"
+pymdown-extensions = ">=6,<11"
pygments = "^2.2"
-markdown-include = "^0.5.1"
+markdown-include = "^0.8.1"
[tool.poetry.group.lint.dependencies]
-black = { version = "^22.6.0", markers = "implementation_name != 'pypy'" }
-isort = "^5.10.1"
-pre-commit = "^2.20.0"
-types-backports = "^0.1.3"
+pre-commit = "^3.0.0"
+
+[tool.poetry.group.typing.dependencies]
+mypy = "^1.3.0"
types-python-dateutil = "^2.8.19"
+types-pytz = ">=2022.7.1.2"
[tool.poetry.group.dev.dependencies]
babel = "^2.10.3"
-cleo = "^1.0.0a5"
-tox = "^3.25.1"
+cleo = { version = "^2.0.1", python = ">=3.8,<4.0" }
+tox = "^4.0.0"
-[tool.poetry.group.build]
-optional = true
+[tool.poetry.group.benchmark.dependencies]
+pytest-codspeed = "^1.2.2"
[tool.poetry.group.build.dependencies]
-meson = "^0.63.2"
-ninja = "^1.10.2.3"
-
-[tool.poetry.build]
-generate-setup-file = false
-script = "build.py"
-
-[tool.isort]
-profile = "black"
-force_single_line = true
-atomic = true
-lines_after_imports = -1
-lines_between_types = 1
-skip_glob = [
- "pendulum/locales/**",
- "build.py",
- "pendulum/__version__.py",
+maturin = ">=1.0,<2.0"
+
+[tool.poetry.extras]
+test = ["time-machine"]
+
+[tool.maturin]
+module-name = "pendulum._pendulum"
+
+
+[tool.ruff]
+fix = true
+unfixable = [
+ "ERA", # do not autoremove commented out code
+]
+target-version = "py38"
+line-length = 88
+extend-select = [
+ "B", # flake8-bugbear
+ "C4", # flake8-comprehensions
+ "ERA", # flake8-eradicate/eradicate
+ "I", # isort
+ "N", # pep8-naming
+ "PIE", # flake8-pie
+ "PGH", # pygrep
+ "RUF", # ruff checks
+ "SIM", # flake8-simplify
+ "TCH", # flake8-type-checking
+ "TID", # flake8-tidy-imports
+ "UP", # pyupgrade
]
-filter_files = true
-known_first_party = "pendulum"
-known_third_party = [
+ignore = [
+ "B904", # use 'raise ... from err'
+ "B905", # use explicit 'strict=' parameter with 'zip()'
+ "N818", # Exception name should be named with an Error suffix
+ "RUF001",
+]
+extend-exclude = [
+ # External to the project's coding standards:
+ "docs/*",
+ # Machine-generated, too many false-positives
+ "src/pendulum/locales/*",
+ # ruff disagrees with black when it comes to formatting
+ "*.pyi",
+]
+
+[tool.ruff.flake8-tidy-imports]
+ban-relative-imports = "all"
+
+[tool.ruff.isort]
+force-single-line = true
+lines-between-types = 1
+lines-after-imports = 2
+known-first-party = ["pendulum"]
+known-third-party = [
"babel",
"cleo",
"dateutil",
"time_machine",
"pytzdata",
]
+required-imports = ["from __future__ import annotations"]
+
+[tool.ruff.extend-per-file-ignores]
+"build.py" = ["I002"]
+"clock" = ["RUF012"]
[tool.mypy]
strict = true
-files = "pendulum, tests"
+files = "src, tests"
show_error_codes = true
pretty = true
+warn_unused_ignores = true
+exclude = [
+ "^build\\.py$"
+]
# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
@@ -103,9 +166,6 @@ pretty = true
[[tool.mypy.overrides]]
module = [
"pendulum.mixins.default",
- "tests.conftest",
- "tests.test_helpers",
- "tests.test_main",
"tests.test_parsing",
"tests.date.test_add",
"tests.date.test_behavior",
@@ -179,5 +239,5 @@ omit = [
]
[build-system]
-requires = ["poetry-core>=1.1.0a6", "meson", "ninja"]
-build-backend = "poetry.core.masonry.api"
+requires = ["maturin>=1.0,<2.0"]
+build-backend = "maturin"