Opened 16 months ago
Closed 14 months ago
#29701 closed enhancement (fixed)
Replace use of module_list and OptionalExtension by extending find_python_sources
Reported by:  mkoeppe  Owned by:  

Priority:  critical  Milestone:  sage9.2 
Component:  refactoring  Keywords:  
Cc:  fbissey, isuruf, vdelecroix, dcoudert, dimpase, ghkliem, vbraun  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Jonathan Kliem 
Report Upstream:  N/A  Work issues:  
Branch:  55c3fbc (Commits, GitHub, GitLab)  Commit:  55c3fbc565fd7884f3df9555de83dd326ace276e 
Dependencies:  Stopgaps: 
Description (last modified by )
We add two new features to find_python_sources
: finding Cython extensions, and filtering by "distributions".
We remove the use of module_list
, finding Cython extensions instead in the source tree. (This is prepared by #29706 and followup tickets by moving Extension options to directives in the source files.)
We remove OptionalExtension
s as follows. We map installed packages to "distributions" (for example, tdlib
> sagetdlib
) and then filter by distribution.
Followup tickets:
 as part of Metaticket #29705, we will make these "distributions" actually separate distutils packages that provide namespace packages (#28925)
 remove the file
module_list.py
(not done on this ticket to avoid possible merge conflicts), deprecateOptionalExtension
(which may be in use by user packages?)
Change History (72)
comment:1 Changed 16 months ago by
 Description modified (diff)
 Summary changed from Replace use of OptionalExtension by namespace packages to Metaticket: Replace use of OptionalExtension by namespace packages
comment:2 Changed 16 months ago by
 Description modified (diff)
comment:3 Changed 16 months ago by
 Cc vdelecroix dcoudert dimpase added
 Description modified (diff)
comment:4 Changed 16 months ago by
 Description modified (diff)
comment:5 Changed 16 months ago by
 Description modified (diff)
comment:6 Changed 16 months ago by
 Description modified (diff)
comment:7 Changed 16 months ago by
 Description modified (diff)
comment:8 Changed 16 months ago by
 Description modified (diff)
comment:9 Changed 16 months ago by
 Description modified (diff)
comment:10 Changed 16 months ago by
 Cc ghkliem added
 Dependencies set to #29411, #29702, #29706, #29720, #29721, #29785, #29786, #29790, #29791, #28925
 Description modified (diff)
 Summary changed from Metaticket: Replace use of OptionalExtension by namespace packages to Replace use of module_list and OptionalExtension by extending find_python_sources
comment:11 Changed 16 months ago by
 Branch set to u/mkoeppe/replace_use_of_module_list_optionalextension
comment:12 Changed 16 months ago by
 Commit set to 891d12aeacd439cd72e31d42399826f48dae624f
 Dependencies changed from #29411, #29702, #29706, #29720, #29721, #29785, #29786, #29790, #29791, #28925 to #29411, #29702, #29706, #29720, #29721, #29785, #29786, #29790, #29791
 Description modified (diff)
comment:13 Changed 16 months ago by
 Dependencies changed from #29411, #29702, #29706, #29720, #29721, #29785, #29786, #29790, #29791 to #29702 (#29411), #29706, #29720, #29721, #29785, #29786, #29790, #29791
comment:14 Changed 16 months ago by
 Commit changed from 891d12aeacd439cd72e31d42399826f48dae624f to ec7e9c599aebbec9b8a9227399cf6b8793dccd72
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
0295c8f  src/module_list.py: Move options for Extensions in sage.graphs.graph_decompositions to distutils directives

b582789  src/sage_setup/find.py: Filter by directive 'sage_setup: distribution = PKG', find Cython modules

63c64d5  Merge branches 't/29720/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_2___optionalextensions_', 't/29721/spkg_configure_m4_for_coxeter3', 't/29785/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_', 't/29786/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_4__sage_rings_', 't/29790/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_5__sage_graphs_' and 't/29791/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_6__last_' into t/29701/replace_use_of_module_list_optionalextension

ae70c81  src/sage_setup/optional_extension.py (is_package_installed_and_updated): Factor out from OptionalExtension

ec7e9c5  src/setup.py: Remove use of module_list.py; filter by distributions

comment:15 Changed 16 months ago by
No longer on top of #28925, so no namespace package are involved any more for this ticket.
comment:16 Changed 16 months ago by
 Description modified (diff)
 Status changed from new to needs_review
comment:17 Changed 16 months ago by
 Description modified (diff)
comment:18 Changed 16 months ago by
 Description modified (diff)
comment:19 Changed 16 months ago by
 Commit changed from ec7e9c599aebbec9b8a9227399cf6b8793dccd72 to 25a234059991c56df9b046700980cb1d194a32e5
Branch pushed to git repo; I updated commit sha1. New commits:
38b6bcf  Merge tag '9.2.beta0' into t/29411/make_sagelib_a_script_package

f9a30f6  build/pkgs/sagelib/spkginstall: Fix up error exits

00a1d57  Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

25a2340  Merge branch 't/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup' into t/29701/replace_use_of_module_list_optionalextension

comment:20 Changed 16 months ago by
 Commit changed from 25a234059991c56df9b046700980cb1d194a32e5 to 2d866a3bab2a1d55bc85fcae4f30d384498bcc12
Branch pushed to git repo; I updated commit sha1. New commits:
2d866a3  src/sage/graphs/graph_decompositions/tdlib.pyx: Fixup

comment:21 Changed 16 months ago by
 Commit changed from 2d866a3bab2a1d55bc85fcae4f30d384498bcc12 to 3beb5b71e8a04fd932aaa0d83d50b2ef11d7c319
Branch pushed to git repo; I updated commit sha1. New commits:
b1b3787  sage.env.cython_aliases: Fix for systems without zlib pc

802356a  Merge branch 't/29706/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files' into t/29791/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_6__last_

3beb5b7  Merge branch 't/29791/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_6__last_' into t/29701/replace_use_of_module_list_optionalextension

comment:22 Changed 16 months ago by
 Commit changed from 3beb5b71e8a04fd932aaa0d83d50b2ef11d7c319 to 7f8850adc52d8798852646b550f4f9c88b30b468
Branch pushed to git repo; I updated commit sha1. New commits:
7f8850a  src/module_list.py: Document that it is obsolete

comment:23 Changed 16 months ago by
 Commit changed from 7f8850adc52d8798852646b550f4f9c88b30b468 to 26a85a4303d4774427d173cae932ad48b5ac5926
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
5db5318  Trac #29345: remove "break" statements from AC_SEARCH_LIBS.

e810ad1  Trac #29345: don't use sage's config.status for the lrcalc build.

93c9921  Trac #29345: replace the function that populates the CVXOPT_* variables.

0e66a0a  Trac #29345: add Dima's SPKG patches for ksh compatibility.

df3f05e  build/make/Makefile.in [SCRIPT_PACKAGE_templ]: cd into the SPKG directory; adjust spkginstall scripts

5372065  Merge branch 't/29793/script_packages_should_cd_into_the_spkg_directory' into t/29411/make_sagelib_a_script_package

c166b97  Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

cc30471  build/bin/writedockerfile.sh: Do not ADD removed file src/Makefile.in

8a41326  Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

26a85a4  Merge branch 't/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup' into t/29701/replace_use_of_module_list_optionalextension

comment:24 Changed 16 months ago by
 Commit changed from 26a85a4303d4774427d173cae932ad48b5ac5926 to a0be9b64ce3623fe4470d7b2483d21f343225ca7
Branch pushed to git repo; I updated commit sha1. New commits:
5d5803e  src/sage/graphs/planarity.pyx: Add forgotten distutils directive

a0be9b6  Merge branch 't/29790/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_5__sage_graphs_' into t/29701/replace_use_of_module_list_optionalextension

comment:25 Changed 16 months ago by
comment:26 Changed 15 months ago by
 Commit changed from a0be9b64ce3623fe4470d7b2483d21f343225ca7 to 14396af45af31c8f3a48d934d0e1ad424712ba4c
Branch pushed to git repo; I updated commit sha1. New commits:
14396af  Merge tag '9.2.beta2' into t/29701/replace_use_of_module_list_optionalextension

comment:27 Changed 15 months ago by
 Dependencies changed from #29702 (#29411), #29706, #29720, #29721, #29785, #29786, #29790, #29791 to #29702 (#29411), #29786, #29790, #29791
Merged in latest beta. Needs review
comment:28 Changed 15 months ago by
 Commit changed from 14396af45af31c8f3a48d934d0e1ad424712ba4c to d62da1559ca1448b07962ea69fcde212cfea75f0
Branch pushed to git repo; I updated commit sha1. New commits:
d62da15  sage_setup.command.sage_build: Add the extensions to the distribution

comment:29 followup: ↓ 30 Changed 15 months ago by
I'm a bit confused:
find_python_sources
gives you all sources including all with optional packages if distributions=None
.
However, if distributions is sagetdlib
, you get only one source file.
Don't we want find_python_sources
to contain everything except for not installed optional packages?
comment:30 in reply to: ↑ 29 Changed 15 months ago by
Replying to ghkliem:
find_python_sources
gives you all sources including all with optional packages ifdistributions=None
.However, if distributions is
sagetdlib
, you get only one source file.
That's right. This is a feature for modularization as in #29864 (Modularization of sagelib: Break out a separate package sagetdlib).
Don't we want
find_python_sources
to contain everything except for not installed optional packages?
For this, one passes distributions=['', 'sagetdlib']
. The empty string designates all source files without a sage_setup: distribution
directive. This list of distributions is computed in src/setup.py
.
comment:31 followup: ↓ 34 Changed 15 months ago by
I see.
I would suggest updating the benchmark. Also I can confirm this, it is not really meaningful, as this is not the normal use case, isn't it. The normal use case would be with distributions=['']
and this takes about 500 ms and not 20 ms. Still no problem I think, but much longer.
comment:32 Changed 15 months ago by
Otherwise the source code looks fine. Do we have any test runs? Should I run them?
comment:33 Changed 15 months ago by
I have tested the branch of this ticket on macOS and also as part of #29950 and other tickets.
comment:34 in reply to: ↑ 31 Changed 15 months ago by
comment:35 Changed 15 months ago by
 Commit changed from d62da1559ca1448b07962ea69fcde212cfea75f0 to 06a360974cc56699a85f291494a493fed041dbc9
Branch pushed to git repo; I updated commit sha1. New commits:
06a3609  sage_setup.find.find_python_sources: Add benchmark doctest

comment:36 Changed 15 months ago by
As I have capacities I started test for only this ticket:
comment:37 Changed 15 months ago by
There is that annoying failure of sageinspect again
ubuntubionic, minimal (for example, but looks like it is anywhere)
File "src/sage/misc/sageinspect.py", line 28, in sage.misc.sageinspect Failed example: sage_getsource(sage.rings.rational)[5:] Expected: 'Rational Numbers...' Got: 'tutils: libraries = ntl\nr"""\nRational Numbers\n\nAUTHORS:\n\n William Stein (2005): first version\n\n William Stein (20060222): floor and ceil (pure fast GMP versions).\n\n Gonzalo Tornaria and William Stein (20060302): greatly improved\n python/GMP conversion; hashing\n\n William Stein and Naqi Jaffery (20060306): height, sqrt examples,\n and improve behavior of sqrt.\n\n David Harvey (20060915): added nth_root\n\n Pablo De Napoli (20070401): corrected the implementations of\n multiplicative_order, is_one; optimized __nonzero__ ; documented:\n lcm,gcd\n\n John Cremona (20090515): added support for local and global\n logarithmic heights.\n\n Travis Scrimshaw (20121018): Added doctests for full coverage.\n\n Vincent Delecroix (2013): continued fraction\n\n Vincent Delecroix (20170503): faster integerrational comparison\n\n Vincent Klein (20170511): add __mpq__() to class Rational\n\n Vincent Klein (20170522): Rational constructor support gmpy2.mpq\n or gmpy2.mpz parameter. Add __mpz__ to class Rational.\n\nTESTS::\n\n sage: a = 2/3\n sage: a == loads(dumps(a))\n True\n"""\n\n# ****************************************************************************\n# Copyright (C) 2004, 2006 William Stein <wstein@gmail.com>\n# Copyright (C) 2017 Vincent Delecroix <20100.delecroix@gmail.com>\n#\n# Distributed under the terms of the GNU General Public License (GPL)\n# as published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n# https://www.gnu.org/licenses/\n# ****************************************************************************\n\ncimport cython\nfrom cpython cimport *\nfrom cpython.object cimport Py_EQ, Py_NE\n\nfrom cysignals.signals cimport sig_on, sig_off\n\nimport operator\nimport fractions\n\nfrom sage.misc.mathml import mathml\nfrom sage.arith.long cimport pyobject_to_long, integer_check_long_py\nfrom sage.cpython.string cimport char_to_str, str_to_bytes\n\nimport sage.misc.misc as misc\nfrom sage.structure.sage_object cimport SageObject\nfrom sage.structure.richcmp cimport rich_to_bool_sgn\nimport sage.rings.rational_field\n\ncimport sage.rings.integer as integer\nfrom .integer cimport Integer\n\nfrom cypari2.paridecl cimport *\nfrom cypari2.gen cimport Gen as pari_gen\nfrom sage.libs.pari.convert_gmp cimport INT_to_mpz, INTFRAC_to_mpq, new_gen_from_mpq_t\n\nfrom .integer_ring import ZZ\nfrom sage.arith.rational_reconstruction cimport mpq_rational_reconstruction\n\nfrom sage.structure.coerce cimport is_numpy_type\n\nfrom sage.libs.gmp.pylong cimport mpz_set_pylong\n\nfrom sage.structure.coerce cimport coercion_model\nfrom sage.structure.element cimport Element\nfrom sage.structure.element import coerce_binop\nfrom sage.structure.parent cimport Parent\nfrom sage.categories.morphism cimport Morphism\nfrom sage.categories.map cimport Map\n\n\n\nimport sage.rings.real_mpfr\nimport sage.rings.real_double\nfrom libc.stdint cimport uint64_t\nfrom sage.libs.gmp.binop cimport mpq_add_z, mpq_mul_z, mpq_div_zz\n\nfrom cpython.int cimport PyInt_AS_LONG\n\ncimport sage.rings.fast_arith\nimport sage.rings.fast_arith\n\ncdef sage.rings.fast_arith.arith_int ai\nai = sage.rings.fast_arith.arith_int()\n\ncdef object numpy_long_interface = {\'typestr\': \'=i4\' if sizeof(long) == 4 else \'=i8\' }\ncdef object numpy_int64_interface = {\'typestr\': \'=i8\'}\ncdef object numpy_object_interface = {\'typestr\': \'O\'}\ncdef object numpy_double_interface = {\'typestr\': \'=f8\'}\n\nfrom libc.math cimport ldexp\nfrom sage.libs.gmp.all cimport *\n\ncimport gmpy2\ngmpy2.import_gmpy2()\n\n\ncdef class Rational(sage.structure.element.FieldElement)\n'
comment:38 Changed 15 months ago by
 Commit changed from 06a360974cc56699a85f291494a493fed041dbc9 to 034a7f71a52fffc9a6566bda3e63abccdb5d6825
Branch pushed to git repo; I updated commit sha1. New commits:
43a9b16  src/sage/misc/sageinspect.py: Fix up doctest that depends on a modified source file

a5bc828  src/sage/misc/sageinspect.py: Fixup fixup

1baaa68  src/sage/misc/sageinspect.py: Remove unused import

174626c  Merge branch 't/29786/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_4__sage_rings_' into t/29701/replace_use_of_module_list_optionalextension

a56dc35  Merge tag '9.2.beta1' into t/29702/public/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

034a7f7  Merge branch 'public/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup' of git://trac.sagemath.org/sage into t/29701/replace_use_of_module_list_optionalextension

comment:39 followup: ↓ 40 Changed 15 months ago by
Thanks for catching this. I have merged in the latest branches of the dependencies. The updated #29786 where this error came from should fix this.
comment:40 in reply to: ↑ 39 Changed 15 months ago by
comment:42 Changed 15 months ago by
 Reviewers set to Jonathan Kliem
comment:43 Changed 15 months ago by
Thank you!
comment:44 Changed 15 months ago by
 Commit changed from 034a7f71a52fffc9a6566bda3e63abccdb5d6825 to d3c608b0d59077ef2ec58d32a5da0dccdbcddfd8
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
d3c608b  Merge tag '9.2.beta3' into t/29701/replace_use_of_module_list_optionalextension

comment:45 Changed 15 months ago by
Merged 9.2.beta3
comment:46 Changed 15 months ago by
 Status changed from needs_review to positive_review
comment:47 Changed 14 months ago by
 Cc vbraun added
Volker, is there something missing on this ticket that keeps it from being merged?
comment:48 Changed 14 months ago by
 Priority changed from major to critical
comment:49 Changed 14 months ago by
 Dependencies changed from #29702 (#29411), #29786, #29790, #29791 to #29702, #29786, #29790, #29791
#29411 isn't merged (the release script can only check whether a ticket has been merged if you think about it; Do not depend on invalid/duplicate/metatickets, or anything else that doesn't actually contribute commits). Also (#29411)
isn't supported as dependency, whatever the parens are supposed to mean.
comment:50 Changed 14 months ago by
comment:51 Changed 14 months ago by
Thanks for cleaning up the dependency list.
Unfortunately the format does not seem to be documented anywhere.
(#29411 is a regular merged ticket. You merged it in 0bcd001f760ff724832c32b4f65fa575fd82e000)
comment:52 Changed 14 months ago by
Yes, in this case it was the parens.
comment:53 Changed 14 months ago by
 Status changed from positive_review to needs_work
sage t long warnlong 40.4 randomseed=0 src/sage_setup/clean.py ********************************************************************** File "src/sage_setup/clean.py", line 83, in sage_setup.clean._find_stale_files Failed example: python_packages, python_modules = find_python_sources( SAGE_SRC, ['sage', 'sage_setup']) Exception raised: Traceback (most recent call last): File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 715, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 1139, in compile_and_execute exec(compiled, globs) File "<doctest sage_setup.clean._find_stale_files[3]>", line 2, in <module> SAGE_SRC, ['sage', 'sage_setup']) ValueError: too many values to unpack (expected 2) ********************************************************************** File "src/sage_setup/clean.py", line 92, in sage_setup.clean._find_stale_files Failed example: stale_iter = _find_stale_files(SAGE_LIB, python_packages, python_modules, [], extra_files) Exception raised: Traceback (most recent call last): File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 715, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 1139, in compile_and_execute exec(compiled, globs) File "<doctest sage_setup.clean._find_stale_files[6]>", line 1, in <module> stale_iter = _find_stale_files(SAGE_LIB, python_packages, python_modules, [], extra_files) NameError: name 'python_packages' is not defined ********************************************************************** File "src/sage_setup/clean.py", line 95, in sage_setup.clean._find_stale_files Failed example: for f in stale_iter: if f.endswith(skip_extensions): continue if '/ext_data/' in f: continue print('Found stale file: ' + f) Exception raised: Traceback (most recent call last): File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 715, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/release/Sage/local/lib/python3.7/sitepackages/sage/doctest/forker.py", line 1139, in compile_and_execute exec(compiled, globs) File "<doctest sage_setup.clean._find_stale_files[9]>", line 1, in <module> for f in stale_iter: NameError: name 'stale_iter' is not defined ********************************************************************** 1 item had failures: 3 of 11 in sage_setup.clean._find_stale_files [17 tests, 3 failures, 0.03 s]  sage t long warnlong 40.4 randomseed=0 src/sage_setup/clean.py # 3 doctests failed 
comment:54 Changed 14 months ago by
 Commit changed from d3c608b0d59077ef2ec58d32a5da0dccdbcddfd8 to 55c3fbc565fd7884f3df9555de83dd326ace276e
comment:55 Changed 14 months ago by
 Status changed from needs_work to needs_review
comment:56 Changed 14 months ago by
 Dependencies #29702, #29786, #29790, #29791 deleted
comment:57 Changed 14 months ago by
 Status changed from needs_review to positive_review
Back to positive.
comment:58 Changed 14 months ago by
Thanks!
comment:59 followup: ↓ 60 Changed 14 months ago by
 Status changed from positive_review to needs_work
[dochtml] Build finished. The built documents can be found in /home/release/Sage/local/share/doc/sage/inventory/en/reference/manifolds [dochtml] [algebras ] updating environment: 0 added, 5 changed, 0 removed [dochtml] Warning: Could not import sage.graphs.graph_generators cannot import name 'distance_regular' from 'sage.graphs' (/home/release/Sage/local/lib/python3.7/sitepackages/sage/graphs/__init__.py) [dochtml] [arithgrou] The inventory files are in local/share/doc/sage/inventory/en/reference/arithgroup. [dochtml] Build finished. The built documents can be found in /home/release/Sage/local/share/doc/sage/inventory/en/reference/arithgroup [dochtml] Error building the documentation. [dochtml] Traceback (most recent call last): [dochtml] File "/home/release/Sage/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main [dochtml] "__main__", mod_spec) [dochtml] File "/home/release/Sage/local/lib/python3.7/runpy.py", line 85, in _run_code [dochtml] exec(code, run_globals) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__main__.py", line 2, in <module> [dochtml] main() [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 1721, in main [dochtml] builder() [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 328, in _wrapper [dochtml] getattr(get_builder(document), 'inventory')(*args, **kwds) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 553, in _wrapper [dochtml] self._build_everything_except_bibliography(lang, format, *args, **kwds) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 539, in _build_everything_except_bibliography [dochtml] build_many(build_ref_doc, non_references) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 281, in build_many [dochtml] _build_many(target, args, processes=NUM_THREADS) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/utils.py", line 283, in build_many [dochtml] raise worker_exc.original_exception [dochtml] ImportError: cannot import name 'distance_regular' from 'sage.graphs' (/home/release/Sage/local/lib/python3.7/sitepackages/sage/graphs/__init__.py) [dochtml] [dochtml] Note: incremental documentation builds sometimes cause spurious [dochtml] error messages. To be certain that these are real errors, run [dochtml] "make docclean" first and try again. make[3]: *** [Makefile:1816: dochtml] Error 1 make[3]: Leaving directory '/home/release/Sage/build/make' make[2]: *** [Makefile:1707: allstart] Error 2 make[2]: Leaving directory '/home/release/Sage/build/make'
comment:60 in reply to: ↑ 59 Changed 14 months ago by
Replying to vbraun:
[dochtml] Build finished. The built documents can be found in /home/release/Sage/local/share/doc/sage/inventory/en/reference/manifolds [dochtml] [algebras ] updating environment: 0 added, 5 changed, 0 removed [dochtml] Warning: Could not import sage.graphs.graph_generators cannot import name 'distance_regular' from 'sage.graphs' (/home/release/Sage/local/lib/python3.7/sitepackages/sage/graphs/__init__.py) [dochtml] [arithgrou] The inventory files are in local/share/doc/sage/inventory/en/reference/arithgroup. [dochtml] Build finished. The built documents can be found in /home/release/Sage/local/share/doc/sage/inventory/en/reference/arithgroup [dochtml] Error building the documentation. [dochtml] Traceback (most recent call last): [dochtml] File "/home/release/Sage/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main [dochtml] "__main__", mod_spec) [dochtml] File "/home/release/Sage/local/lib/python3.7/runpy.py", line 85, in _run_code [dochtml] exec(code, run_globals) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__main__.py", line 2, in <module> [dochtml] main() [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 1721, in main [dochtml] builder() [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 328, in _wrapper [dochtml] getattr(get_builder(document), 'inventory')(*args, **kwds) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 553, in _wrapper [dochtml] self._build_everything_except_bibliography(lang, format, *args, **kwds) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 539, in _build_everything_except_bibliography [dochtml] build_many(build_ref_doc, non_references) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/__init__.py", line 281, in build_many [dochtml] _build_many(target, args, processes=NUM_THREADS) [dochtml] File "/home/release/Sage/local/lib/python3.7/sitepackages/sage_setup/docbuild/utils.py", line 283, in build_many [dochtml] raise worker_exc.original_exception [dochtml] ImportError: cannot import name 'distance_regular' from 'sage.graphs' (/home/release/Sage/local/lib/python3.7/sitepackages/sage/graphs/__init__.py) [dochtml] [dochtml] Note: incremental documentation builds sometimes cause spurious [dochtml] error messages. To be certain that these are real errors, run [dochtml] "make docclean" first and try again. make[3]: *** [Makefile:1816: dochtml] Error 1 make[3]: Leaving directory '/home/release/Sage/build/make' make[2]: *** [Makefile:1707: allstart] Error 2 make[2]: Leaving directory '/home/release/Sage/build/make'
Are you sure? I thought it would have come from either #30240 or #30260 since they both touch "distance_regular".
comment:61 followup: ↓ 63 Changed 14 months ago by
#30260 is broken. It is confused about whether it wants sage.graphs.distance_regular
or sage.graphs.generators.distance_regular
comment:62 Changed 14 months ago by
 Status changed from needs_work to positive_review
comment:63 in reply to: ↑ 61 ; followup: ↓ 64 Changed 14 months ago by
Replying to mkoeppe:
#30260 is broken. It is confused about whether it wants
sage.graphs.distance_regular
orsage.graphs.generators.distance_regular
it used to be broken, but IMHO it's fixed by https://trac.sagemath.org/ticket/30240#comment:32
comment:64 in reply to: ↑ 63 Changed 14 months ago by
Replying to dimpase:
Replying to mkoeppe:
#30260 is broken. It is confused about whether it wants
sage.graphs.distance_regular
orsage.graphs.generators.distance_regular
it used to be broken, but IMHO it's fixed by https://trac.sagemath.org/ticket/30240#comment:32
Unfortunately Volker merged before that.
comment:65 followup: ↓ 66 Changed 14 months ago by
comment:66 in reply to: ↑ 65 ; followup: ↓ 67 Changed 14 months ago by
comment:67 in reply to: ↑ 66 Changed 14 months ago by
Replying to ghIvoMaffei:
Replying to mkoeppe:
Should it? #30260 is a later ticket and it depends on #30240, but #30240 doesn't rely on #30260. I apologise for the confusion but when #30240 went from "positive review" to "needs work" and I forgot to update #30260.
That's alright  thanks for the fast reaction and fix!
comment:68 Changed 14 months ago by
 Status changed from positive_review to needs_work
sage t long warnlong 42.4 randomseed=0 src/sage_setup/find.py ********************************************************************** File "src/sage_setup/find.py", line 215, in sage_setup.find.find_extra_files Failed example: extras["sage/ext/interpreters"] Expected: ['.../src/sage/ext/interpreters/wrapper_cdf.pxd', ...wrapper_cdf.h...] Got: ['/home/release/Sage/src/sage/ext/interpreters/wrapper_cc.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_cc.pyx', '/home/release/Sage/src/sage/ext/interpreters/wrapper_cdf.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_cdf.pyx', '/home/release/Sage/src/sage/ext/interpreters/wrapper_el.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_el.pyx', '/home/release/Sage/src/sage/ext/interpreters/wrapper_py.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_py.pyx', '/home/release/Sage/src/sage/ext/interpreters/wrapper_rdf.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_rdf.pyx', '/home/release/Sage/src/sage/ext/interpreters/wrapper_rr.pxd', '/home/release/Sage/src/sage/ext/interpreters/wrapper_rr.pyx'] ********************************************************************** 1 item had failures: 1 of 7 in sage_setup.find.find_extra_files [36 tests, 1 failure, 0.27 s]  sage t long warnlong 42.4 randomseed=0 src/sage_setup/find.py # 1 doctest failed 
comment:69 Changed 14 months ago by
Might have been from #29950
comment:70 Changed 14 months ago by
Yes, it's #29950 that broke it.
comment:71 Changed 14 months ago by
 Status changed from needs_work to positive_review
comment:72 Changed 14 months ago by
 Branch changed from u/mkoeppe/replace_use_of_module_list_optionalextension to 55c3fbc565fd7884f3df9555de83dd326ace276e
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
Merge branch 't/29790/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_5__sage_graphs_' into t/29705/METAmodularizesagelib
Merge branch 't/29706/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files' into t/29791/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_6__last_
src/module_list.py: Move options for Extensions in sage.libs to distutils directives
src/module_list.py: Move options for Extensions in sage.matrix to distutils directives
src/module_list.py: Move remaining options for Extensions in sage.libs, sage.rings to distutils directives
Merge branch 't/29791/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_6__last_' into t/29705/METAmodularizesagelib
Fix sage_setup directives: Use distribution, not package
Merge branch 't/29720/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_2___optionalextensions_' into t/29705/METAmodularizesagelib
src/sage_setup/optional_extension.py (is_package_installed_and_updated): Factor out from OptionalExtension
src/setup.py: Remove use of module_list.py; filter by distributions