Opened 18 months ago

Closed 9 months ago

#28816 closed defect (fixed)

database_stein_watkins Python 3 issues

Reported by: vbraun Owned by:
Priority: major Milestone: sage-9.2
Component: packages: optional Keywords: databases, stein-watkins, python3
Cc: was, kimball Merged in:
Authors: Alex J. Best Reviewers: Markus Wageringel
Report Upstream: N/A Work issues:
Branch: ef49c0a (Commits, GitHub, GitLab) Commit: ef49c0af7d562aff98363e49229c718b10c1ce27
Dependencies: Stopgaps:

Status badges

Description

There seem to be various places with bytes / string confusion when building on Python 3, e.g.:

**********************************************************************
File "src/sage/databases/stein_watkins.py", line 50, in sage.databases.stein_watkins
Failed example:
    next(d)                                       # optional - database_stein_watkins
Exception raised:
    Traceback (most recent call last):
      File "/var/lib/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/var/lib/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.databases.stein_watkins[4]>", line 1, in <module>
        next(d)                                       # optional - database_stein_watkins
      File "/var/lib/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage/databases/stein_watkins.py", line 242, in __next__
        return next(self._iter)
      File "/var/lib/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage/databases/stein_watkins.py", line 228, in __iter__
        N = int(x[0])
    ValueError: invalid literal for int() with base 10: b'[0,-1,1,0,0]'
**********************************************************************

Change History (7)

comment:1 Changed 17 months ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:2 Changed 12 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

comment:3 Changed 9 months ago by alexjbest

  • Branch set to u/alexjbest/stein-watkins

comment:4 Changed 9 months ago by alexjbest

  • Authors set to Alex J. Best
  • Commit set to ef49c0af7d562aff98363e49229c718b10c1ce27
  • Keywords databases stein-watkins python3 added
  • Status changed from new to needs_review

I tried to fix this, as I understand it 9.2 will be python2 incompatible so I didn't worry about backwards compatibility.


New commits:

ef49c0afix file encoding for Stein-Watkins database in python3

comment:5 Changed 9 months ago by mkoeppe

  • Cc kimball added

comment:6 Changed 9 months ago by gh-mwageringel

  • Reviewers set to Markus Wageringel
  • Status changed from needs_review to positive_review

Ok, this works for me.

comment:7 Changed 9 months ago by vbraun

  • Branch changed from u/alexjbest/stein-watkins to ef49c0af7d562aff98363e49229c718b10c1ce27
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.