Skip to content
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

Refactor import datetime as import datetime as dt #569

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 29, 2023

Follow on from #568 (comment).

Refactor import datetime as import datetime as dt to avoid ambiguity between the datetime module and class:

@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

Merging #569 (a63cb1a) into master (c0e52cf) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #569   +/-   ##
=======================================
  Coverage   92.40%   92.40%           
=======================================
  Files          28       28           
  Lines        2938     2938           
=======================================
  Hits         2715     2715           
  Misses        223      223           
Files Coverage Δ
tests/test_tablib.py 98.84% <100.00%> (ø)
tests/test_tablib_dbfpy_packages_utils.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@claudep
Copy link
Contributor

claudep commented Oct 29, 2023

I'm a bit hesitant to touch dbfpy too much, as it is vendored code. I we were to update the vendored code to a more recent version, we would face a big diff. What do you think?

@hugovk
Copy link
Member Author

hugovk commented Oct 29, 2023

Good point, I'll revert.

Shall we also rename the package directory to make it more obvious this is vendored?

For example, pip has _vendor:

@claudep
Copy link
Contributor

claudep commented Oct 30, 2023

Shall we also rename the package directory to make it more obvious this is vendored?

Makes sense, as long as this doesn't introduce compatibility issues (but it should not at first sight).

@hugovk hugovk merged commit 8e2004c into jazzband:master Oct 30, 2023
21 checks passed
@hugovk hugovk deleted the refactor-import-datetime branch October 30, 2023 11:30
@hugovk
Copy link
Member Author

hugovk commented Oct 30, 2023

Shall we also rename the package directory to make it more obvious this is vendored?

Makes sense, as long as this doesn't introduce compatibility issues (but it should not at first sight).

Hmm, I guess in theory someone could be doing from tablib.packages import dbfpy...

@claudep
Copy link
Contributor

claudep commented Oct 30, 2023

That could happen, but frankly I don't see the use case. I let you judge if moving the package is worth it, considering that minor breakage.

@hugovk
Copy link
Member Author

hugovk commented Oct 30, 2023

Normally this sort of thing should be preceded by a deprecation warning, but I think we're fine here.

And the next release is set to be a major release anyway for #558, so let's go for it.

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.

2 participants