Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3: finite state machines #27679

Closed
dkrenn opened this issue Apr 16, 2019 · 8 comments
Closed

py3: finite state machines #27679

dkrenn opened this issue Apr 16, 2019 · 8 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Apr 16, 2019

Fix the remaining Py3 issues in sage.combinat.finite_state_machine

Depends on #27667

CC: @fchapoton

Component: python3

Author: Daniel Krenn

Branch/Commit: 3b1d45f

Reviewer: Travis Scrimshaw

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

@dkrenn dkrenn added this to the sage-8.8 milestone Apr 16, 2019
@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2019

Branch: u/dkrenn/fsm-py3

@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2019

Commit: 3b1d45f

@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2019

comment:2

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

@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2019

Dependencies: #27667

@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2019

comment:3
0f53650 fix sorting in full_group_by
47c8358 fix 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.

01b5429 minor code rewrite (PEP8 etc) in full_group_by

Non-Py3 related.

3b1d45f fix 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.

@tscrim
Copy link
Collaborator

tscrim commented Apr 17, 2019

comment:4

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.

@tscrim
Copy link
Collaborator

tscrim commented Apr 17, 2019

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Apr 27, 2019

Changed branch from u/dkrenn/fsm-py3 to 3b1d45f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants