3-manifolds / SnapPy

SnapPy is a package for studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures. It is based on the SnapPea kernel written by Jeff Weeks.
https://snappy.computop.org/
84 stars 39 forks source link

time to drop python2 compatibility ? #55

Closed fchapoton closed 1 year ago

fchapoton commented 2 years ago

in particular

Any opinion ?

Also:

fchapoton commented 2 years ago

also change cython language level to 3str or 3 ?

NathanDunfield commented 2 years ago

We officially dropped Python 2 support with the release of SnapPy 3.0; specifically, we only support Python 3.6 and newer. So removing all of that unused cruft would be great.

fchapoton commented 2 years ago

one little step in #56, will remove future in another pull request

fchapoton commented 2 years ago

See #67 for some details in this spirit

fchapoton commented 2 years ago

some care for (object) in #70

fchapoton commented 2 years ago

there probably remains some "try except" about imports that should be cleaned up.

And also code in pari.py about old sage versions that is obsolete

NathanDunfield commented 2 years ago

And also code in pari.py about old sage versions that is obsolete

Given that we don't support Python 2, any code for Sage < 8.9 can go. Also, on the plain-Python side, we now require cypari>=2.3 so the stuff referring to pre-2.2.0 can be deleted as well.

fchapoton commented 2 years ago

see #78

fchapoton commented 1 year ago

I have also found that

git grep "if sys.version" .
mac_osx_app/__boot__.py:if sys.version_info[0] == 2:
mac_osx_app/__boot__.py:    if sys.version_info[0] == 2:
mac_osx_app/dmg-maker/dmg-maker.py:if sys.version_info.major == 2:
mac_osx_app/setup.py:if sys.version_info >= (3,4):
opengl/CyOpenGL.pyx:if sys.version_info[0] < 3:
python/database.py:    if sys.version_info >= (3,4):
python/gui.py:if sys.version_info.major < 3 or sys.version_info.minor < 7:
setup.py:        if sys.version_info.major == 2:
setup.py:        elif sys.version_info == (3,4):

Can I go on and carefuly get rid of all that ?

NathanDunfield commented 1 year ago

Yes, please do.

fchapoton commented 1 year ago

Maybe one should close this issue. Remaining issues can be fixed when found.

NathanDunfield commented 1 year ago

Agreed, closing now.