Opened 4 months ago

Closed 4 months ago

#27679 closed defect (fixed)

py3: finite state machines

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-8.8
Component: python3 Keywords:
Cc: chapoton Merged in:
Authors: Daniel Krenn Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 3b1d45f (Commits) Commit: 3b1d45f8b6a5351ad7b961fb2a9b4a9277f80b40
Dependencies: #27667 Stopgaps:

Description

Fix the remaining Py3 issues in sage.combinat.finite_state_machine

Change History (5)

comment:1 Changed 4 months ago by dkrenn

  • Branch set to u/dkrenn/fsm-py3

comment:2 follow-up: Changed 4 months ago by dkrenn

  • Commit set to 3b1d45f8b6a5351ad7b961fb2a9b4a9277f80b40

Py3 issues fixed


New commits:

f5f8938pretty for fsm
1693057Trac #27667: remove todo
a21c793Trac #27667: realign doctest output
0f53650fix sorting in full_group_by
01b5429minor code rewrite (PEP8 etc) in full_group_by
47c8358fix doctests (changed ordering of labels)
3b1d45ffix exception handling of preview_word

comment:3 in reply to: ↑ 2 Changed 4 months ago by dkrenn

  • Dependencies set to #27667
  • Status changed from new to needs_review
0f53650fix sorting in full_group_by
47c8358fix doctests (changed ordering of labels)

The output seems to be unstable in Python3, therefore a sorting is introduced. This is kind of cheap as the strings of the keys are determined anyway.

01b5429minor code rewrite (PEP8 etc) in full_group_by

Non-Py3 related.

3b1d45ffix exception handling of preview_word

This seems to be indeed the reason of https://www.python.org/dev/peps/pep-0479/#rationale, although in our case it was used intentional. However, after reading the PEP, the current behavior for preview_word can be considered as a bug, so the exception was changed (and other code adapted). Now everthing works out fine.

comment:4 Changed 4 months ago by tscrim

  • Cc chapoton added
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM (there is no way I see the failure on the patchbot as being related to this ticket).

Frédéric, I am cc-ing you just so you are aware of this ticket.

comment:5 Changed 4 months ago by vbraun

  • Branch changed from u/dkrenn/fsm-py3 to 3b1d45f8b6a5351ad7b961fb2a9b4a9277f80b40
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.