-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEPR: deprecate exposing blocks in core.internals #55139
DEPR: deprecate exposing blocks in core.internals #55139
Conversation
doc/source/whatsnew/v2.2.0.rst
Outdated
- Changed :meth:`Timedelta.resolution_string` to return ``h``, ``min``, ``s``, ``ms``, ``us``, and ``ns`` instead of ``H``, ``T``, ``S``, ``L``, ``U``, and ``N``, for compatibility with respective deprecations in frequency aliases (:issue:`52536`) | ||
^^^^^^^^^^^^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc issue
As mentioned in #40226, pyarrow accesses DateimeTZBlock, but never instantiates it. So in theory that use case could easily be kept without a full working class. Now, the only reason we were using it was to pass it to |
If there are no more comments, I plan to merge this in a week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't comment on the exact line, but can you fix the stacklevel
to 2 for this DeprecationWarning?
Updated. Can you confirm this is what you have in mind |
Yep, that's what I meant |
Motivation: tried to clean up the blocks code bc DatetimeTZBlock and DatetimeLikeBlock are no longer really needed. Found that we can't do that bc DatetimeTZBlock is exposed in the pseudo-public API. That got me looking at
internals.__init__
, where comments suggest that we are importing the block subclasses for io.pytables (which no longer needs them) and io.packers (which no longer exists). So we could remove them directly, but apparently a recent PR deprecated NumericBlock and ObjectBlock so this piggy-backs on that deprecation (and adds a missing test).In internals.api I need to deprecate DatetimeTZBlock in order to eventually get rid of it entirely. Also deprecating Block and ExtensionBlock is orthogonal just to wean downstream packages off of them.
cc @jorisvandenbossche
xref #40226