New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change sage.combinat.combinat.combinations() to use Combinations #13821
Comments
Author: Punarbasu Purkayastha |
comment:1
The attached patch implements this change. |
This comment has been minimized.
This comment has been minimized.
comment:2
Why not deprecate the function? Does this depend on #5288 getting merged into sage? Thanks, Travis |
comment:4
My guess is that it was from the old code (before |
comment:5
Ok. I have put deprecation in the functions and done a bunch of cleanups. There is a second patch which replaces all the calls to |
This comment has been minimized.
This comment has been minimized.
Reviewer: Travis Scrimshaw |
comment:6
A few more documenation things:
as it will output in the html
Thus either remove the period or put a space between the period and the colon (i.e. as Thanks, Travis |
Apply to devel/sage |
comment:7
Attachment: trac_13821-change_combinations.patch.gz Thanks for the review. These issues should be fixed now. Patchbot: apply trac_13821-change_combinations.patch trac_13821-replace_combinations.patch |
comment:8
Looks good to me. Thanks. |
Dependencies: #13723 |
comment:9
This needs to be rebased on top of #13723. |
comment:10
Replying to @jdemeyer:
This should be fixed now. Only change needed was the removal of an import. |
comment:11
There are two doctest failures coming from #11763:
and
|
Attachment: trac_13821-replace_combinations.patch.gz Apply to devel/sage after above patch |
comment:12
Updated the patch. I will set it to positive review if the patchbot turns green with envy. |
comment:13
ppurka: this is a change which requires an actual review. |
comment:14
Replying to @jdemeyer:
I don't mind. But the patchbot seems to have failed in exactly the same position. This is unexpected. I didn't see any other use of Moreover, my local testing gave no errors on those files. |
comment:15
From the patchbot logs:
Why is it using the old patches? Shouldn't it be trying with the new patches? |
comment:16
patchbot apply trac_13821-change_combinations.patch trac_13821-replace_combinations.patch |
comment:17
Works for me as well:
(For whomever is interested, the replace patch depends on #13503) I've had this issue of the patchbot using old patches come up a few places before. I've kicked the patchbot, so hopefully next time the patchbot will pass all tests. Since the tests pass for me, I'm going to set this to positive review. |
comment:18
Thanks. I didn't know it was a more common occurrence with the patchbot. It looks like it doesn't clear the queue while applying new patches. |
comment:19
@kini - can you have a look at the patchbot? I think you are one of the few people who know how it works. |
comment:20
Hmm, I have no idea. I tried running my 5.6.beta0 patchbot on it but it failed even more strangely. Building 5.6.beta1 now to try that... |
comment:22
It should apply fine to beta0, since it applies fine to beta1. Anyway, the patchbot seems to have caught up or kini did some miracle! :) |
comment:23
I didn't do anything. Vanilla 5.6.beta1 doesn't even pass tests on my machine, and my patchbot failed to apply #11763 to beta0 for some reason. Volker's patchbot is the one that came along and gave this ticket a green light. |
Merged: sage-5.6.beta3 |
As I mentioned a long time ago in #5288, the
combinations()
method is not ideal for working with Sage objects. This warning is also present in the documentation of this command. There is a much better commandCombinations
. Thecombinations
command should be made to return a list by callingCombinations
instead.The result of this change in the code will be that
Similarly,
combinations_iterator
should directly return aCombinations
object, instead of duplicating stuff.The attached patch performs this change.
Apply to devel/sage in this order:
Depends on #13723
Depends on #11763
Depends on #13503
CC: @sagetrac-sage-combinat @kini
Component: combinatorics
Author: Punarbasu Purkayastha
Reviewer: Travis Scrimshaw
Merged: sage-5.6.beta3
Issue created by migration from https://trac.sagemath.org/ticket/13821
The text was updated successfully, but these errors were encountered: