-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Forthcoming dateutil code reorganization #18141
Comments
Thanks for the heads up! We test against dateutil master in one of our jobs (here), so we should be able to catch these and patch them in pandas quickly. Do you have a rough plan for the next dateutil release? |
@TomAugspurger I'm trying to finalize some things, I want to get |
Thanks. If pandas doesn't have another release in that timeframe I can
backport any necessary fixes and to a quick 0.21.1 release.
…On Mon, Nov 6, 2017 at 10:43 AM, Paul Ganssle ***@***.***> wrote:
@TomAugspurger <https://github.com/tomaugspurger> I'm trying to finalize
some things, I want to get isoparse in there and possibly a few
improvements to the time zones. I am hoping a new feature release before
the end of the year. I usually finalize a release on master and let it sit
for a week or so, I can ping you when that happens so you'll have some
notice.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18141 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIkrd2Jf6fILc5MxUHvvNTNmdlihwks5szzc0gaJpZM4QTdJk>
.
|
@pganssle I'm -1 on rushing the isoparse. The best-case scenario is that the dateutil implementation can drop-in replace the As for pandas accessing dateutil internals, there are a couple of workarounds pandas uses that we can probably make unnecessary: https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/parsing.pyx#L207, https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/parsing.pyx#L315 Note the tail end of tslibs.parsing.dateutil_parse is almost identical to _build_tzinfo from dateutil#493. |
I'm not really planning on "rushing" the isoparse implementation, but at the end of the day because it's spec-driven, a lot of the behavior questions are actually made ahead of time (assuming we stick to the spec). The main question then comes down to the public API, and decisions about that can always be pushed off to later by releasing a highly constrained version (e.g. the only supported interface is In any case, I'd like some form of it to be in dateutil 2.7.0. |
@jbrockmendel I would also guess that a lot of this stuff will have to be in conditional import logic or something, unfortunately. I suspect it could cause a decent number of problems if pandas bumped their dependency to the latest version of |
@pganssle if you are moving things to private methods please deprecate first; simply moving will break lots of outstanding installs. |
@jreback I'm not moving things to private methods, I'm moving private functions/classes (i.e. in the physical layout of the code). I've pulled out the reorganization portion of the isoparser PR into dateutil/dateutil#501 so it's easier to see what's happening. Basically, if you're calling |
what i am saying is if you are changing your publicly exposed functions you should deprecate |
@jreback pandas should not be affected by the changes pganssle is discussing, with the exception of the private import of |
@pganssle it probably only seems rushed to me because I haven't made time to look it over closely. Will do so this evening. |
@pganssle we should patch this on the pandas side |
It's fine for packages to change private methods without a deprecation
cycle. Let's see how bad the breakage actually is.
…On Tue, Nov 7, 2017 at 8:21 AM, Jeff Reback ***@***.***> wrote:
@pganssle <https://github.com/pganssle> we should patch this on the
pandas side
but the issue is that the upstream needs to deprecate or completely break
existing installations which is not nice
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18141 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIu9ITCzGPRiA59X9xHivyAgAVxkTks5s0GdsgaJpZM4QTdJk>
.
|
I'm sure some people will break if they are relying on the private interface, that's a consequence of Python's philosophy of "nothing is really private", but I think there's a better than average chance that anyone who notices / pays attention to Not saying things won't break out there, just saying that deprecation warnings (which aren't even on by default) probably won't mitigate this by much. In the short term people can pin their dependencies until they fix their fragile code. Worst case scenario, the library is BSD licensed, so there are no viral concerns from vendoring it. That said, for some of the stuff where I'm actually planning on exposing it publicly anyway ( |
@pganssle that is exactly what we did for lots of things in pandas over the last year expecting users to upgrade another package just to fix a misuse is not great |
note that something is wrong in dateutil master already we are probably using a private module and have been for quite some time |
@jreback Well, it's not great in general that people count on private interfaces. I understand why it's done in this case (and in fact I'm working to remedy that by exposing some of these in a way that I'm comfortable supporting), but at the end of the day any such private interface calls will necessarily be fragile. They're private because they're implementation details, not to be relied upon. In any case, my point was mostly that the situation is what it is. DeprecationWarning won't prevent you from needing to update pandas if you want the latest That said, I'll try to go the deprecation route with some of the bigger things. |
Hm... This one should 100% work: https://travis-ci.org/pandas-dev/pandas/jobs/298549012#L2964 We even test for that: https://github.com/dateutil/dateutil/blob/master/dateutil/test/test_imports.py#L35 |
@pganssle it’s not that i care about deprecation per se further i would suggest bumping the major version number in any event |
your current setup on master is not installing
needs to be added here (or can use
|
Thanks, good catch. I should probably set up the tests so that they install and run the installed version rather than running straight from the repo, to avoid this sort of problem. |
yep, we do this explicity as a travis test: https://github.com/pandas-dev/pandas/blob/master/ci/install_travis.sh#L158 |
so I just merged #18172 which restores our build where we use dateutil from master (fixed by @pganssle in dateutil/dateutil#507) We have a couple of failures. These must be some changes in dateutil as we pass vs 2.6.1. These generally look ok, and we should simply update our tests conditional on the dateutil version. https://travis-ci.org/pandas-dev/pandas/jobs/299303619
|
https://travis-ci.org/pandas-dev/pandas/jobs/302975078 looks like more changes in master on dateutil, including deprecation of _timelex. |
xref pandas-dev#18141 (cherry picked from commit 40fd6b4)
@pganssle is there a direct replacement for |
@jreback It's not that it's deprecated so much as it was always private. It is an implementation detail of the public interface, which is the auto-magical Before the end of the year, I'd like to make a pretty significant refactor to Until then, I think the best thing to do would be to just vendor |
@pganssle is there still upcominig reorganization we need to watch out for here, or can this be closed? |
@jbrockmendel I think this happened some time ago already (the |
I know that
pandas
makes use of some of the private interfaces indateutil
(and I'm hoping to start adding features so that this is no longer necessary), so I thought I'd give you a heads up about a proposed changed to the organization of theparser
module that will change the location of some of the private interfaces.Basically
parser.py
will move toparser/_parser.py
, and only the public parts will be imported intoparser/__init__.py
, as part of the introduction of a dedicated ISO-8601 parser. See PR dateutil/dateutil#489 for the current discussion.The text was updated successfully, but these errors were encountered: