Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21266 closed enhancement (fixed)

py3: get rid of iterkeys

Reported by: chapoton Owned by:
Priority: major Milestone: sage-7.4
Component: python3 Keywords:
Cc: cheuberg Merged in:
Authors: Frédéric Chapoton Reviewers: Jori Mäntysalo
Report Upstream: N/A Work issues:
Branch: 4a3b20f (Commits) Commit:
Dependencies: Stopgaps:

Description (last modified by chapoton)

as a step towards py3, do not use iterkeys

(there remains 3 more subtle uses of iterkeys)

I have also taken the opprtunity to remove deprecated code in src/sage/combinat/finite_state_machine.py

Change History (10)

comment:1 Changed 3 years ago by chapoton

  • Branch set to u/chapoton/21266
  • Commit set to 12a7c62e6139bb2dfd166413b205df83efc382af
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

12a7c62py3: getting rid of iterkeys()

comment:2 Changed 3 years ago by chapoton

  • Description modified (diff)

comment:3 Changed 3 years ago by jmantysalo

  • Reviewers set to Jori Mäntysalo

I can check this.

comment:4 Changed 3 years ago by jmantysalo

  • Status changed from needs_review to needs_work

Otherwise there are no problems, but I got an doctest error from _color_by_label() of generic_graph.py.

I guess that happens because of change at src/sage/graphs/base/c_graph.pyx, but of course the real problem is getting a list when we mathematically have a set. I suggest you change docstring to have some in statements (see for example test block of is_dismantlable() on lattices.py) or use sorted(). It is enought for a function starting with _.

(And I think that this is a real problem for example blocks on some functions.)

comment:5 Changed 3 years ago by git

  • Commit changed from 12a7c62e6139bb2dfd166413b205df83efc382af to 4a3b20f54da5c7aceb6a4310d940d48fac213b4b

Branch pushed to git repo; I updated commit sha1. New commits:

3c85228Merge branch 'u/chapoton/21266' in 7.4.b1
4a3b20ftrac 21266 trying to fix doctests in generic_graph color_by_label

comment:6 follow-up: Changed 3 years ago by chapoton

Does this fix the problem ?

comment:7 Changed 3 years ago by chapoton

  • Status changed from needs_work to needs_review

seems ok now

comment:8 in reply to: ↑ 6 Changed 3 years ago by jmantysalo

  • Status changed from needs_review to positive_review

Replying to chapoton:

Does this fix the problem ?

Yes.

comment:9 Changed 3 years ago by vbraun

  • Branch changed from u/chapoton/21266 to 4a3b20f54da5c7aceb6a4310d940d48fac213b4b
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:10 Changed 3 years ago by dkrenn

  • Cc cheuberg added
  • Commit 4a3b20f54da5c7aceb6a4310d940d48fac213b4b deleted

Thanks for the clean-up in finite_state_machines. :)

Note: See TracTickets for help on using tickets.