-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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 is_copy (#18801) #18812
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18812 +/- ##
=========================================
Coverage ? 91.62%
=========================================
Files ? 154
Lines ? 51407
Branches ? 0
=========================================
Hits ? 47103
Misses ? 4304
Partials ? 0
Continue to review full report at Codecov.
|
pandas/core/generic.py
Outdated
@property | ||
def is_copy(self): | ||
warnings.warn("Attribute 'is_copy' will be removed in a future " | ||
"version.", FutureWarning, stacklevel=2) |
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.
Say : "is deprecated and will removed..."
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.
Also, add a test for this deprecation (both for getter and setter).
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 you add a whatsnew note in the deprecation section & a test (as @gfyoung indicates); you can put this in pandas/tests/indexing/test_chainging_and_caching.py
- Renamed 'is_copy' attribute to '_is_copy' for internal use - Setup getter and setter for 'is_copy' - Added tests for deprecation warning
acf7abd
to
9b8f2af
Compare
Hello @cbertinato! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on December 19, 2017 at 12:20 Hours UTC |
Shall I squash these commits into one and resubmit, or can we do it on the merge? |
no need to squash will be auto done on merge |
I am by no means in a rush, but just wanted to check whether this is waiting on anything else. I believe that the requested changes have been made. |
@cbertinato : There's nothing for you to do ATM, but we're currently having build issues on Travis for our |
Roger that! |
thanks @cbertinato |
When tab-completing in iPython, the I believe that |
yep that is right - PR? |
PR #18922 |
Not all tests for this branch on the fork are passing, but these are the same tests that fail for the clean master and appear to be unrelated to the changes.
References to is_copy in tests were changed to the internal attribute _is_copy assuming that, though is_copy is not meant to be a public attribute, checking the state of this attribute is necessary to check consistent internal behavior.
Closes #18801.