Opened 6 years ago

Closed 6 years ago

#21867 closed enhancement (fixed)

py3 get rid of one XRangeType

Reported by: chapoton Owned by:
Priority: major Milestone: sage-7.5
Component: python3 Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: 32992ba (Commits, GitHub, GitLab) Commit: 32992baa7affa5c84f58adf181fd7952d12a8cab
Dependencies: Stopgaps:

Status badges

Description

as a step towards Py3

Change History (10)

comment:1 Changed 6 years ago by chapoton

  • Branch set to u/chapoton/21867
  • Commit set to db27d8ce383f08edd0501b6fde6c6d012830ba27
  • Status changed from new to needs_review

New commits:

db27d8cgetting rid of XRangeType

comment:2 Changed 6 years ago by jdemeyer

  • Status changed from needs_review to needs_work

As I have said before, don't use six.moves.range in Cython files. It slows down everything.

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

Note that I am not using this iterator, only as the name of a type.

What else do you propose to get rid of this single XRangeType ?

Does XRangeType still work in cython with python3 ?

comment:4 in reply to: ↑ 3 Changed 6 years ago by jdemeyer

Replying to chapoton:

Note that I am not using this iterator, only as the name of a type.

Whatever you do, without any exceptions: do not use six.moves.range in Cython.

comment:5 Changed 6 years ago by chapoton

Then maybe one should check that it has not yet happened..

And you do not propose another solution..

comment:6 Changed 6 years ago by jdemeyer

Just use xrange instead of types.XRangeType.

comment:7 Changed 6 years ago by git

  • Commit changed from db27d8ce383f08edd0501b6fde6c6d012830ba27 to 32992baa7affa5c84f58adf181fd7952d12a8cab

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

32992batrac 21867 do not use six.moves.range at all in pyx file

comment:8 Changed 6 years ago by chapoton

  • Status changed from needs_work to needs_review

done, thanks

comment:9 Changed 6 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:10 Changed 6 years ago by vbraun

  • Branch changed from u/chapoton/21867 to 32992baa7affa5c84f58adf181fd7952d12a8cab
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.