[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.0b1" description = "Python datetimes made easy" authors = ["Sébastien Eustace "] license = "MIT" readme = 'README.rst' homepage = "https://pendulum.eustace.io" repository = "https://github.com/sdispater/pendulum" documentation = "https://pendulum.eustace.io/docs" keywords = ['datetime', 'date', 'time'] [tool.poetry.dependencies] 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.9" } [tool.poetry.group.test.dependencies] pytest = "^7.1.2" pytz = ">=2022.1" time-machine = ">=2.6.0" pytest-benchmark = "^4.0.0" [tool.poetry.group.doc.dependencies] mkdocs = "^1.0" pymdown-extensions = ">=6,<11" pygments = "^2.2" markdown-include = "^0.8.1" [tool.poetry.group.lint.dependencies] 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 = { version = "^2.0.1", python = ">=3.8,<4.0" } tox = "^4.0.0" [tool.poetry.group.benchmark.dependencies] pytest-codspeed = "^1.2.2" [tool.poetry.group.build.dependencies] 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 ] 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 = "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 # their respective type errors have been addressed. No new modules # should be added to this whitelist. [[tool.mypy.overrides]] module = [ "pendulum.mixins.default", "tests.test_parsing", "tests.date.test_add", "tests.date.test_behavior", "tests.date.test_construct", "tests.date.test_comparison", "tests.date.test_day_of_week_modifiers", "tests.date.test_diff", "tests.date.test_fluent_setters", "tests.date.test_getters", "tests.date.test_start_end_of", "tests.date.test_strings", "tests.date.test_sub", "tests.datetime.test_add", "tests.datetime.test_behavior", "tests.datetime.test_construct", "tests.datetime.test_comparison", "tests.datetime.test_create_from_timestamp", "tests.datetime.test_day_of_week_modifiers", "tests.datetime.test_diff", "tests.datetime.test_fluent_setters", "tests.datetime.test_from_format", "tests.datetime.test_getters", "tests.datetime.test_naive", "tests.datetime.test_replace", "tests.datetime.test_start_end_of", "tests.datetime.test_strings", "tests.datetime.test_sub", "tests.datetime.test_timezone", "tests.duration.test_add_sub", "tests.duration.test_arithmetic", "tests.duration.test_behavior", "tests.duration.test_construct", "tests.duration.test_in_methods", "tests.duration.test_in_words", "tests.duration.test_total_methods", "tests.formatting.test_formatter", "tests.helpers.test_local_time", "tests.localization.*", "tests.parsing.test_parsing", "tests.parsing.test_parsing_duration", "tests.parsing.test_parse_iso8601", "tests.interval.test_add_subtract", "tests.interval.test_arithmetic", "tests.interval.test_behavior", "tests.interval.test_construct", "tests.interval.test_hashing", "tests.interval.test_in_words", "tests.interval.test_range", "tests.time.test_add", "tests.time.test_behavior", "tests.time.test_comparison", "tests.time.test_construct", "tests.time.test_diff", "tests.time.test_fluent_setters", "tests.time.test_strings", "tests.time.test_sub", "tests.tz.test_helpers", "tests.tz.test_local_timezone", "tests.tz.test_timezone", "tests.tz.test_timezones", ] ignore_errors = true [tool.coverage.run] omit = [ "pendulum/locales/*", "pendulum/__version__.py,", "pendulum/_extensions/*", "pendulum/parsing/iso8601.py", "pendulum/utils/_compat.py", ] [build-system] requires = ["maturin>=1.0,<2.0"] build-backend = "maturin"