diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5779c3d..2d4336c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,63 +1,26 @@ # Read the Docs configuration file for Sphinx projects - # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - # Required - version: 2 - # Set the OS, Python version and other tools you might need - build: - - os: ubuntu-22.04 - + os: ubuntu-24.04 tools: + python: "3.13" - python: "3.12" - - # You can also specify other tool versions: - - # nodejs: "20" - - # rust: "1.70" - - # golang: "1.20" # Build documentation in the "docs/" directory with Sphinx - sphinx: - configuration: docs/conf.py - - # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs - - # builder: "dirhtml" - - # Fail on all warnings to avoid broken references - - # fail_on_warning: true - - -# Optionally build your docs in additional formats such as PDF and ePub - -# formats: - -# - pdf - -# - epub - - -# Optional but recommended, declare the Python requirements required - -# to build your documentation + fail_on_warning: true # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: - install: - - - requirements: requirements.txt \ No newline at end of file + - requirements: requirements.txt + # Install our python package before building the docs + - method: pip + path: . diff --git a/deprecat/example.py b/deprecat/example.py index 6995bfa..1cb42ec 100644 --- a/deprecat/example.py +++ b/deprecat/example.py @@ -1,6 +1,6 @@ """ Examples -============================ +======== This module contains examples for the deprecat package. """ diff --git a/deprecat/sphinx.py b/deprecat/sphinx.py index 009e0fc..9262c82 100644 --- a/deprecat/sphinx.py +++ b/deprecat/sphinx.py @@ -38,7 +38,6 @@ _class_stacklevel = 3 class SphinxAdapter(ClassicAdapter): - """ Construct a wrapper adapter. @@ -345,32 +344,33 @@ def deprecat(reason="", directive="deprecated", version="", remove_version="", l reason: str Reason for deprecation of this method or class. + directive: str + Sphinx directive to use, defaults to "deprecated". + version: str Version of your project which deprecates this method or class. remove_version: str Version of your project which removes this method or class. - action: str - A warning filter used to specify the deprecation warning. - Can be one of "error", "ignore", "always", "default", "module", or "once". - If ``None`` or empty, the the global filtering mechanism is used. - - : str - String of kwargs to be deprecated, e.g. "x y" to deprecate `x` and `y`. + line_length: numeric + Max line length of the directive text. If non null, a long text is wrapped in several lines. category: class The warning category to use for the deprecation warning. By default, the category class is :class:`~DeprecationWarning`, you can inherit this class to define your own deprecation warning category. - line_length: numeric - Max line length of the directive text. If non null, a long text is wrapped in several lines. - deprecated_args: dict Dictionary in the following format to deprecate `x` and `y` deprecated_args = {'x': {'reason': 'some reason','version': '1.0'},'y': {'reason': 'another reason', 'version': '2.0'}} + action: str + A warning filter used to specify the deprecation warning. + Can be one of "error", "ignore", "always", "default", "module", or "once". + If ``None`` or empty, the the global filtering mechanism is used. + + Returns ------- Decorator used to deprecate a function, method, class or kwarg. diff --git a/docs/conf.py b/docs/conf.py index 48bff49..c3f2851 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = 'deprecat' -copyright = '2021, Meenal Jhajharia' +copyright = '2021-, Meenal Jhajharia' author = 'Meenal Jhajharia' # The full version, including alpha/beta/rc tags @@ -34,14 +34,14 @@ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'numpydoc'] + 'sphinx.ext.napoleon', +] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -numpydoc_show_class_members = False autodoc_default_options = { 'members': True, @@ -63,4 +63,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] diff --git a/requirements.txt b/requirements.txt index d01b251..2ee8817 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,44 +1,110 @@ -alabaster==0.7.12 -numpydoc==1.1.0 -furo==2021.10.9 -Babel==2.9.1 -bleach==4.1.0 -build==0.7.0 -certifi==2021.10.8 -charset-normalizer==2.0.7 -colorama==0.4.4 -deprecat==1.1.0 -docutils==0.17.1 -idna==3.3 -imagesize==1.2.0 -importlib-metadata==4.8.1 -Jinja2==3.0.2 -keyring==23.2.1 -MarkupSafe==2.0.1 -packaging==21.2 -pep517==0.12.0 -pkginfo==1.7.1 -Pygments==2.10.0 -pyparsing==2.4.7 -pytz==2021.3 -readme-renderer==30.0 -requests==2.26.0 -requests-toolbelt==0.9.1 -rfc3986==1.5.0 -six==1.16.0 -snowballstemmer==2.1.0 -Sphinx==4.2.0 -sphinx-rtd-theme==1.0.0 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 +# This file was autogenerated by uv via the following command: +# uv pip compile --all-extras setup.py +accessible-pygments==0.0.5 + # via furo +alabaster==1.0.0 + # via sphinx +babel==2.17.0 + # via sphinx +beautifulsoup4==4.13.5 + # via furo +bump2version==0.5.11 + # via deprecat (setup.py) +cachetools==6.2.0 + # via tox +certifi==2025.8.3 + # via requests +chardet==5.2.0 + # via tox +charset-normalizer==3.4.3 + # via requests +colorama==0.4.6 + # via tox +coverage==7.10.7 + # via pytest-cov +distlib==0.4.0 + # via virtualenv +docutils==0.21.2 + # via sphinx +filelock==3.19.1 + # via + # tox + # virtualenv +furo==2025.9.25 + # via deprecat (setup.py) +idna==3.10 + # via requests +imagesize==1.4.1 + # via sphinx +iniconfig==2.1.0 + # via pytest +jinja2==3.1.6 + # via sphinx +markupsafe==3.0.2 + # via jinja2 +packaging==25.0 + # via + # pyproject-api + # pytest + # sphinx + # tox +platformdirs==4.4.0 + # via + # tox + # virtualenv +pluggy==1.6.0 + # via + # pytest + # pytest-cov + # tox +pygments==2.19.2 + # via + # accessible-pygments + # furo + # pytest + # sphinx +pyproject-api==1.9.1 + # via tox +pytest==8.4.2 + # via + # deprecat (setup.py) + # pytest-cov +pytest-cov==7.0.0 + # via deprecat (setup.py) +requests==2.32.5 + # via sphinx +roman-numerals-py==3.1.0 + # via sphinx +snowballstemmer==3.0.1 + # via sphinx +soupsieve==2.8 + # via beautifulsoup4 +sphinx==8.2.3 + # via + # deprecat (setup.py) + # furo + # sphinx-basic-ng +sphinx-basic-ng==1.0.0b2 + # via furo +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -tomli==1.2.2 -tqdm==4.62.3 -twine==1.13.0 -urllib3==1.26.7 -webencodings==0.5.1 -wrapt==1.13.3 -zipp==3.6.0 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +tox==4.30.2 + # via deprecat (setup.py) +typing-extensions==4.15.0 + # via beautifulsoup4 +urllib3==2.5.0 + # via requests +virtualenv==20.34.0 + # via tox +wrapt==1.17.3 + # via deprecat (setup.py) diff --git a/setup.py b/setup.py index ba2a621..a63a631 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,8 @@ 'PyTest-Cov ; python_version >= "3.6"', 'PyTest-Cov < 2.6 ; python_version < "3.6"', 'bump2version < 1', - 'sphinx < 2', + 'sphinx', + 'furo', ] }, python_requires='>=3.6',