Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Feb 12, 2024

Vote: https://groups.google.com/g/sage-devel/c/MIU-xo9b7pc
Vote (redo): https://groups.google.com/g/sage-devel/c/lPLoA7zaoyg

Fixes #31110

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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 accordingly.

⌛ Dependencies

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 18, 2024

@dimpase May I suggest that you take the time to try out this PR? If you want to understand how a "wheel" package (https://deploy-livedoc--sagemath.netlify.app/html/en/developer/packaging#package-source-types) is installed, maybe install using ./sage -i -s pytest and look at what's happening in venv/var/tmp/sage

@dimpase
Copy link
Member

dimpase commented Feb 18, 2024

As I said, I object to endless proliferation of more and more python (wheel - in case of pure python - or source, doesn't really matter) packages in Sage. If these were pip packages it would be possible to avoid bringing 2 more dependencies into Sage

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 18, 2024

As I said, I object

We already know that.

My suggestion above is friendly guidance to a level on which a discussion makes more sense than what's currently happening in https://groups.google.com/g/sage-devel/c/5kmxaw105lg

Copy link

github-actions bot commented Apr 1, 2024

Documentation preview for this PR (built with commit 52840e0; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Adding two more dependencies for improving testing infrastructure of sage is not a big deal.

@kwankyu
Copy link
Collaborator

kwankyu commented Jul 18, 2024

I got this:

$ sage -t --warn-long 74.7 --random-seed=64827865514850998397057649755024697710 src/sage/databases/findstat.py
Running doctests with ID 2024-07-18-10-48-42-56771071.
Running with SAGE_LOCAL='/Users/kwankyu/GitHub/sage-dev/local' and SAGE_VENV='/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9'
Using --optional=homebrew,pip,sage,sage_spkg
Features to be detected: 4ti2,SAGE_SRC,benzene,bliss,buckygen,conway_polynomials,coxeter3,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_ellcurves,database_graphs,database_jones_numfield,database_knotinfo,dvipng,ecm,fpylll,fricas,gap_package_atlasrep,gap_package_design,gap_package_grape,gap_package_guava,gap_package_hap,gap_package_polycyclic,gap_package_qpa,gap_package_quagroup,gfan,graphviz,imagemagick,ipython,jmol,jupymake,kenzo,latte_int,lrcalc_python,lrslib,matroid_database,mcqd,meataxe,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pynormaliz,pyparsing,python_igraph,requests,rpy2,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.braiding,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.sat,sage.schemes,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sirocco,sphinx,symengine_py,sympy,tdlib,threejs
Doctesting 1 file.
sage -t --warn-long 74.7 --random-seed=64827865514850998397057649755024697710 src/sage/databases/findstat.py
    [134 tests, 0.58 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 0.8 seconds
    cpu time: 0.6 seconds
    cumulative wall time: 0.6 seconds
Features detected for doctesting: 
Error in sys.excepthook:
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/linecache.py", line 54, in getlines
    if getattr(mod, '__file__', None) == filename:
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/py/_vendored_packages/apipkg/__init__.py", line 203, in __getattribute__
    return getattr(getmod(), name)
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/py/_vendored_packages/apipkg/__init__.py", line 188, in getmod
    x = importobj(modpath, None)
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/py/_vendored_packages/apipkg/__init__.py", line 75, in importobj
    module = __import__(modpath, None, None, ["__doc__"])
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/pytest/__init__.py", line 7, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/__init__.py", line 11, in <module>
    from _pytest.assertion import rewrite
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 36, in <module>
    from _pytest.assertion import util
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/util.py", line 24, in <module>
    from _pytest.config import Config
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/config/__init__.py", line 59, in <module>
    import _pytest.hookspec
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/hookspec.py", line 302, in <module>
    @hookspec(
TypeError: __call__() got an unexpected keyword argument 'warn_on_impl_args'

Original exception was:
Traceback (most recent call last):
  File "/Users/kwankyu/GitHub/sage-dev/src/bin/sage-runtests", line 178, in <module>
    import pytest
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/pytest/__init__.py", line 7, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/__init__.py", line 11, in <module>
    from _pytest.assertion import rewrite
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 36, in <module>
    from _pytest.assertion import util
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/assertion/util.py", line 24, in <module>
    from _pytest.config import Config
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/config/__init__.py", line 59, in <module>
    import _pytest.hookspec
  File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/_pytest/hookspec.py", line 302, in <module>
    @hookspec(
TypeError: __call__() got an unexpected keyword argument 'warn_on_impl_args'

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 27, 2024

TypeError: call() got an unexpected keyword argument 'warn_on_impl_args'

Confirmed

@kwankyu
Copy link
Collaborator

kwankyu commented Jul 31, 2024

working well now.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 31, 2024

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 2, 2024
sagemathgh-37301: `build/pkgs/pytest*`: Change to standard wheel packages
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
Vote: https://groups.google.com/g/sage-devel/c/MIU-xo9b7pc
Vote (redo): https://groups.google.com/g/sage-devel/c/lPLoA7zaoyg

Fixes sagemath#31110

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37301
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
@vbraun vbraun merged commit 9fb1a15 into sagemath:develop Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make pytest a standard package

4 participants