Skip to content

Commit

Permalink
gh-37796: Revert PR with disputed dependencies
Browse files Browse the repository at this point in the history
    
#36964 was inappropriately merged, since two dependencies were still
disputed.  This PR attempts to revert the merge.  It was created by

```
git revert -m 1 6ecb1d8
```

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

None, though it will also revert #36676 and #36951.
    
URL: #37796
Reported by: roed314
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Apr 24, 2024
2 parents 15fcf52 + f16eb4b commit 54cd43c
Show file tree
Hide file tree
Showing 3,547 changed files with 2,061 additions and 5,665 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ save () {
src/environment-optional-3.[89].yml src/environment-optional-3.1[0-9].yml \
src/Pipfile \
src/pyproject.toml \
src/requirements.txt
src/requirements.txt \
src/setup.cfg

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt
Expand Down
2 changes: 1 addition & 1 deletion build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ $ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-
$ADD config/config.rpath config/config.rpath
$ADD src/doc/bootstrap src/doc/bootstrap
$ADD src/bin src/bin
$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/VERSION.txt src/
$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt src/
$ADD m4 ./m4
$ADD pkgs pkgs
$ADD build ./build
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/typing_extensions/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# According to https://github.com/python/typing_extensions/blob/main/CHANGELOG.md,
# version 4.4.0 adds another Python 3.11 typing backport
typing_extensions >= 4.4.0; python_version<"3.11"
typing_extensions >= 4.4.0; python_version<'3.11'
24 changes: 15 additions & 9 deletions pkgs/sagemath-categories/known-test-failures.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"ntests": 28
},
"sage.categories.affine_weyl_groups": {
"ntests": 15
"ntests": 14
},
"sage.categories.algebra_ideals": {
"failed": true,
Expand Down Expand Up @@ -148,7 +148,7 @@
},
"sage.categories.coxeter_groups": {
"failed": true,
"ntests": 363
"ntests": 362
},
"sage.categories.cw_complexes": {
"failed": true,
Expand Down Expand Up @@ -301,7 +301,7 @@
},
"sage.categories.finite_complex_reflection_groups": {
"failed": true,
"ntests": 199
"ntests": 178
},
"sage.categories.finite_coxeter_groups": {
"ntests": 6
Expand Down Expand Up @@ -493,6 +493,10 @@
"failed": true,
"ntests": 13
},
"sage.categories.inner_product_spaces": {
"failed": true,
"ntests": 9
},
"sage.categories.integral_domains": {
"failed": true,
"ntests": 22
Expand Down Expand Up @@ -779,7 +783,7 @@
},
"sage.cpython.debug": {
"failed": true,
"ntests": 13
"ntests": 14
},
"sage.cpython.dict_del_by_value": {
"failed": true,
Expand Down Expand Up @@ -822,6 +826,7 @@
"ntests": 321
},
"sage.doctest.reporting": {
"failed": true,
"ntests": 124
},
"sage.doctest.sources": {
Expand Down Expand Up @@ -1086,7 +1091,7 @@
},
"sage.misc.sageinspect": {
"failed": true,
"ntests": 332
"ntests": 329
},
"sage.misc.superseded": {
"failed": true,
Expand Down Expand Up @@ -1119,7 +1124,6 @@
"ntests": 128
},
"sage.repl.configuration": {
"failed": true,
"ntests": 22
},
"sage.repl.display.fancy_repr": {
Expand All @@ -1145,7 +1149,6 @@
"ntests": 42
},
"sage.repl.inputhook": {
"failed": true,
"ntests": 7
},
"sage.repl.interface_magic": {
Expand All @@ -1154,7 +1157,7 @@
},
"sage.repl.interpreter": {
"failed": true,
"ntests": 114
"ntests": 118
},
"sage.repl.ipython_extension": {
"failed": true,
Expand Down Expand Up @@ -1185,7 +1188,7 @@
},
"sage.repl.load": {
"failed": true,
"ntests": 38
"ntests": 42
},
"sage.repl.preparse": {
"failed": true,
Expand Down Expand Up @@ -1312,6 +1315,9 @@
"sage.structure.global_options": {
"ntests": 145
},
"sage.structure.graphics_file": {
"ntests": 8
},
"sage.structure.indexed_generators": {
"failed": true,
"ntests": 90
Expand Down
1 change: 1 addition & 0 deletions pkgs/sagemath-standard/setup.cfg
1 change: 1 addition & 0 deletions pkgs/sagemath-standard/setup.cfg.m4
73 changes: 19 additions & 54 deletions pkgs/sagemath-standard/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,60 +69,25 @@
from sage_setup.autogen import autogen_all
autogen_all()

# TODO: This should be quiet by default
print("Discovering Python/Cython source code....")
t = time.time()
from sage.misc.package import is_package_installed_and_updated

distributions = [
'',
"sagemath-brial",
"sagemath-categories",
"sagemath-combinat",
"sagemath-eclib",
"sagemath-environment",
"sagemath-flint",
"sagemath-gap",
"sagemath-giac",
"sagemath-glpk",
"sagemath-graphs",
"sagemath-groups",
"sagemath-homfly",
"sagemath-lcalc",
"sagemath-libbraiding",
"sagemath-libecm",
"sagemath-linbox",
"sagemath-modules",
"sagemath-mpmath",
"sagemath-ntl",
"sagemath-objects",
"sagemath-pari",
"sagemath-plot",
"sagemath-polyhedra",
"sagemath-repl",
"sagemath-schemes",
"sagemath-singular",
"sagemath-symbolics",
]

optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',')
distributions += ['sagemath-{}'.format(pkg)
for pkg in optional_packages_with_extensions
if is_package_installed_and_updated(pkg)]
log.warn('distributions = {0}'.format(distributions))
from sage_setup.find import find_python_sources
python_packages, python_modules, cython_modules = find_python_sources(
SAGE_SRC, ['sage'], distributions=distributions)

log.debug('python_packages = {0}'.format(python_packages))
log.debug('python_modules = {0}'.format(python_modules))
log.debug('cython_modules = {0}'.format(cython_modules))

print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t))
else:
# sdist, egg_info, dist_info
python_packages = []
cython_modules = []
# TODO: This should be quiet by default
print("Discovering Python/Cython source code....")
t = time.time()
from sage.misc.package import is_package_installed_and_updated
distributions = ['']
optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',')
distributions += ['sagemath-{}'.format(pkg)
for pkg in optional_packages_with_extensions
if is_package_installed_and_updated(pkg)]
log.warn('distributions = {0}'.format(distributions))
from sage_setup.find import find_python_sources
python_packages, python_modules, cython_modules = find_python_sources(
SAGE_SRC, ['sage'], distributions=distributions)

log.debug('python_packages = {0}'.format(python_packages))
log.debug('python_modules = {0}'.format(python_modules))
log.debug('cython_modules = {0}'.format(cython_modules))

print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t))

#########################################################
### Distutils
Expand Down
4 changes: 2 additions & 2 deletions pkgs/sagemath-standard/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[tox]
envlist =
# Build and test without using the concrete dependencies specified by requirements.txt,
# using the dependencies declared in pyproject.toml (build-system requires, dependencies) only:
# using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only:
# Still use ONLY the wheels built and stored by the Sage distribution (no PyPI).
#
# ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi-norequirements)'
Expand Down Expand Up @@ -45,7 +45,7 @@ envlist =
#
# ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-pipenv-dist)'
#
# Build using the dependencies declared in pyproject.toml (build-system requires, dependencies) only:
# Build using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only.
# Use the wheels built and stored by the Sage distribution,
# and additionally allow packages from PyPI.
#
Expand Down
8 changes: 4 additions & 4 deletions src/Pipfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
## We do not list packages that are already declared as dependencies (install_requires)
## in pyproject.toml
## We do not list packages that are already declared as install_requires
## in setup.cfg
pycodestyle = "*"
tox = "*"
pytest = "*"
rope = "*"
six = "*"

[packages]
## We do not list packages that are already declared as dependencies (install_requires)
## in pyproject.toml
## We do not list packages that are already declared as install_requires
## in setup.cfg

[packages.e1839a8]
path = "."
4 changes: 2 additions & 2 deletions src/doc/en/developer/coding_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ included in one of the following places:
This practice is deprecated, see :issue:`33037`.

