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.7 support #629

Closed
giampaolo opened this issue Jun 21, 2024 · 0 comments · Fixed by #635
Closed

Drop Python 2.7 support #629

giampaolo opened this issue Jun 21, 2024 · 0 comments · Fixed by #635

Comments

@giampaolo
Copy link
Owner

Statistics as of today. Python 2.7 represents 2.25% of total downloads.

$ pypinfo pyftpdlib pyversion
Served from cache: False
Data processed: 2.17 GiB
Data billed: 2.17 GiB
Estimated cost: $0.02

| python_version | download_count | percentage |
| -------------- | -------------- | ---------- |
| 3.10           | 160,511        | 60.91%     |
| 3.8            | 32,816         | 12.46%     |
| 3.12           | 18,976         | 7.20%      |
| 3.9            | 18,598         | 7.06%      |
| 3.11           | 14,820         | 5.62%      |
| 3.7            | 8,173          | 3.10%      |
| 2.7            | 5,927          | 2.25%      |
| 3.6            | 3,615          | 1.37%      |
| 3.13           | 52             | 0.02%      |
| 3.5            | 36             | 0.01%      |
| Total          | 263,524        | 100.00%    |
giampaolo added a commit that referenced this issue Jun 23, 2024
* drop Python 2.7 support (fixes #629)
* drop pysendfile support (it was Python 2.7 only)
* bump up version to 2.0.0 since we're breaking compatibility
* get rid of appveyor CI which was used to test python 2.7 on windows

Some re-implementation notes:

* unicode on python 2.7 wasn't really handled properly (it's impossible); got rid of many `str.decode("utf8")`, `unicode(path, 'utf8', 'ignore')`, `os.getcwdu()`, etc.
* use `OSError` instead of `EnvironmentError`, `IOError`, `WindowsError`, `select.error`, `socket.error`
* replace `EEXIST`, `ENOENT`, etc. with `FileExistsError`, `FileNotFoundError`, etc.
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 a pull request may close this issue.

1 participant