Opened 4 years ago

Closed 3 years ago

#25778 closed enhancement (fixed)

py3 really remove __cmp__ in lazy_import.pyx

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

Status badges

Description

sequel of #21247, 2 years later

Change History (9)

comment:1 Changed 4 years ago by chapoton

  • Branch set to u/chapoton/25778
  • Commit set to 50a7ae47d7f1409721859f44e94b9d73b41365de
  • Keywords python3 richcmp added
  • Status changed from new to needs_review

New commits:

50a7ae4remove __cmp__ in lazy_import.pyx

comment:2 Changed 4 years ago by jdemeyer

  • Status changed from needs_review to needs_info

Which problem does this solve?

comment:3 Changed 4 years ago by chapoton

As you can see, this contains a call to cmp in its doctest, so the doctest is failing with python3.

comment:4 Changed 4 years ago by jdemeyer

Can't you just remove the doctest then?

comment:5 follow-up: Changed 4 years ago by chapoton

And this is the last def __cmp__ in all our code. Could you please explain what motivates you to be so cautious here ?

Last edited 4 years ago by chapoton (previous) (diff)

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

  • Status changed from needs_info to needs_review

Replying to chapoton:

And this is the last def __cmp__ in all our code.

OK, that's a very good point.

comment:7 Changed 4 years ago by jdemeyer

comment:8 Changed 4 years ago by jdemeyer

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

comment:9 Changed 3 years ago by vbraun

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