Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

Proposal: drop support to python 2.7

Open domdinicola opened this issue 5 years ago • 7 comments

If @vgrem you agree I can create a PR to address this

domdinicola avatar Jul 21 '20 15:07 domdinicola

@domdinicola might be a good idea, thanks! Although would be interested to get familiar with runtime usage statistics.

p.s. and might be slow with response since on vacation until the end of the month

vgrem avatar Jul 21 '20 17:07 vgrem

based on this https://en.wikipedia.org/wiki/History_of_Python we should be able to get rid of those since are not officially supported anymore. enjoy your vacation!

domdinicola avatar Jul 21 '20 19:07 domdinicola

Here's the pip installs for Office365-REST-Python-Client from PyPI for June 2020:

category percent downloads
3.7 78.80% 32,146
3.6 12.61% 5,144
3.5 5.80% 2,367
3.8 1.80% 736
2.7 0.58% 235
null 0.39% 161
3.4 0.01% 6
Total 40,795

Source: pip install -U pypistats && pypistats python_minor Office365-REST-Python-Client --last-month

hugovk avatar Jul 22 '20 13:07 hugovk

Since between 3.6 and 3.7 we reach more than 90%, I think we can drop 3.5 and 2.7 (3.4 is already not supported) https://github.com/vgrem/Office365-REST-Python-Client/pull/233

domdinicola avatar Jul 22 '20 14:07 domdinicola

This is probably a good time to drop Python 2:

  • Stats shows we can drop Python < 3.7
  • Requests only supports 3.7+
  • There are several typing improvements in Python 3
  • Adding async support would need Python 3
  • There are already f-strings used in several places (not intentional)
category percent downloads
3.9 52.46% 2,456,724
3.8 27.40% 1,283,225
3.7 9.65% 451,871
3.10 6.56% 307,105
3.11 2.57% 120,140
3.12 0.00% 221
null 0.80% 37,480
3.6 0.50% 23,574
2.7 0.05% 2,464
3.5 0.00% 46
3.3 0.00% 3
3.4 0.00% 3
Total 4,682,856

kellerza avatar Oct 05 '23 06:10 kellerza

@domdinicola still interested to work this? (It's hacktoberfest after all :wink:)

I've done some typing improvements (#747) and will try to get the most of the static checks passing. Once passing, it's probably a good time to do this. The new typing format is very similar to what we'll use in Python 3, but since it's still supported in Python 3 we don't have to convert everything in one PR. To keep it smaller, probably removing compat.py would be the best start

@vgrem suggested to move to v 3.0.0 of the library

kellerza avatar Oct 05 '23 07:10 kellerza

@kellerza agree, if needed I could help with this.

domdinicola avatar Oct 05 '23 11:10 domdinicola