sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Remove __init__.py files for subpackages designated to be namespace packages #33011

Closed mkoeppe closed 2 years ago

mkoeppe commented 2 years ago

This ticket changes the following packages to namespace packages (by removing __init__.py):

A complication lies in the behavior of the Python import machinery: setup.py puts the source path in front of setup.py because sage_setup uses sage.env and is_package_or_sage_namespace_package_dir (#33033). But when an old version of sage that is an ordinary package is installed already, the source will not shadow it.

To avoid this complication, in this ticket we do not yet remove src/sage/__init__.py. That is done in #34187.

CC: @tobiasdiez @kwankyu

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 39aa2f1

Reviewer: Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/33011

mkoeppe commented 2 years ago

Branch: u/mkoeppe/removeinitpy_files_for_packages_designated_to_be_namespace_packages

mkoeppe commented 2 years ago

Last 10 new commits:

2a4a323Merge tag '9.5.beta7' into t/29039/pip_installable_package_sage_bootstrap
9ef0567Merge #29039
e0399a1pkgs/sagemath-objects: Install a fixed set of scripts, not all of src/bin
7519048src/bin/sage[-env]: Put SAGE_ROOT/src/bin in front of path only if run out of this directory
00024e6Merge #32933
bfc953bsrc/sage/doctest/reporting.py: Indicate --environment if not default
36d6b09pkgs/sagemath-categories/setup.cfg.m4: Add scripts
8648741Merge #29865
d91e23bMerge #28925
137f5eeRemove __init__.py files
mkoeppe commented 2 years ago

Commit: 137f5ee

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1,8 @@
+This ticket changes the following packages to namespace packages (by removing `__init__.py`): 
+- `sage.matrix` (this allows the new distribution `sage-meataxe` introduced in #30151 to add the module `sage.matrix.matrix_gfpn_dense`) to the package)
+- `sage.libs` (for `.meataxe` - #30151, `.sirocco`, `.coexter3`, `.fes`)
+- `sage.interfaces` (for `.primecount`)
+- `sage.graphs` (for `.bliss`, `.mcqd`)
+- `sage.graphs.graph_decompositions` (for `.tdlib` -> `sage-tdlib`, #29864.)
+- `sage.numerical.backends`. (This is preparation for later work, in #30152.)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,5 @@
 This ticket changes the following packages to namespace packages (by removing `__init__.py`): 
+- `sage`
 - `sage.matrix` (this allows the new distribution `sage-meataxe` introduced in #30151 to add the module `sage.matrix.matrix_gfpn_dense`) to the package)
 - `sage.libs` (for `.meataxe` - #30151, `.sirocco`, `.coexter3`, `.fes`)
 - `sage.interfaces` (for `.primecount`)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -7,3 +7,7 @@
 - `sage.graphs.graph_decompositions` (for `.tdlib` -> `sage-tdlib`, #29864.)
 - `sage.numerical.backends`. (This is preparation for later work, in #30152.)

+A complication lies in the behavior of the Python import machinery: 
+`setup.py` puts the source path in front of `setup.py` because `sage_setup` uses `sage.env` and `is_package_or_sage_namespace_package_dir` (#33033).
+But when an old version of `sage` that is an ordinary package is installed already, the source will not shadow it.
+
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 137f5ee to 699ca47

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

2e995ddsrc/sage/{arith,ext,libs,rings,sets}/all__sagemath_objects.py
f244b57pkgs/sagemath-objects/MANIFEST.in: Exclude generated files
2f6d473pkgs/sagemath-categories/MANIFEST.in.m4: Exclude generated files
1a3afe6Merge #28925
7f9c9b0Remove __init__.py files
cf7371fsrc/sage_setup/find.py: Update import of is_package_or_namespace_package_dir
5808f3dsrc/sage/misc/package_dir.py: New file for is_package_or_sage_namespace_package_dir
f5addb3Merge #33033
464b0a5Merge #28925
699ca47Remove __init__.py files, add some all.py files
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

2062384src/sage/__init__.py: Restore
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 699ca47 to 2062384

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,5 +1,4 @@
 This ticket changes the following packages to namespace packages (by removing `__init__.py`): 
-- `sage`
 - `sage.matrix` (this allows the new distribution `sage-meataxe` introduced in #30151 to add the module `sage.matrix.matrix_gfpn_dense`) to the package)
 - `sage.libs` (for `.meataxe` - #30151, `.sirocco`, `.coexter3`, `.fes`)
 - `sage.interfaces` (for `.primecount`)
@@ -11,3 +10,5 @@
 `setup.py` puts the source path in front of `setup.py` because `sage_setup` uses `sage.env` and `is_package_or_sage_namespace_package_dir` (#33033).
 But when an old version of `sage` that is an ordinary package is installed already, the source will not shadow it.

+To avoid this complication, in this ticket we do not yet remove `src/sage/__init__.py`.
+
mkoeppe commented 2 years ago

Author: Matthias Koeppe

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

3939af7Merge tag '9.5.rc3' into t/33033/prepare_sage_doctest_for_namespace_packages
178d111Merge #33033
efbc045Merge #28925
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 2062384 to efbc045

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from efbc045 to be39670

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

5c873e0Merge tag '9.6.beta1' into t/28925/modify_find_python_sources__clean_stale_files_to_support_modularization_of_sagelib_by_native_namespace_packages__pep_420_
37b3299pkgs/sagemath-{objects,categories}/setup.cfg.m4: Update python_requires
5546c63pkgs/sagemath-objects/MANIFEST.in: Add sage.misc.package_dir
be39670Merge #28925
mkoeppe commented 2 years ago

Work Issues: broken with "configure --enable-editable" (gitpod)

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from be39670 to 87277b3

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

f961a7dsrc/setup.py: Support namespace packages in Cython 0.x
87277b3Merge #28925
mkoeppe commented 2 years ago

Changed work issues from broken with "configure --enable-editable" (gitpod) to none

kwankyu commented 2 years ago
comment:14

Is this supposed to work even in incremental build?

Doing ./configure; make with the branch, I got

[sagelib-9.6.beta5] ************************************************************************
[sagelib-9.6.beta5] Traceback (most recent call last):
[sagelib-9.6.beta5]   File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/setup.py", line 89, in <module>
[sagelib-9.6.beta5]     from sage_setup.find import find_python_sources, is_package_or_namespace_package_dir
[sagelib-9.6.beta5] ImportError: cannot import name 'is_package_or_namespace_package_dir' from 'sage_setup.find' (/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_setup/find.py)
kwankyu commented 2 years ago
comment:15

Building from scratch (after make distclean) works. Sage starts with no difference. I am running tests. No problem up to now.

I checked removed __init__.py files. There is still src/sage/numerical/__init__.py file. Is this correct?

What else should I check as a user/reviewer?

kwankyu commented 2 years ago
comment:16

A comment perhaps naive and not relevant here:

If a file like all__sagemath_objects.py is only to serve

# The presence of this file ensures that sage_setup for sagemath-objects
# considers this directory as a namespace package 

then a simpler name like __namespace_package__.py would not work?

kwankyu commented 2 years ago
comment:17

I get these persistent doctest failures

sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/tests/cmdline.py  # 4 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/structure/element.pyx  # 35 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/misc/cython.py  # 3 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/misc/cachefunc.pyx  # 23 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/arith/long.pxd  # 14 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --warn-long 74.5 --random-seed=209187923013064120554478148791206188460 src/sage_setup/find.py  # 1 doctest failed
mkoeppe commented 2 years ago
comment:18

Replying to @kwankyu:

If a file like all__sagemath_objects.py is only to serve

# The presence of this file ensures that sage_setup for sagemath-objects
# considers this directory as a namespace package 

then a simpler name like __namespace_package__.py would not work?

It would work, but based on discussion in #28925, I decided to use a file pattern that is already in use in the Sage sources

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

d2b5293Merge tag '9.6.beta5' into t/28925/modify_find_python_sources__clean_stale_files_to_support_modularization_of_sagelib_by_native_namespace_packages__pep_420_
bca95f1Merge #28925
118df6csrc/sage/numerical/__init__.py: Remove
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 87277b3 to 118df6c

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -4,7 +4,7 @@
 - `sage.interfaces` (for `.primecount`)
 - `sage.graphs` (for `.bliss`, `.mcqd`)
 - `sage.graphs.graph_decompositions` (for `.tdlib` -> `sage-tdlib`, #29864.)
-- `sage.numerical.backends`. (This is preparation for later work, in #30152.)
+- `sage.numerical`, `sage.numerical.backends`. (This is preparation for later work, in #30152.)

 A complication lies in the behavior of the Python import machinery: 
 `setup.py` puts the source path in front of `setup.py` because `sage_setup` uses `sage.env` and `is_package_or_sage_namespace_package_dir` (#33033).
mkoeppe commented 2 years ago
comment:21

Replying to @kwankyu:

I checked removed __init__.py files. There is still src/sage/numerical/__init__.py file. Is this correct?

Thanks for catching this! I have removed it now.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 118df6c to fbc75c2

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

aac736cbuild/pkgs/sage_setup/dependencies: Add all sage_setup source files
fbc75c2Merge #28925
mkoeppe commented 2 years ago
comment:23

Replying to @kwankyu:

Is this supposed to work even in incremental build?

I think this is fixed now by the latest commit in #28925

mkoeppe commented 2 years ago
comment:24

Replying to @kwankyu:

I get these persistent doctest failures

Thanks for testing! I cannot reproduce these failures. Maybe they have been resolved by merging the latest beta into the branch already.

mkoeppe commented 2 years ago
comment:25

Replying to @kwankyu:

What else should I check as a user/reviewer?

Nothing special really, there should be no observable change. The dependency #28925 does give some additional things that could be checked regarding the subset distributions sagemath-objects, sagemath-categories.

kwankyu commented 2 years ago
comment:26

Replying to @mkoeppe:

Replying to @kwankyu:

If a file like all__sagemath_objects.py is only to serve

# The presence of this file ensures that sage_setup for sagemath-objects
# considers this directory as a namespace package 

then a simpler name like __namespace_package__.py would not work?

It would work, but based on discussion in #28925, I decided to use a file pattern that is already in use in the Sage sources

I don't find any discussion about naming there... Anyway,

(1) Is it true that the prefix all__ has nothing to do with the purpose of the file all.py?

(2) Should the name depend on the distribution package name (here sagemath_objects)? Then is it subject to change depending on how sage library is organized as distribution packages?

mkoeppe commented 2 years ago
comment:27

Replying to @kwankyu:

(1) Is it true that the prefix all__ has nothing to do with the purpose of the file all.py?

Not true. See for example https://github.com/sagemath/sage-prod/blob/develop/src/sage/categories/all__sagemath_objects.py, which is imported in https://github.com/sagemath/sage-prod/blob/develop/src/sage/categories/all.py

mkoeppe commented 2 years ago
comment:28

Just the all__sagemath_objects.py files added in the present ticket happen to be trivial because the distribution sagemath-objects does not put anything from the modules that it contains in the global namespace.

kwankyu commented 2 years ago
comment:29

Replying to @mkoeppe:

Replying to @kwankyu:

(1) Is it true that the prefix all__ has nothing to do with the purpose of the file all.py?

Not true. See for example https://github.com/sagemath/sage-prod/blob/develop/src/sage/categories/all__sagemath_objects.py, which is imported in https://github.com/sagemath/sage-prod/blob/develop/src/sage/categories/all.py

Okay. I see the idea.

kwankyu commented 2 years ago
comment:30

With sage built with Volker's branch and #28925, I get these failures only with this branch:

sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/tests/cmdline.py  # 4 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/misc/sagedoc.py  # 3 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/structure/element.pyx  # 35 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/misc/cachefunc.pyx  # 23 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/misc/cython.py  # 3 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/arith/long.pxd  # 14 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage_setup/find.py  # 1 doctest failed
sage -t --warn-long 63.0 --random-seed=176571558312394579781618281386824830468 src/sage/docs/conf.py  # 1 doctest failed
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from fbc75c2 to 1e35435

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6258b79Merge tag '9.6.rc2' into t/28925/modify_find_python_sources__clean_stale_files_to_support_modularization_of_sagelib_by_native_namespace_packages__pep_420_
4e95de9Merge #33803
a92db46Merge tag '9.7.beta1' into t/28925/modify_find_python_sources__clean_stale_files_to_support_modularization_of_sagelib_by_native_namespace_packages__pep_420_
1e35435Merge #28925
kwankyu commented 2 years ago
comment:33

With the current branch, make distclean; make -j8; sage -tp --all results in

----------------------------------------------------------------------
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/tests/cmdline.py  # 4 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/sagedoc.py  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/structure/element.pyx  # 35 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/cython.py  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/cachefunc.pyx  # 23 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/arith/long.pxd  # 14 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/game_theory/normal_form_game.py  # 2 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage_setup/find.py  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/game_theory/catalog_normal_form_games.py  # 15 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage_docbuild/conf.py  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/docs/conf.py  # 1 doctest failed
----------------------------------------------------------------------

on mac.

kwankyu commented 2 years ago
comment:34

This comment

# To build and test in the tox environment:
#
# ./sage -sh -c '(cd pkgs/sagemath-categories/src && tox -v -v -v)'   

in pkgs/sagemath-categories/tox.ini seems wrong.

This ./sage -sh -c '(cd pkgs/sagemath-categories && tox -v -v -v)' works though.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 1e35435 to ed3086d

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

ed3086dpkgs/sagemath-categories/tox.ini: Fix instructions in comment
mkoeppe commented 2 years ago
comment:36

Replying to @kwankyu:

With the current branch, make distclean; make -j8; sage -tp --all results in

----------------------------------------------------------------------
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/tests/cmdline.py  # 4 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/sagedoc.py  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/structure/element.pyx  # 35 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/cython.py  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/cachefunc.pyx  # 23 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/graphs/graph_decompositions/fast_digraph.pyx  # 5 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/tate_algebra_ideal.pyx  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/polynomial/ore_polynomial_element.pyx  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/ext/memory_allocator.pxd  # 6 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/ext/memory_allocator.pyx  # 9 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/arith/long.pxd  # 14 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/inherit_comparison.pyx  # 5 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/misc/lazy_attribute.pyx  # 3 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/rings/integer_fake.pxd  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/game_theory/normal_form_game.py  # 2 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage_setup/find.py  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/game_theory/catalog_normal_form_games.py  # 15 doctests failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage_docbuild/conf.py  # 1 doctest failed
sage -t --warn-long 59.6 --random-seed=58674280218506165844967914886745987426 src/sage/docs/conf.py  # 1 doctest failed
----------------------------------------------------------------------

on mac.

Could you share the details of these failures please? I cannot reproduce them (also on mac)

mkoeppe commented 2 years ago
comment:37

OK, now I do see some failures that come from the runtime use of Cython.

kwankyu commented 2 years ago
comment:38

Some doctest failures are caused by the failure of documentation building. Indeed I have

[sagemath_doc_html-none] [graphs   ] The inventory files are in local/share/doc/sage/inventory/en/reference/graphs.
[sagemath_doc_html-none] Build finished. The built documents can be found in /Users/kwankyu/GitHub/sage-temp/local/share/doc/sage/inventory/en/reference/graphs
[sagemath_doc_html-none] Error building the documentation.
[sagemath_doc_html-none] Traceback (most recent call last):
[sagemath_doc_html-none]   File "/usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
[sagemath_doc_html-none]     return _run_code(code, main_globals, None,
[sagemath_doc_html-none]   File "/usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
[sagemath_doc_html-none]     exec(code, run_globals)
[sagemath_doc_html-none]   File "/Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 500, in <module>
[sagemath_doc_html-none]     sys.exit(main())
[sagemath_doc_html-none]   File "/Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 497, in main
[sagemath_doc_html-none]     builder()
[sagemath_doc_html-none]   File "/Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/builders.py", line 814, in _wrapper
[sagemath_doc_html-none]     for module_name in self.get_new_and_updated_modules():
[sagemath_doc_html-none]   File "/Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_docbuild/builders.py", line 1014, in get_new_and_updated_modules
[sagemath_doc_html-none]     if (module_filename.endswith('.pyc') or module_filename.endswith('.pyo')):
[sagemath_doc_html-none] AttributeError: 'NoneType' object has no attribute 'endswith'
[sagemath_doc_html-none] 
[sagemath_doc_html-none]     Note: incremental documentation builds sometimes cause spurious
[sagemath_doc_html-none]     error messages. To be certain that these are real errors, run
[sagemath_doc_html-none]     "make doc-clean doc-uninstall" first and try again.
[sagemath_doc_html-none] cd /Users/kwankyu/GitHub/sage-temp && ./sage --docbuild --no-pdf-links reference/cryptography inventory --no-prune-empty-dirs
[sagemath_doc_html-none] make[6]: *** [doc-inventory--reference-categories] Error 1
[sagemath_doc_html-none] make[6]: *** Waiting for unfinished jobs....
[sagemath_doc_html-none] [asymptoti] no targets are out of date.

Do you have no problem in building documentation?

mkoeppe commented 2 years ago
comment:39

Now I see that too, sorry. Previously it seems I didn't clean fully

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from ed3086d to 7a43f7a