-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Make set_option into a contextmanager that undos itself on __exit__ #5625
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
Conversation
I don't have a problem with the metaclass here, it seems like the only way and clean enough.
|
Note that the dynamic docstring code I implemented solves a problem that we never had.
Look ma, no metaclasses. |
@y-p okay. In working on this, I realized that config_prefix was actually broken, you can pass: I guess this also doesn't work with nested |
That makes sense, the support for additional args was added only later, which created the potential Anyway, the set_option context manager bit is good, murge iiit! |
@y-p do you want me to split the changes to config_prefix apart from making set_option into a contextmanager? |
If you can, that'd be better. it's a seperate issue. |
0.14? |
yes. On Thu, Dec 5, 2013 at 6:43 PM, jreback [email protected] wrote:
|
@jtratner, apologies if my notes were too fussy. Remember... |
new logo :) |
That's great! |
@y-p - no no it's just because I've been incredibly busy (interviewing and |
also that image is great! |
thecodinglove.com borders on medically required at times. @jtratner, I'm working to close a bunch of little stuff to earn my keep around here. |
go ahead and do it - fine with me! I really want to finish up the |
OT: anyone thing ought to do a rc2? (or put one up for say 5 days, with no more changes) (I wont! :) seems windows builds are keeping up (@y-p your doing?) |
I'd be +1 on rc2. I would also strongly advocate for freeze on features for |
I was thinking the exact same thing. RC2 or just push back final until no reports come in for a fix num of days. @jtratner, good I'll take it. also, I've been nagging about a feature freeze since rc1 anyway, I thought we already had one in effect? :) |
@y-p I know ...been trying to just do bug fixes...have to draw the line though |
@y-p maybe one of us should email pandas-dev to announce an official feature freeze? (and then possibly create a maintenance branch for 0.13) |
I'm happy to write up the email if there's agreement. |
@jtratner I sent an e-mail about rc2 to pandas-dev...you didn't get it? |
no, I didn't see anything... |
@jtratner weird......gmail claims it was sent..... |
just got it now |
I would argue that if we can keep releases timely, we can avoid working on multiple branches. In the past there were 0.x.1 bugfix releases but that hasn't happened in a while and things haven't collapsed, |
I agree..... This has been a 'bigger' release simply because more moving parts. So far so good IMHO, no major reports (of course prob not THAT widespread use for a rc)...but did get some reports. as I said on the mail-list.....I think rc2 would be worthwhile for say a week or so. |
well, let's see how we do in the next few days. I think it's hard to tell |
oh, if it's just another week then no need for separate branch. I was |
I think could release now, but let's giev a rc2 just for anything else to come up |
PRs on hold for two-three weeks is not that bad, some of them take a week or two of iteration anyway. |
closing in favor of #5752 |
Fixes #5618
cc @y-p and @jseabold
I went ahead and simplifed all the prefixing stuff to just change a single
prefix_key
function instead and handled the dynamic docstring by setting the__doc__
attribute of functions/classes. set_option is now callable and a contextmanager (whee!) so no need to add anything else to the global namespace (if you don't call__exit__
it doesn't undo itself)Had to add a metaclass to this because it's the only way to set docstrings on the class level. Doesn't really add that much noise so I think it's fine.