Skip to content

Conversation

@sipp11
Copy link
Contributor

@sipp11 sipp11 commented Oct 28, 2015

According to PR Request from the issue #220, I also think it's a nice idea.

Basically ripping relativedelta part out of replace() to make a new function, shift() & refactoring all related tests.

according to PR Request from issue arrow-py#220
@andrewelkins
Copy link
Contributor

Excellent, I'll review this and get it merged.

@andrewelkins
Copy link
Contributor

Looks solid. Let me do some testing locally before pushing out this breaking change.

@sipp11
Copy link
Contributor Author

sipp11 commented Oct 28, 2015

Oops, I miss something, the docs, docs/index.rst. However, docstrings are good enough, I hope.

@kdeldycke
Copy link
Contributor

💯 : this is a huge usability gain !

@pypingou
Copy link
Contributor

Would there be a way to make replace call shift so that it doesn't break backward compatibility?
Maybe with a deprecation warning in addition?

@sipp11
Copy link
Contributor Author

sipp11 commented Nov 20, 2015

@pypingou That shouldn't be a problem; however, I don't know if that's the best option. Let's hear what @andrewelkins says. I could do another PR if needed although I prefer the way this is.

@pypingou
Copy link
Contributor

@sipp11 how would it not be a problem? All the calls to .replace() will suddenly stop working, that's pretty much breaking backward compatibility :)

@sipp11
Copy link
Contributor Author

sipp11 commented Nov 20, 2015

@pypingou Sorry I might reply you too short since it should have been "That shouldn't be a problem to add deprecation warning."

For the breaking change, I'm fine either way since I've fixed them all. Code is much easier to read :)

@pypingou
Copy link
Contributor

It's easier to read and I think the change is great but breaking backward compatibility from a release to another is bad. I do think we should announce the change with a deprecation warning for a release (ideally two), then we can clean the code and get ride of .replace().

@andrewelkins
Copy link
Contributor

That makes sense. Can we add the deprecation warning?

@philiptzou philiptzou mentioned this pull request Dec 3, 2015
Replace w/shift function will be removed in next release hopefully
@sipp11
Copy link
Contributor Author

sipp11 commented May 17, 2016

Sorry that I couldn't do it sooner, but if you still need it, I restore replace functionality (to shift date) and add deprecation warning if using it. Hopefully I'll get another PR done too. I use this library too much and I hate to just pip from my fork.

Syeberman pushed a commit to Syeberman/arrow that referenced this pull request Aug 12, 2016
…d sipp11:shift

Conflicts:
	arrow/arrow.py
	tests/arrow_tests.py
@Syeberman
Copy link
Contributor

I've resolved the merge conflicts in #349

@andrewelkins
Copy link
Contributor

Thanks @sipp11 for the original PR and @Syeberman I'll check out the new PR and close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants