Hello all,
I have a bot written in python3.8, which uses fstrings a lot. https://realpython.com/python-f-strings/
When deployed the bot on the toolforge, found that it has python3.5
Hence cant run the bot. It cant understand the fstrings.
Is there any way we can get python version 3.6 or greater at toolforge servers?
Thanks.
You can use the Debian buster images with Kubernetes which have Python 3.7.3 pre-installed.
Best, QEDK
On Sat, Jun 19, 2021, 23:25 Shrinivasan T tshrinivasan@gmail.com wrote:
Hello all,
I have a bot written in python3.8, which uses fstrings a lot. https://realpython.com/python-f-strings/
When deployed the bot on the toolforge, found that it has python3.5
Hence cant run the bot. It cant understand the fstrings.
Is there any way we can get python version 3.6 or greater at toolforge servers?
Thanks.
-- Regards, T.Shrinivasan
My Life with GNU/Linux : http://goinggnu.wordpress.com Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com
Get Free Tamil Ebooks for Android, iOS, Kindle, Computer : http://FreeTamilEbooks.com _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
You can use the Debian buster images with Kubernetes which have Python 3.7.3 pre-installed.
I need to run the not as a cronjob in toolforge.
I think I can setup the cron on toolforge server.
This is plain python script.
I don't need docker or kubernetes for this.
Is there any way to get higher version of python at toolforge servers?
Thanks. Shrini
I don't think so, unless it's upgraded anytime soon (not sure about timelines) or sudo access is provided to you so you can build from source. Getting a hang of k8s in toolforge takes a while but it's easy once you have it set up. Here's a guide on how you can do cronjobs in k8s: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cro...
Best, QEDK
On Sun, Jun 20, 2021, 00:02 Shrinivasan T tshrinivasan@gmail.com wrote:
You can use the Debian buster images with Kubernetes which have Python
3.7.3 pre-installed.
I need to run the not as a cronjob in toolforge.
I think I can setup the cron on toolforge server.
This is plain python script.
I don't need docker or kubernetes for this.
Is there any way to get higher version of python at toolforge servers?
Thanks. Shrini
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
When I enquired about this a while ago, I was told that WMF would not install a newer python on the existing Debian Stretch hosts because there was no pre-built package for it. I ended up building my own Python 3.7 binary from source for use on the debian stretch hosts. It's actually pretty straight-forward to do if you've done that sort of thing before, but it does mean you're taking on more responsibility for maintaining it yourself.
The better news is that they do have some Debian Buster bastion hosts up and running, which have Python 3.7 installed. I'm using those now. I think they're not yet released for public use, so I'll let somebody from WMF chime in on whether it's OK for others to use, and how to access them.
And, yeah, f-strings is the killer feature of the post 3.5 releases.
On Jun 19, 2021, at 2:58 PM, QEDK qedk.en@gmail.com wrote:
I don't think so, unless it's upgraded anytime soon (not sure about timelines) or sudo access is provided to you so you can build from source. Getting a hang of k8s in toolforge takes a while but it's easy once you have it set up. Here's a guide on how you can do cronjobs in k8s: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cro... https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cronjobs
Best, QEDK
On Sun, Jun 20, 2021, 00:02 Shrinivasan T <tshrinivasan@gmail.com mailto:tshrinivasan@gmail.com> wrote:
You can use the Debian buster images with Kubernetes which have Python 3.7.3 pre-installed.
I need to run the not as a cronjob in toolforge.
I think I can setup the cron on toolforge server.
This is plain python script.
I don't need docker or kubernetes for this.
Is there any way to get higher version of python at toolforge servers?
Thanks. Shrini
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org mailto:wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org mailto:wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/ https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/_______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Hi,
You should not be running any heavy scripts (such as bots) on the bastions (login.toolforge.org and dev.toolforge.org), run them on the job grid[0] (which has Python 3.5) or in Kubernetes[1] (Python 3.7) instead.
On 6/19/21 9:58 PM, QEDK wrote:
I don't think so, unless it's upgraded anytime soon (not sure about timelines)
A job grid upgrade is in progress[2], I believe it's not being actively worked on but an upgrade is happening in the near term.
Getting a hang of k8s in toolforge takes a while but it's easy once you have it set up. Here's a guide on how you can do cronjobs in k8s: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cro... https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cronjobs
We're hoping to provide easier tooling in the future for the most common use cases, so in the future you hopefully don't even need to learn Kubernetes to run bots and other tools with it. In the meanwhile, Wikitech has examples[1] for continuous jobs and timed/cron jobs.
[0]: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Grid [1]: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Kubernetes_cro... [2]: https://phabricator.wikimedia.org/T277653
Best, Taavi (User:Majavah)
wikitech-l@lists.wikimedia.org