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
Deprecation notice for Python 2.7 (and 3.5) support. Target July 2021 #720
Comments
Also, by the time this deprecation happens Python 3.5 will also be end of life. Any strong opinions on dropping support for Pythons <= 3.5 in early 2021? There isn't any code that differentiates between the Python 3 versions so there isn't any urgency to do this but it reduces the test cycle. If I do this it will happen in a number of steps:
|
Not that I have official data or anything, but I suspect that there are very few folks out there who are stuck on Python 3.4 or 3.5 (unable to upgrade to 3.6). For those who are truly stuck, I think they will be able to suffice on whatever XlsxWriter version is available that still supports their Python. |
I'm not 100% committed to dropping Python 3.4 and 3.5 support since there isn't anything in the code that depends on different Python3 versions. For what it is worth here are the download stats for that last 30 days:
As a general observation, there is still quite a large percentage using Python 2.7. |
Interesting. The number of people still using Python 2.7 is probably much, much greater. What is surprising to me is that there seem to be about as many new Python 2.7 users as there are new Python 3.6 users. I don't know how many of those 2.7 downloaders are confused newbies versus how many are die-hard Python 2 fans who think Python 3 is genuinely worse. Either way, it's fine to cut them off. The newbies will learn soon enough that they should be on Python 3; and the folks who doggedly stick to Python 2 most likely know what they're doing, at least enough to cope with the landscape they're faced with. |
@jkyeung some may also be stuck in a position where they are forced to use py2 while waiting to get approvals and provisioned environments (which can be extremely slow depending on the work sector, can't go into how long I've been waiting). I'd be more than happy to move to py3 on more than a testing basis :). Not saying this is a reason to keep py2 support but wanted to be sure it was on the radar that it's not always by choice; though I guess you could group those folks in the 'cope with' group. |
@Garoun - Fair enough, and I actually have a significant amount of 2.7 code that I have to keep in production because it was developed for an unusual platform, with a platform-specific implementation of Python. You're right, we are both stuck and just kind of coping. But it's still striking to me that the new download numbers for Python 2.7 are so high. I guess it's possible that a chunk of those downloads represent legacy hardware reaching end of life, with legacy software that still needs to run on the replacement hardware, and so you need to install legacy Python once again. |
For what it is worth I'm not dropping Python 2 support for the sake of it. I maintain the Perl version of this library back to version 5.8 (2002) and the C version as ANSI C (~1990 for Windows MSVC compatibility). Python 2 adds a small amount of additional maintenance burden but not a lot. The main reason is that a pure Python 3 version should be faster since I could drop the use of codecs and use the native UTF-8 support instead. I need to retest the performance difference but when I went in the other direction the library was about 10-15% slower. There are also benefits in terms of simplified documentation and examples. |
This is embarrassing. I totally misunderstood the download counts posted above. I didn't bother to parse this line
In my head, I thought I was looking at the number of downloads of Python itself. Maybe that's just what I was interested in seeing at the time, and it didn't occur to me where those numbers were coming from or what else they could mean. |
For what it is worth here are the current XlsxWriter download figures. Python 2.7 use is still highish:
|
Appreciate you looking into those numbers again. We're still stuck on py2 for now with plans for py3; unfortunately no set timeline due to factors outside of our control. |
Percentage downloads as of May 2021.
The Python 2 percentage is below 10% but still relatively high. This inclines me to put off the deprecation of Python 2 in XlsxWriter until January 2022. |
Using f-strings (Python 3.6+) instead of I also wonder about writing bytes instead of strings (I don't know if this would spare some time on encoding; I also don't know if this would require changing a lot of code or not). |
I've created a Python 3 test branch or XlsxWriter ( @jpmckinney I have also created a |
And for what it is worth here is the current XlsxWriter download percentages between the different Python versions:
Python 2.7 usage is < 8% and almost half of what it was last November. |
@jmcnamara The branch works for me without issue! Yeah, I think f-strings have a clearer performance difference the more substitutions there are (and might have a worse performance if there are only 1-2 substitutions). I think the most substitutions in any frequent code path is 3 in |
Python2 downloads for XlsxWriter are now below 6%. It has also been over a year since the initial deprecation notice went out and 18 months since the Python community dropped maintenance support for Python 2. I am going to start the transition to Python3 only support in the next 1-2 days.
|
Python 2 support has been dropped from main. |
Python 2 support has been dropped in the latest version of XlsxWriter (3.0.0). Closing this feature request. |
I have just added the following notice to the Changes page of the XlsxWriter docs:
If anyone has any concerns about this please raise them now.
The text was updated successfully, but these errors were encountered: