passagemath-docbuild 10.5.43__tar.gz → 10.6.1rc2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {passagemath_docbuild-10.5.43/passagemath_docbuild.egg-info → passagemath_docbuild-10.6.1rc2}/PKG-INFO +3 -4
  2. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/README.rst +1 -1
  3. passagemath_docbuild-10.6.1rc2/VERSION.txt +1 -0
  4. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2/passagemath_docbuild.egg-info}/PKG-INFO +3 -4
  5. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/pyproject.toml +1 -2
  6. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/conf.py +18 -16
  7. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/ext/sage_autodoc.py +14 -71
  8. passagemath_docbuild-10.5.43/VERSION.txt +0 -1
  9. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/MANIFEST.in +0 -0
  10. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/passagemath_docbuild.egg-info/SOURCES.txt +0 -0
  11. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/passagemath_docbuild.egg-info/dependency_links.txt +0 -0
  12. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/passagemath_docbuild.egg-info/requires.txt +0 -0
  13. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/passagemath_docbuild.egg-info/top_level.txt +0 -0
  14. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/pyproject.toml.m4 +0 -0
  15. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/requirements.txt +0 -0
  16. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/__init__.py +0 -0
  17. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/__main__.py +0 -0
  18. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/build_options.py +0 -0
  19. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/builders.py +0 -0
  20. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/ext/__init__.py +0 -0
  21. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/ext/inventory_builder.py +0 -0
  22. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/ext/multidocs.py +0 -0
  23. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/sphinxbuild.py +0 -0
  24. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/utils.py +0 -0
  25. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/sage_docbuild/vendor.py +0 -0
  26. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/setup.cfg +0 -0
  27. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/setup.py +0 -0
  28. {passagemath_docbuild-10.5.43 → passagemath_docbuild-10.6.1rc2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-docbuild
3
- Version: 10.5.43
3
+ Version: 10.6.1rc2
4
4
  Summary: passagemath: Build system of the Sage documentation
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
@@ -19,14 +19,13 @@ Classifier: Intended Audience :: Science/Research
19
19
  Classifier: Operating System :: POSIX
20
20
  Classifier: Operating System :: MacOS :: MacOS X
21
21
  Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
27
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
27
  Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Requires-Python: <3.14,>=3.9
28
+ Requires-Python: <3.14,>=3.10
30
29
  Description-Content-Type: text/x-rst
31
30
  Requires-Dist: sphinx<9,>=5.2
32
31
 
@@ -71,7 +70,7 @@ passagemath attempts to support all major Linux distributions and recent version
71
70
  macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
72
71
  virtualization.
73
72
 
74
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
73
+ Complete sets of binary wheels are provided on PyPI for Python versions 3.10.x-3.13.x.
75
74
  Python 3.13.x is also supported, but some third-party packages are still missing wheels,
76
75
  so compilation from source is triggered for those.
77
76
 
@@ -39,7 +39,7 @@ passagemath attempts to support all major Linux distributions and recent version
39
39
  macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
40
40
  virtualization.
41
41
 
42
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
42
+ Complete sets of binary wheels are provided on PyPI for Python versions 3.10.x-3.13.x.
43
43
  Python 3.13.x is also supported, but some third-party packages are still missing wheels,
44
44
  so compilation from source is triggered for those.
45
45
 
@@ -0,0 +1 @@
1
+ 10.6.1.rc2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-docbuild
3
- Version: 10.5.43
3
+ Version: 10.6.1rc2
4
4
  Summary: passagemath: Build system of the Sage documentation
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
@@ -19,14 +19,13 @@ Classifier: Intended Audience :: Science/Research
19
19
  Classifier: Operating System :: POSIX
20
20
  Classifier: Operating System :: MacOS :: MacOS X
21
21
  Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
27
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
27
  Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Requires-Python: <3.14,>=3.9
28
+ Requires-Python: <3.14,>=3.10
30
29
  Description-Content-Type: text/x-rst
31
30
  Requires-Dist: sphinx<9,>=5.2
32
31
 
@@ -71,7 +70,7 @@ passagemath attempts to support all major Linux distributions and recent version
71
70
  macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
72
71
  virtualization.
73
72
 
74
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
73
+ Complete sets of binary wheels are provided on PyPI for Python versions 3.10.x-3.13.x.
75
74
  Python 3.13.x is also supported, but some third-party packages are still missing wheels,
76
75
  so compilation from source is triggered for those.
77
76
 
@@ -26,7 +26,6 @@ classifiers = [
26
26
  "Operating System :: POSIX",
27
27
  "Operating System :: MacOS :: MacOS X",
28
28
  "Programming Language :: Python :: 3 :: Only",
29
- "Programming Language :: Python :: 3.9",
30
29
  "Programming Language :: Python :: 3.10",
31
30
  "Programming Language :: Python :: 3.11",
32
31
  "Programming Language :: Python :: 3.12",
@@ -34,7 +33,7 @@ classifiers = [
34
33
  "Programming Language :: Python :: Implementation :: CPython",
35
34
  "Topic :: Scientific/Engineering :: Mathematics",
36
35
  ]
37
- requires-python = ">=3.9, <3.14"
36
+ requires-python = ">=3.10, <3.14"
38
37
 
39
38
  [project.urls]
40
39
  "release notes" = "https://github.com/passagemath/passagemath/releases"
@@ -15,26 +15,25 @@ behavior.
15
15
  # https://www.gnu.org/licenses/
16
16
  # ****************************************************************************
17
17
 
18
- # Load configuration shared with sage.misc.sphinxify
19
- from sage.misc.sagedoc_conf import *
20
-
21
- import sys
18
+ import importlib
22
19
  import os
23
20
  import re
24
- import importlib
21
+ import sys
22
+
25
23
  import dateutil.parser
26
- import sphinx
27
- import sphinx.ext.intersphinx as intersphinx
24
+ from IPython.lib.lexers import IPyLexer, IPythonConsoleLexer
28
25
  from sphinx import highlighting
26
+ from sphinx.ext import intersphinx
29
27
  from sphinx.transforms import SphinxTransform
30
28
  from sphinx.util.docutils import SphinxDirective
31
- from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer
32
- from sage.misc.sagedoc import extlinks
33
- from sage.env import SAGE_DOC_SRC, SAGE_DOC, PPLPY_DOCS, MATHJAX_DIR
34
- from sage.misc.latex_macros import sage_mathjax_macros
35
- from sage.features.sphinx import JupyterSphinx
36
- from sage.features.all import all_features
29
+
37
30
  import sage.version
31
+ from sage.env import MATHJAX_DIR, PPLPY_DOCS, SAGE_DOC, SAGE_DOC_SRC
32
+ from sage.features.all import all_features
33
+ from sage.features.sphinx import JupyterSphinx
34
+ from sage.misc.latex_macros import sage_mathjax_macros
35
+ from sage.misc.sagedoc import extlinks as extlinks # noqa: PLC0414
36
+ from sage.misc.sagedoc_conf import * # Load configuration shared with sage.misc.sphinxify
38
37
 
39
38
  # ---------------------
40
39
  # General configuration
@@ -377,8 +376,8 @@ copybutton_only_copy_prompt_lines = True
377
376
 
378
377
  # https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
379
378
  def linkcode_resolve(domain, info):
380
- import inspect
381
379
  from urllib.parse import quote
380
+
382
381
  from sage.misc.sageinspect import sage_getsourcelines
383
382
  if domain != 'py':
384
383
  return None
@@ -968,7 +967,10 @@ class SagecodeTransform(SphinxTransform):
968
967
  if self.app.builder.tags.has('html') or self.app.builder.tags.has('inventory'):
969
968
  for node in list(self.document.findall(nodes.literal_block)):
970
969
  if node.get('language') is None and node.astext().startswith('sage:'):
971
- from docutils.nodes import container as Container, label as Label, literal_block as LiteralBlock, Text
970
+ from docutils.nodes import Text
971
+ from docutils.nodes import container as Container
972
+ from docutils.nodes import label as Label
973
+ from docutils.nodes import literal_block as LiteralBlock
972
974
  from sphinx_inline_tabs._impl import TabContainer
973
975
  parent = node.parent
974
976
  index = parent.index(node)
@@ -1028,7 +1030,7 @@ class SagecodeTransform(SphinxTransform):
1028
1030
  prev_node['classes'].append('with-python-tab')
1029
1031
  if SAGE_LIVE_DOC == 'yes':
1030
1032
  # Tab for Jupyter-sphinx cell
1031
- from jupyter_sphinx.ast import JupyterCellNode, CellInputNode
1033
+ from jupyter_sphinx.ast import CellInputNode, JupyterCellNode
1032
1034
  source = node.rawsource
1033
1035
  lines = []
1034
1036
  for line in source.splitlines():
@@ -37,13 +37,14 @@ AUTHORS:
37
37
  - François Bissey (2024-09-10): Tweaks to support python 3.9 (and older sphinx) as well
38
38
 
39
39
  - François Bissey (2024-11-12): rebased on Sphinx 8.1.3 (while trying to keep python 3.9 compatibility)
40
+
41
+ - François Bissey (2025-02-24): Remove python 3.9 support hacks, making us closer to upstream
40
42
  """
41
43
 
42
44
  from __future__ import annotations
43
45
 
44
46
  import functools
45
47
  import operator
46
- import sys
47
48
  import re
48
49
  from inspect import Parameter, Signature
49
50
  from typing import TYPE_CHECKING, Any, NewType, TypeVar
@@ -709,7 +710,7 @@ class Documenter:
709
710
 
710
711
  # add additional content (e.g. from document), if present
711
712
  if more_content:
712
- for line, src in zip(more_content.data, more_content.items):
713
+ for line, src in zip(more_content.data, more_content.items, strict=True):
713
714
  self.add_line(line, src[0], src[1])
714
715
 
715
716
  def get_object_members(self, want_all: bool) -> tuple[bool, list[ObjectMember]]:
@@ -1080,7 +1081,7 @@ class ModuleDocumenter(Documenter):
1080
1081
  super().add_content(None)
1081
1082
  self.indent = old_indent
1082
1083
  if more_content:
1083
- for line, src in zip(more_content.data, more_content.items):
1084
+ for line, src in zip(more_content.data, more_content.items, strict=True):
1084
1085
  self.add_line(line, src[0], src[1])
1085
1086
 
1086
1087
  @classmethod
@@ -1616,14 +1617,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
1616
1617
  def can_document_member(
1617
1618
  cls: type[Documenter], member: Any, membername: str, isattr: bool, parent: Any,
1618
1619
  ) -> bool:
1619
- # support both sphinx 8 and py3.9/older sphinx
1620
- try:
1621
- result_bool = isinstance(member, type) or (
1622
- isattr and isinstance(member, NewType | TypeVar))
1623
- except Exception:
1624
- result_bool = isinstance(member, type) or (
1625
- isattr and (inspect.isNewType(member) or isinstance(member, TypeVar)))
1626
- return result_bool
1620
+ return isinstance(member, type) or (
1621
+ isattr and isinstance(member, NewType | TypeVar))
1627
1622
 
1628
1623
  def import_object(self, raiseerror: bool = False) -> bool:
1629
1624
  ret = super().import_object(raiseerror)
@@ -1696,12 +1691,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
1696
1691
  # -------------------------------------------------------------------
1697
1692
  else:
1698
1693
  self.doc_as_attr = True
1699
- # support both sphinx 8 and py3.9/older sphinx
1700
- try:
1701
- test_bool = isinstance(self.object, NewType | TypeVar)
1702
- except Exception:
1703
- test_bool = inspect.isNewType(self.object) or isinstance(self.object, TypeVar)
1704
- if test_bool:
1694
+ if isinstance(self.object, NewType | TypeVar):
1705
1695
  modname = getattr(self.object, '__module__', self.modname)
1706
1696
  if modname != self.modname and self.modname.startswith(modname):
1707
1697
  bases = self.modname[len(modname):].strip('.').split('.')
@@ -1710,12 +1700,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
1710
1700
  return ret
1711
1701
 
1712
1702
  def _get_signature(self) -> tuple[Any | None, str | None, Signature | None]:
1713
- # support both sphinx 8 and py3.9/older sphinx
1714
- try:
1715
- test_bool = isinstance(self.object, NewType | TypeVar)
1716
- except Exception:
1717
- test_bool = inspect.isNewType(self.object) or isinstance(self.object, TypeVar)
1718
- if test_bool:
1703
+ if isinstance(self.object, NewType | TypeVar):
1719
1704
  # Suppress signature
1720
1705
  return None, None, None
1721
1706
 
@@ -1900,24 +1885,14 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
1900
1885
  self.directivetype = 'attribute'
1901
1886
  super().add_directive_header(sig)
1902
1887
 
1903
- # support both sphinx 8 and py3.9/older sphinx
1904
- try:
1905
- test_bool = isinstance(self.object, NewType | TypeVar)
1906
- except Exception:
1907
- test_bool = inspect.isNewType(self.object) or isinstance(self.object, TypeVar)
1908
- if test_bool:
1888
+ if isinstance(self.object, NewType | TypeVar):
1909
1889
  return
1910
1890
 
1911
1891
  if self.analyzer and '.'.join(self.objpath) in self.analyzer.finals:
1912
1892
  self.add_line(' :final:', sourcename)
1913
1893
 
1914
1894
  canonical_fullname = self.get_canonical_fullname()
1915
- # support both sphinx 8 and py3.9/older sphinx
1916
- try:
1917
- newtype_test = isinstance(self.object, NewType)
1918
- except Exception:
1919
- newtype_test = inspect.isNewType(self.object)
1920
- if (not self.doc_as_attr and not newtype_test
1895
+ if (not self.doc_as_attr and not isinstance(self.object, NewType)
1921
1896
  and canonical_fullname and self.fullname != canonical_fullname):
1922
1897
  self.add_line(' :canonical: %s' % canonical_fullname, sourcename)
1923
1898
 
@@ -1969,28 +1944,6 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
1969
1944
  if isinstance(self.object, TypeVar):
1970
1945
  if self.object.__doc__ == TypeVar.__doc__:
1971
1946
  return []
1972
- # ------------------------------------------------------------------
1973
- # This section is kept for compatibility with python 3.9
1974
- # see https://github.com/sagemath/sage/pull/38549#issuecomment-2327790930
1975
- if sys.version_info[:2] < (3, 10):
1976
- if inspect.isNewType(self.object) or isinstance(self.object, TypeVar):
1977
- parts = self.modname.strip('.').split('.')
1978
- orig_objpath = self.objpath
1979
- for i in range(len(parts)):
1980
- new_modname = '.'.join(parts[:len(parts) - i])
1981
- new_objpath = parts[len(parts) - i:] + orig_objpath
1982
- try:
1983
- analyzer = ModuleAnalyzer.for_module(new_modname)
1984
- analyzer.analyze()
1985
- key = ('', new_objpath[-1])
1986
- comment = list(analyzer.attr_docs.get(key, []))
1987
- if comment:
1988
- self.objpath = new_objpath
1989
- self.modname = new_modname
1990
- return [comment]
1991
- except PycodeError:
1992
- pass
1993
- # ------------------------------------------------------------------
1994
1947
  if self.doc_as_attr:
1995
1948
  # Don't show the docstring of the class when it is an alias.
1996
1949
  if self.get_variable_comment():
@@ -2054,12 +2007,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
2054
2007
  return None
2055
2008
 
2056
2009
  def add_content(self, more_content: StringList | None) -> None:
2057
- # support both sphinx 8 and py3.9/older sphinx
2058
- try:
2059
- newtype_test = isinstance(self.object, NewType)
2060
- except Exception:
2061
- newtype_test = inspect.isNewType(self.object)
2062
- if newtype_test:
2010
+ if isinstance(self.object, NewType):
2063
2011
  if self.config.autodoc_typehints_format == "short":
2064
2012
  supertype = restify(self.object.__supertype__, "smart")
2065
2013
  else:
@@ -3028,14 +2976,9 @@ class PropertyDocumenter(DocstringStripSignatureMixin, # type: ignore[misc]
3028
2976
 
3029
2977
  def autodoc_attrgetter(app: Sphinx, obj: Any, name: str, *defargs: Any) -> Any:
3030
2978
  """Alternative getattr() for types"""
3031
- try:
3032
- for typ, func in app.registry.autodoc_attrgetters.items():
3033
- if isinstance(obj, typ):
3034
- return func(obj, name, *defargs)
3035
- except AttributeError:
3036
- for typ, func in app.registry.autodoc_attrgettrs.items():
3037
- if isinstance(obj, typ):
3038
- return func(obj, name, *defargs)
2979
+ for typ, func in app.registry.autodoc_attrgetters.items():
2980
+ if isinstance(obj, typ):
2981
+ return func(obj, name, *defargs)
3039
2982
 
3040
2983
  return safe_getattr(obj, name, *defargs)
3041
2984
 
@@ -1 +0,0 @@
1
- 10.5.43