Opened 11 years ago
Closed 11 years ago
#7803 closed defect (fixed)
DeprecationWarning: the sets module is deprecated
Reported by: | cschwan | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.4.4 |
Component: | build | Keywords: | warnings |
Cc: | sage-combinat | Merged in: | sage-4.4.4.alpha0 |
Authors: | Christopher Schwan | Reviewers: | Andrey Novoseltsev |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
I read this warning everytime I start Sage, so I have prepared a simple patch which replaces "Set" with the built-in type set. The patch must be applied inside sage-4.3.spkg and changes the file sage/combinat/matrices/latin.py.
I should mention that I did not built Sage from Sage's makefile alone but from a gentoo ebuild written by myself - using upstream Sage does not yield this warning. Anyway, since "sets" was deprecated since Python 2.6 this should be fixed.
Attachments (2)
Change History (9)
Changed 11 years ago by
comment:1 Changed 11 years ago by
- Summary changed from DeprecationWarning: the sets module is deprecated to [with patch needs review] DeprecationWarning: the sets module is deprecated
comment:2 Changed 11 years ago by
- Cc sage-combinat added
- Milestone set to sage-4.3.3
- Status changed from new to needs_review
comment:3 follow-up: ↓ 4 Changed 11 years ago by
- Status changed from needs_review to needs_work
- Work issues set to patch does not apply and does not have the standard commit message
I cannot apply this patch, I get the following:
novoselt@sage:/scratch/novoselt/sage-4.3.5/devel/sage-main$ hg qimport http://trac.sagemath.org/sage_trac/raw-attachment/ticket/7803/sage-4.3-fix-deprecation-warning.patch adding sage-4.3-fix-deprecation-warning.patch to series file novoselt@sage:/scratch/novoselt/sage-4.3.5/devel/sage-main$ hg qpush applying sage-4.3-fix-deprecation-warning.patch unable to find 'combinat/matrices/latin.py' for patching 3 out of 3 hunks FAILED -- saving rejects to file combinat/matrices/latin.py.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh sage-4.3-fix-deprecation-warning.patch
I checked that the file is actually still there (and the above commands work fine for other patches).
Also, it seems that there is no user information and commit message with the ticket number in the patch file.
comment:4 in reply to: ↑ 3 Changed 11 years ago by
Replying to novoselt:
I cannot apply this patch, I get the following:
novoselt@sage:/scratch/novoselt/sage-4.3.5/devel/sage-main$ hg qimport http://trac.sagemath.org/sage_trac/raw-attachment/ticket/7803/sage-4.3-fix-deprecation-warning.patch adding sage-4.3-fix-deprecation-warning.patch to series file novoselt@sage:/scratch/novoselt/sage-4.3.5/devel/sage-main$ hg qpush applying sage-4.3-fix-deprecation-warning.patch unable to find 'combinat/matrices/latin.py' for patching 3 out of 3 hunks FAILED -- saving rejects to file combinat/matrices/latin.py.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh sage-4.3-fix-deprecation-warning.patchI checked that the file is actually still there (and the above commands work fine for other patches).
The command fails because the patch was not generated with mercurials diff command (at the time I reported I did not know that you had to use mercurial for generating patches). So the command works if you use the standard patch command: patch < patchfile.patch - which course overwrites the original files. I will upload an hg-ified patch later.
I can also clarify the need of this patch: If one updates ipython and runs testcases without this patch a lot of testcases will fail because python now prints deprecation warnings.
Also, it seems that there is no user information and commit message with the ticket number in the patch file.
Changed 11 years ago by
comment:5 Changed 11 years ago by
- Status changed from needs_work to needs_review
Making new attachments does not create "ticket update" messages, so I didn't know that a new version is added. As I understand, this is now ready for review, so I'll go ahead and change the status.
comment:6 Changed 11 years ago by
- Reviewers set to Andrey Novoseltsev
- Status changed from needs_review to positive_review
- Summary changed from [with patch needs review] DeprecationWarning: the sets module is deprecated to DeprecationWarning: the sets module is deprecated
- Work issues patch does not apply and does not have the standard commit message deleted
While I do not see waring messages anyway, the changes are transparent and are for the good. All doctests pass with 4.4.2.
comment:7 Changed 11 years ago by
- Merged in set to sage-4.4.4.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
The patch looks good to me. I'll try to launch the doctests shortly, but if someone beats me to it, and finds no issue, feel free to put a positive review.