#26837 closed enhancement (fixed)
py3: Fix combinat.designs module for python3 (final)
Reported by: | vklein | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.5 |
Component: | python3 | Keywords: | |
Cc: | chapoton | Merged in: | |
Authors: | Vincent Klein | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | 069a55f (Commits) | Commit: | |
Dependencies: | Stopgaps: |
Description (last modified by )
Fix the remaining python3 errors in combinat.designs module :
- fix interface bewteen python3 and expat xml parser.
- replace some
map
usage with list comprehesion. The former map usage resulting in empty lists and therefore multiple errors. - fix sorting issues in
IncidenceStructure.__init__
Errors fixed :
sage -t --long src/sage/combinat/designs/ext_rep.py # 11 doctests failed sage -t --long src/sage/combinat/designs/bibd.py # 6 doctests failed sage -t --long src/sage/combinat/designs/difference_family.py # 6 doctests failed sage -t --long src/sage/combinat/designs/database.py # 6 doctests failed
Change History (9)
comment:1 Changed 2 months ago by
- Branch set to u/vklein/26837
comment:2 Changed 2 months ago by
- Commit set to 069a55ffb1c3f0f460b78d5d6ef37a9b86f821f1
- Description modified (diff)
- Status changed from new to needs_review
- Summary changed from py3: Fix combinat.designs module for python3 to py3: Fix combinat.designs module for python3 (final)
comment:3 Changed 2 months ago by
- Description modified (diff)
- Reviewers set to chapoton
comment:4 Changed 2 months ago by
- Cc chapoton added
- Reviewers chapoton deleted
comment:5 Changed 2 months ago by
- Reviewers set to Frédéric Chapoton
green patchbot => positive review
comment:7 Changed 2 months ago by
Merci!
comment:8 Changed 2 months ago by
- Branch changed from u/vklein/26837 to 069a55ffb1c3f0f460b78d5d6ef37a9b86f821f1
- Resolution set to fixed
- Status changed from positive_review to closed
comment:9 Changed 2 months ago by
- Commit 069a55ffb1c3f0f460b78d5d6ef37a9b86f821f1 deleted
This change doesn't quite work:
- self._points = sorted(points) - if self._points == list(range(len(points))) and all(isinstance(x,(int,Integer)) for x in self._points): + # if points are tuple, sort None before int types and str after int types + sortkey = lambda e: [(0 if x is None else 2 if isinstance(x, str) else 1, x) for x in e]\ + if isinstance(e, tuple) else e + self._points = sorted(points, key=sortkey)
See #26938.
Note: See
TracTickets for help on using
tickets.
New commits:
Trac #26837: Fix combinat/designs module for python3: