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

Drop python 2 support #394

Closed
wants to merge 7 commits into from
Closed

Conversation

peymanslh
Copy link
Member

Issue: #390

  • Remove support python 2 from the docs, requirements.txt, travis-ci, setup.py, tox.ini
  • Replace unicode with str
  • Remove dbfpy folder and rename dbfpy3 to dbfpy
  • Remove compat file and remove python2 packages from dependency

@peymanslh peymanslh requested a review from claudep October 4, 2019 21:47
Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This was a preliminary review, I could make a final one when we are ready to remove Python 2 support.

AUTHORS Outdated Show resolved Hide resolved
tablib/core.py Outdated Show resolved Hide resolved
tablib/formats/_dbf.py Outdated Show resolved Hide resolved
tablib/formats/_rst.py Outdated Show resolved Hide resolved
@peymanslh
Copy link
Member Author

Thanks for your review.
I fixed these issues and some other linting errors and updated my pr

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use pyupgrade to automatically upgrade syntax for Python 3. For example:

pip install -U pyupgrade
pyupgrade `find . -name "*.py" -type f` --py3-plus

setup.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 6, 2019

Codecov Report

Merging #394 into master will increase coverage by 1.46%.
The diff coverage is 88.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #394      +/-   ##
==========================================
+ Coverage   78.93%   80.39%   +1.46%     
==========================================
  Files          30       23       -7     
  Lines        2250     1658     -592     
==========================================
- Hits         1776     1333     -443     
+ Misses        474      325     -149
Impacted Files Coverage Δ
src/tablib/formats/_df.py 73.91% <ø> (-3.02%) ⬇️
src/tablib/formats/_json.py 96.87% <ø> (-0.1%) ⬇️
src/tablib/formats/_yaml.py 100% <ø> (ø) ⬆️
src/tablib/formats/__init__.py 100% <ø> (ø) ⬆️
src/tablib/formats/_xls.py 73.41% <0%> (-0.98%) ⬇️
src/tablib/formats/_csv.py 100% <100%> (ø) ⬆️
src/tablib/packages/dbfpy/dbfnew.py 97.61% <100%> (+10.11%) ⬆️
src/tablib/formats/_html.py 100% <100%> (ø) ⬆️
src/tablib/core.py 77.98% <100%> (+0.48%) ⬆️
src/tablib/formats/_tsv.py 100% <100%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44f4351...b546ab4. Read the comment docs.

setup.py Outdated Show resolved Hide resolved
@claudep
Copy link
Contributor

claudep commented Oct 19, 2019

@peymanslh I'm sorry that recent commits broke your PR. Are you available to rebase it? Otherwise I can do it too.

@hugovk
Copy link
Member

hugovk commented Oct 19, 2019

The big changes (from #398) are to move tablib into a src directory, and test_tablib.py into a tests dir.

@peymanslh
Copy link
Member Author

@claudep @hugovk
Yes, I'm working on it.

Remove support python 2 from doc, requirements.txt and config
Replace unicode with str
Remove dbfpy folder and rename dbfpy3 to dbfpy
Remove compat file and remove python2 packages from dependency
@claudep
Copy link
Contributor

claudep commented Oct 19, 2019

Many thanks for your work, I just pushed the main part in master in b3c7145 (outside of this PR) and will finish by cherry-picking the linting fixes in a separate commit.

@claudep
Copy link
Contributor

claudep commented Oct 19, 2019

Done in bdc8425. Great work!

@claudep claudep closed this Oct 19, 2019
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.

3 participants