In all cases, the files must be listed (explicitly or via wildcards) in
the section ``[tool.setuptools.package-data]`` of the file
:sage_root:`SAGE_ROOT/pkgs/sagemath-standard/pyproject.toml.m4` (or the corresponding
the section ``options.package_data`` of the file
:sage_root:`pkgs/sagemath-standard/setup.cfg.m4` (or the corresponding
file of another distribution).

Large data files should not be added to the Sage source tree. Instead, it
Expand Down
5 changes: 2 additions & 3 deletions src/doc/en/developer/coding_in_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Python language standard

Sage library code needs to be compatible with all versions of Python
that Sage supports. The information regarding the supported versions
can be found in the files ``build/pkgs/python3/spkg-configure.m4``
(for the Sage distribution), ``m4/pyproject_toml_metadata.m4`` (for
the Sage library and most other distribution packages in ``pkgs/``).
can be found in the files ``build/pkgs/python3/spkg-configure.m4`` and
``src/setup.cfg.m4``.

Python 3.9 is the oldest supported version. Hence,
all language and library features that are available in Python 3.9 can
Expand Down
25 changes: 11 additions & 14 deletions src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ The source directory of a distribution package, such as

$ ./sage --fixdistributions --set all --from-egg-info

- `pyproject.toml <https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/>`_
- `pyproject.toml <https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/>`_,
`setup.cfg <https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_,
and `requirements.txt <https://pip.pypa.io/en/stable/user_guide/#requirements-files>`_ --
standard Python packaging metadata, declaring the distribution name, dependencies,
etc.
Expand Down Expand Up @@ -287,9 +288,8 @@ modules must be part of the distribution, or provided by another
distribution -- which then must be declared as a run-time dependency.

*Declaring run-time dependencies:* These dependencies are declared in
``pyproject.toml`` (generated from ``pyproject.toml.m4``) as
`[project] dependencies <https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency>`_ (in the older terminology of ``setup.cfg`` and ``setup.py``,
these dependencies were known as ``install_requires``).
``setup.cfg`` (generated from ``setup.cfg.m4``) as
`install_requires <https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency>`_.

*Reducing module-level run-time dependencies:*

Expand Down Expand Up @@ -467,17 +467,14 @@ features, which will only be working if the user also has installed
**sagemath-symbolics**.

*Declaring optional run-time dependencies:* It is possible to declare
such dependencies as `[project.optional-dependencies] <https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies>`_ in ``pyproject.toml``
(generated from ``pyproject.toml.m4``).
(In the older terminology of ``setup.cfg`` and ``setup.py``,
these optional dependencies were known as ``extras_require``.)
This is a very limited mechanism
such optional dependencies as `extras_require <https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies>`_ in ``setup.cfg``
(generated from ``setup.cfg.m4``). This is a very limited mechanism
-- in particular it does not affect the build phase of the
distribution in any way. It basically only provides a way to give a
nickname to a distribution that can be installed as an add-on.

In our example, we could declare an optional dependency so that users
could use ``pip install "sagemath-coding[symbolics]"``.
In our example, we could declare an ``extras_require`` so that users
could use ``pip install sagemath-coding[symbolics]``.


Doctest-only dependencies
Expand Down Expand Up @@ -519,7 +516,7 @@ The version information for dependencies comes from the files
``build/pkgs/*/package-version.txt``. We use the
`m4 <https://www.gnu.org/software/m4/manual/html_node/index.html>`_
macro processor to insert the version information in the generated files
``pyproject.toml`` and ``requirements.txt``.
``pyproject.toml``, ``setup.cfg``, ``requirements.txt``.


Hierarchy of distribution packages
Expand Down Expand Up @@ -549,8 +546,8 @@ Hierarchy of distribution packages
sphinx_plot(g, figsize=(8, 4), axes=False)

Solid arrows indicate declared runtime dependencies (``install_requires``).
Dashed arrows indicate declared optional runtime dependencies (``extras_require``).
Solid arrows indicate ``install_requires``, i.e., a declared runtime dependency.
Dashed arrows indicate ``extras_require``, i.e., a declared optional runtime dependency.
Not shown in the diagram are build dependencies and optional dependencies for testing.

- `sage_conf <https://pypi.org/project/sage-conf/>`_ is a configuration
Expand Down
2 changes: 0 additions & 2 deletions src/doc/en/reference/calculus/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Using calculus

- :doc:`More about symbolic variables and functions <sage/calculus/var>`
- :doc:`Main operations on symbolic expressions <sage/symbolic/expression>`
- :doc:`sage/calculus/expr`
- :doc:`Assumptions about symbols and functions <sage/symbolic/assumptions>`
- :doc:`sage/symbolic/relation`
- :doc:`sage/symbolic/integration/integral`
Expand Down Expand Up @@ -66,7 +65,6 @@ Internal functionality supporting calculus

sage/symbolic/expression
sage/symbolic/callable
sage/calculus/expr
sage/symbolic/assumptions
sage/symbolic/relation
sage/calculus/calculus
Expand Down
Loading

0 comments on commit 54cd43c

Please sign in to comment.