-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
DEPR: Add Deprecated warning for timedelta with passed units M and Y #23264
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
Merged
jreback merged 26 commits into pandas-dev:master from ryankarlos:timedelta_unit_depracated Feb 8, 2019
Merged
Changes from 1 commit
Commits
Show all changes
26 commits Select commit Hold shift + click to select a range
5eaa8d0 Adding depracated warning for units M and Y
ryankarlos 0a836d2 Added M and Y units deprecated test and whats new note
ryankarlos e890fa6 Small fixes
ryankarlos bfe74e5 Updated test
ryankarlos e5e1198 Modifications
ryankarlos d0dd551 Fixing errors in Travis tests
ryankarlos af5d761 Modified whats new doc and seperated tests in different files
ryankarlos 938c6fe Amend warnings
ryankarlos 16f8b9c remove stacklevel
ryankarlos 5a64320 Added stack level to warning
ryankarlos 3b67476 added stack_level=False to make tests pass locally
ryankarlos ab52460 Add check_stacklevel=False to test_range_kwargs_deprecated to remove …
ryankarlos 9cb51c5 Merge remote-tracking branch 'upstream/master' into timedelta_unit_de…
ryankarlos c6f82c7 Merge branch 'master' of https://github.com/pandas-dev/pandas into ti…
ryankarlos b1599a5 Added Requested changes
ryankarlos a21a6a2 Fix linting and add pytest filter warnings decorator
ryankarlos 261672e add decorator to skip pytest for python 2.7 build
ryankarlos 4010bdb Reverting changes in unrelated files - see @jorisvandenbossche comment"
ryankarlos 3f87a0b Minor changes
ryankarlos b7aedc1 Merge branch 'master' of https://github.com/pandas-dev/pandas into ti…
ryankarlos f44bae0 Reverting back to checkstacklevel=False for Timdelta as Travis was fa…
ryankarlos 5d2dceb Merge branch 'master' of https://github.com/pandas-dev/pandas into ti…
ryankarlos b745b8c set stacklevel=1 for Timedelta and remove checkstacklevel=False
ryankarlos d014f56 Merge branch 'master' of https://github.com/pandas-dev/pandas into ti…
ryankarlos ca0ea09 added requested changes and removed unused sys import - linter
ryankarlos 76497d3 reverting file - removed added line
ryankarlos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove stacklevel
- Loading branch information
commit 16f8b9c226bc41a9a35581cd54ec0c5de7168e06
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -210,7 +210,7 @@ def __new__(cls, data=None, unit=None, freq=None, start=None, end=None, | |
| if unit in {'Y', 'y', 'M'}: | ||
| warnings.warn("M and Y units are deprecated and " | ||
| "will be removed in a future version.", | ||
| FutureWarning, stacklevel=2) | ||
| FutureWarning) | ||
| ||
| | ||
| if isinstance(data, TimedeltaArray): | ||
| if copy: | ||
| | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -95,7 +95,7 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'): | |
| if unit in {'Y', 'y', 'M'}: | ||
| warnings.warn("M and Y units are deprecated and " | ||
| "will be removed in a future version.", | ||
| FutureWarning, stacklevel=2) | ||
| FutureWarning) | ||
| ||
| | ||
| if arg is None: | ||
| return arg | ||
| | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.