-
Notifications
You must be signed in to change notification settings - Fork 229
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
Python 2 end of life #1460
Comments
Ouch, that is bad news. It is going to require a lot of work to do updates but I agree that deprecating 34 lessons (I did not realize it was that many) all of a sudden is not ideal. Off the top of my head right now, would it be plausible to put a call for updating lessons X-number at a time? Maybe a few people are willing to workaround the update without the need to write the whole lesson? Since I don't work with Python and, thus, I have not used these lessons, did you use any application that runs on Python 2 that you anticipate/know will not be updated to run on Python 3? Could those be deprecated? |
If the lessons are just using the standard Python library, then it might not be that much work to update them. But if the lessons depend on an external library (like Beautiful Soup or something similar), then that is a different question that we'll have to handle on a case-by-case basis I think. If that library hasn't itself been updated to Python 3 then we probably won't have any choice but to deprecate those lessons. |
@walshbr expressed my concern/idea better, thanks! |
Oh sorry @jenniferisasi I think we were typing at the same time and I didn't see your response. :) |
We should probably start with an audit of which lessons are affected. Can anyone on the Spanish or French teams responsible for deciding on priorities make sure Python lessons that may be affected are not chosen for translation until we sort this out? |
Key differences between Python 2 and 3: https://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html |
There is also a third translation in French that is ready but were not able to edit yet. But yes, we can put further translations in standby. |
@acrymble if you add me as a collaborator I would be happy to help you migrate a few lessons to Python 3. I know the paths well. |
I might also be able to help with a few. Maybe we can set up a mechanism where volunteers can claim articles they are updating, so that we don't accidentally update the same lesson twice? Maybe as a wiki page, here in the issue, or by creating one issue per lesson? |
Thanks @sgillies and @frederik-elwert for getting in touch. We've got a workflow of submitting changes via pull request (https://github.com/programminghistorian/jekyll/wiki/Making-Technical-Contributions) which I believe anyone can already do. Before we get started, is this l ikely to involve considerable changes, or are they generally minor code syntax things? I want to make sure we approach this the right way. So if it's just a few changes to code blocks then that's relatively easy. If we have to re-write explanations we might have to think about re-testing each lesson using our reviewing processes. |
I would have to check the details, but I assume in most cases it would be minor syntax changes. In some cases, “modern” Python 2 could be run under Python 3 without changes. I guess the most disrupting changes would be related to external modules. Maybe it would even be possible to semi-automate this by extracting the code parts and running Python’s conversion utility |
Okay, I created a small script that tries to make the required changes automatically by using 2to3. It will still require manual inspection, but might be helpful: https://gist.github.com/frederik-elwert/c99ceee72293035aeef05ccbb53dea83 Call like this: python3 md2to3.py -w en/lessons/extracting-keywords.md |
This is a tricky one: https://programminghistorian.org/en/lessons/transliterating I created a separate issue #1471 for it. |
@frederik-elwert would you be willing to run your script on a few more of the above lessons, and I'll re-test them manually? |
Yes, that's the plan. Unfortunately, I currently don't have too much time to spend and I got stuck with the transliteration lesson that needs a major rewrite. But I'll try to push things one by one.
If we had a few more volunteers, maybe we could have something like a virtual hackathon? Might be a way to create a bit more momentum.
|
Okay, I guess it’s a good idea to start with the basic introduction, i.e. One key question: The install introduction, but also other lessons, refer to Komodo Edit as the preferred editor, including screenshots. Is this still the best option? It seems a bit marginal today. (I personally use Sublime Text a lot, but Visual Studio Code might be a better option, also because it’s Free/OpenSource.) The other question: I could update the install instructions for Linux, but would somebody else be willing to do the same for Windows/Mac? Also, the lesson has been translated to Spanish. How do we coordinate the translations? I guess starting with the English one is not bad, but it would be desirable to let the other languages not lag behind. |
@frederik-elwert thanks for this. I think in the first instance what we need to do is to identify any lessons that are already Python3 compatible, so we can remove them from the list. I agree that the setting up an integrated development environment series in particular may need a new lesson, but I would suggest the best approach there is simply a new lesson going through peer review. The others, from memory, I think will be fine with more minor changes, and shouldn't require many new screenshots. Is there a way we can get a yes/no this lesson's code examples are fine for Python3? |
Keeping in mind the idea that the setup lessons may need to be re-written, I've started going through the original python lessons to identify ones that don't need updating because the code is already fine (using the script provided by @frederik-elwert). I've adjusted the list above to reflect the lessons that don't need fixing, and have submitted 3 pull requests to fix both the Spanish and English versions of code for specific lessons. I've asked for reviews for those from our respective managing editors, so that they have control over the publication. #1493 #1494 #1495 |
Okay, here’s a pull request for the Intro and Install on Linux lesson of the original English series: #1501. |
Just to prevent duplicate work: I started updating https://programminghistorian.org/en/lessons/downloading-multiple-records-using-query-strings. |
Can anyone with WINDOWS help update the https://programminghistorian.org/en/lessons/windows-installation lesson please? I don't have a machine I can test it on. It only needs updating to point to Python3 resources instead of 2.7. This should be a 15 minute fix. I would appreciate someone coming forward. @programminghistorian/project-team |
I am unable to update the following Spanish language lessons because of my lack of language skills:
Can anyone on @programminghistorian/spanish-team help with this? I estimate each one is a 15 minute fix. I can Skype you to talk you through it. |
Hi, Adam - Do you want me to see if one of my colleagues in Computer
Science would be interested in having students update the lesson?
…On Tue, Nov 19, 2019 at 7:52 AM Adam Crymble ***@***.***> wrote:
Can anyone with WINDOWS help update the
https://programminghistorian.org/en/lessons/windows-installation lesson
please? I don't have a machine I can test it on. It only needs updating to
point to Python3 resources instead of 2.7. This should be a 15 minute fix.
I would appreciate someone coming forward.
@programminghistorian/project-team
<https://github.com/orgs/programminghistorian/teams/project-team>
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#1460?email_source=notifications&email_token=AFNO4W4Z4S7NJTU3HOE2NPLQUPOPTA5CNFSM4I2B62ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEOCVGQ#issuecomment-555494042>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNO4WZ7IKQIXOXI7ODEPEDQUPOPTANCNFSM4I2B62ZA>
.
|
As long as you don't think it will make more work for you. Thanks. |
@JoshuaGOB, can you help with this? It seems that you are the most Python-proficient editor in the Spanish team. It's around 1 hour work. |
I can start on it today.
…On Tue, Nov 19, 2019 at 5:19 PM Riva Quiroga ***@***.***> wrote:
@JoshuaGOB <https://github.com/JoshuaGOB>, can you help with this? It
seems that you are the most Python-proficient editor in the Spanish team.
It's around 1 hour work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1460?email_source=notifications&email_token=AIYRWJ3MVQHOCHCG5KZUJL3QURYAHA5CNFSM4I2B62ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEQD37Q#issuecomment-555761150>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIYRWJ4VWEP7W2BTSJMUI6LQURYAHANCNFSM4I2B62ZA>
.
--
*Joshua G. Ortiz Baco *
Graduate Research Assistant
LLILAS Benson DS Lab Manager
Digital Scholarship Office
University of Texas at Austin
|
Quick question: Are there any objections to removing the Komodo Edit section in:
I can't see the relevance for those intro sections but I can see how the mismatch between the images and updated versions of Komodo might confuse readers. Since these are translations I wanted to emulate whatever was in the original but I see that the originals haven't been updated for the Python 3 changes either. Please advise. |
I was unsure about the Komodo section as well. But in the end I wanted to separate the Python3 update from other revisions, so I kept most things as they were. You can see, however, that I did update the screenshots for the Linux installation: https://programminghistorian.org/en/lessons/linux-installation It might be good to do the same for Windows and Mac, but I currently don’t have access to those systems. Feel free to re-use those screenshot if using an up-to-date Linux screenshot is less confusing than an outdated Mac screenshot. |
Small changes to print function and installation justification in instalacion-mac.md #1460
@JoshuaGOB The original English ones (Mac and Linux) have been updated to Python3 and keep the Komodo edit in. |
Thank @acrymble. Would you mind checking the images in the lessons for Mac and Linux in es. I’m confused about where to put them. Thanks. |
@JoshuaGOB I believe there are only two very small changes needed to close this ticket. https://programminghistorian.org/es/lecciones/instalacion-windows Since these are the same lesson in two languages, would you be able to make the change? Then we will be fully Python3 |
Hey it looks like a new, incorrectly-named file was made: Please make sure the changes are properly incorporated into the correct file: and then delete the misspelled one |
THanks @mdlincoln I've submitted a pull request to fix this. |
* Updated Spanish text and images for Python3 #1460 * Updated images for Komodo 11 and Python3 Needed new images for the screenshots * Updated English images and texts for Python3
these last two lessons have been fixed, but I missed closing this. I believe we are now officially Python 3 compliant! |
Great job all involved. I've been watching from afar and can see this has been a big chunk of work. Chapeau. |
The majority of our older Python lessons are written in Python 2. This is now going to be deprecated at the end of 2019.
https://www.activestate.com/blog/python-2-eol-now-what/
These lessons have almost all been translated into Spanish, so any changes require changes to translated lessons as well. I'm a co-author on these, so I'd rather not see us deprecate 34 lessons. That leaves us with a question of how best to update them to be Python 3 friendly. I welcome ideas, keeping workloads in mind for all those affected.
The text was updated successfully, but these errors were encountered: