Re: Is python2 dead?
Hal Murray via devel : > Do you have any data on Go GC times? Yes. They're pretty miniscule. Most Go GC is performed concurrently with normal program execution, except for one stop-the-world phase that typically runs on the close order of 1ms for real production programs. https://medium.com/servicetitan-engineering/go-vs-c-part-2-garbage-collection-9384677f86f1 "Nearly all STW pauses in Go are really sub-millisecond ones. If you look more real-life test case (see e.g. this file), you’ll notice that 16GB static set on a ~ regular 16-core server implies your longest pause = 50ms (vs 5s for .NET), and 99.99% of pauses are shorter than 7ms (92ms for .NET)!" -- http://www.catb.org/~esr/;>Eric S. Raymond ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Hal Murray : > Maybe it's time to switch to Go? I've thought about it. It shouldn't be all that difficuly. I wrote a tol that would help: https://gitlab.com/esr/pytogo > How long would it take us to rewrite, from scratch, everything in ntpclients? Around three man-monts is my estimate. > I occasionally poke around in ntpq. I find it very hard to work with. I > think the others are much simpler. Yes, that's so. Most of the complexity is in ntpq. > Is the basic structure right? If we were starting from scratch, what would > pylib look like? I've learned by hard experience not to try to do a language translation and a rewrite at the same time, so this is a question I wouldn't want to broach while doing a lift. That said, I think the structure of pylib is basically sound. -- http://www.catb.org/~esr/;>Eric S. Raymond ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Gary E. Miller via devel : > > Maybe it's time to switch to Go? > > Please, no. Go is a garbage collected language. Just what NTPsec does > not need, random, unpredictable delays. We're only takling client-side as yet. -- http://www.catb.org/~esr/;>Eric S. Raymond signature.asc Description: PGP signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Hal! On Tue, 12 Sep 2023 00:00:47 -0700 Hal Murray via devel wrote: > Gary said: > > Please, no. Go is a garbage collected language. Just what NTPsec > > does not need, random, unpredictable delays. > > I was thinking of the Python code in ntpclients/ and pylib/ > Is there anything in there that is time sensitive? That could work. I wrote a Go client for gpsd from scratch. Not hard. > There are lots of ways to inject timing bumps before we get to > garbage collecting. cache, scheduler, interrupts, CPU speed, ... Any that work? > Do you have any data on Go GC times? Just what is in the doc: https://go.dev/doc/gc-guide The programmer has very little control over the GC. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgp4XtybeBuJP.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo James! On Tue, 12 Sep 2023 06:46:38 -0700 (PDT) James Browning via devel wrote: > > On 09/12/2023 12:00 AM PDT Hal Murray via devel > > wrote: > > > > > > Gary said: > > > Please, no. Go is a garbage collected language. Just what > > > NTPsec does not need, random, unpredictable delays. > > It would appear there is a way to turn off GC under runtime/, How? Link? RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpdclVCKifCv.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
On 2023-09-12 00:03, Hal Murray via devel wrote: Maybe it's time to switch to Go? The opportunity for that may have passed. There's a new ntpd-rs project writing an NTP daemon in Rust: https://github.com/pendulum-project/ntpd-rs It's certainly not a full ntpd replacement yet (e.g. no local refclock support), but they are still doing active development. -- Richard ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
> On 09/12/2023 12:00 AM PDT Hal Murray via devel wrote: > > > Gary said: > > Please, no. Go is a garbage collected language. Just what NTPsec does not > > need, random, unpredictable delays. It would appear there is a way to turn off GC under runtime/, Given this, it might be reasonable to schedule run a light GC at an odd corner of every minute and a heavier one less often. > I was thinking of the Python code in ntpclients/ and pylib/ > Is there anything in there that is time sensitive? Maybe ntpdig with time sitting or the SNMP agent? I think the premise there is everything is human speed. > There are lots of ways to inject timing bumps before we get to garbage > collecting. cache, scheduler, interrupts, CPU speed, ... > > Do you have any data on Go GC times? It is probably somewhere in the previous considerable discussion back in June/July 2021. ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Gary said: > Please, no. Go is a garbage collected language. Just what NTPsec does not > need, random, unpredictable delays. I was thinking of the Python code in ntpclients/ and pylib/ Is there anything in there that is time sensitive? There are lots of ways to inject timing bumps before we get to garbage collecting. cache, scheduler, interrupts, CPU speed, ... Do you have any data on Go GC times? -- These are my opinions. I hate spam. ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Hal! On Mon, 11 Sep 2023 22:03:45 -0700 Hal Murray via devel wrote: > Maybe it's time to switch to Go? Please, no. Go is a garbage collected language. Just what NTPsec does not need, random, unpredictable delays. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpVpLWWqTcTy.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Thanks. Maybe it's time to switch to Go? How long would it take us to rewrite, from scratch, everything in ntpclients? I occasionally poke around in ntpq. I find it very hard to work with. I think the others are much simpler. Is the basic structure right? If we were starting from scratch, what would pylib look like? -- These are my opinions. I hate spam. ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Hal Murray via devel : > Really really dead? Or maybe just hiding in some dark corner? Python 2 was end-of-lifed on 1 Jan 2020. It looks pretty dead from where I'm sitting, but I'm aware that people who run RHEL have a different opynion. > Should we drop support for python2 as part of the next release? > Or announce in the next release that we will drop it as part of the following > release? The policy I havee for my projects these days is that I leave the poly machinery in place untiil I want to do something Python 3 specific, then I drop it. I would be OK with your second alternative. -- http://www.catb.org/~esr/;>Eric S. Raymond ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Richard! On Mon, 4 Sep 2023 19:24:22 -0500 Richard Laager via devel wrote: > Dropping support for Python 2 should allow for dropping most of the > poly infrastructure. That code (pylib/poly.py) involves some > contortions (see also [1]) to make it possible to run on both Python > 2 and Python 3. And it also makes Python 3 code way easier to write. Even when I don't care about Python 2, I use the poly stuff. > If we dropped support for Python 2, that should come in a couple > phases. Phase 1 would be removing anything relating to Python 2 > itself. It should probably also include any changes relating to > Python detection with waf. Phase 2 would be /carefully/ removing > usage of the poly infrastructure, converting to idiomatic Python 3 > approaches. Once that is done, then we'd be rid of the 2 -> 3 > conversion baggage. These phases need not be separate releases, but > should (IMHO) certainly be separate commits and likely be separate > PRs. A fair plan, and a lot of work, for little added value. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpobBjBIjEeO.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
On 2023-09-04 17:38, James Browning via devel wrote: On Sep 4, 2023 14:46, Matthew Selsky via devel wrote: On Mon, Sep 04, 2023 at 02:25:46PM -0700, Gary E. Miller via devel wrote: > From RHEL: > > "The RHEL 8 AppStream Lifecycle Page puts the end date of RHEL 8's > Python 2.7 package at June 2024." > > https://access.redhat.com/solutions/4455511 Hi Gary, Is the implication that we can safely drop python2 support after June 2024? Are there any other distributions that ship python2 that we want to maintain support for? How much does it cost us to maintain python2 support in our own code? By dropping 2.6 support we would eliminate the need to check for argparse in a few place, glue to replace ordereddict?, be able to use with for resource allocatoion, and the need to pretend to test on 2.6. By dropping 2.7 we could probably assume secrets which simplifies ntpkeygen, simplify ntp.poly, be able to drop the now oldoldstable? runner testing for asciidoc on python 2 support, and also have the option of adding type hinting. Dropping support for Python 2 should allow for dropping most of the poly infrastructure. That code (pylib/poly.py) involves some contortions (see also [1]) to make it possible to run on both Python 2 and Python 3. The downside is that it is most definitely not Python 3 idiomatic. In fact, it's closer to Python 2 than Python 3. If you look at the code, you'll see that there's very little that happens in the Python 2 case and a lot more that happens in the Python 3 case. This was (presumably) a good trade-off when trying to minimize the work for an existing codebase to gain Python 3 support without dropping Python 2 support. But it does leave technical debt to be cleaned up when going full Python 3. If we dropped support for Python 2, that should come in a couple phases. Phase 1 would be removing anything relating to Python 2 itself. It should probably also include any changes relating to Python detection with waf. Phase 2 would be /carefully/ removing usage of the poly infrastructure, converting to idiomatic Python 3 approaches. Once that is done, then we'd be rid of the 2 -> 3 conversion baggage. These phases need not be separate releases, but should (IMHO) certainly be separate commits and likely be separate PRs. [1] http://www.catb.org/esr/faqs/practical-python-porting/ -- Richard ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Gary said: > Let's try again in a year. Sounds good to me. -- These are my opinions. I hate spam. ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Matthew! On Mon, 4 Sep 2023 21:46:50 + Matthew Selsky wrote: > Is the implication that we can safely drop python2 support after June > 2024? Maybe. RHEL, and friends, are the last to drop things. Worse, people that use RHEL, and friends, seem to never update their systems... > Are there any other distributions that ship python2 that we > want to maintain support for? Dunno, RHEL, and friends, seem to be where the whiners come from. I think there are a few "embedded" distros that still need Python 2. I found this online: Debian – v10 (Buster) is the last release to include Python 2.7, which will continue to be supported through June of 2024. Redhat – RHEL 8 was the last version to include support for Python 2, which will be retired in June 2024. CentOS – v8 was the last version to include support for Python 2.7, which will be EOL in May 2024. Also Ubuntu Extended Security Maintenance (ESM) plan still supports Python 2. > How much does it cost us to maintain python2 support in our own code? Except for the CI, benign neglect seems to be working. The problem is at the other end, where coders want to use new, unstable, Python 3 features. Getting rid of Python 2 does not make them stable. For example: type hints. Even Luke Skywalker can't keep his eyes on that moving target. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpwxTAElWcSk.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo James! On Mon, 04 Sep 2023 15:38:26 -0700 James Browning via devel wrote: > > By dropping 2.7 we could probably assume secrets which simplifies > > ntpkeygen, simplify ntp.poly, be able to drop the now oldoldstable? > > runner testing for asciidoc on python 2 support, and also have the > > option of adding type hinting. Type hinting is still unstable in Python. Gonna be years before we can use that. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpvQLlNcKHhK.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Hal! On Mon, 04 Sep 2023 15:46:45 -0700 Hal Murray via devel wrote: > > Rumours of its death are greatly exagerated. > > Thanks. > > Let me try again with maybe closer to what I should have asked? > > Are there any distros that we currently run on that don't support > python 3? RHEL. > I can imagine some places are running really really old software. > If it ain't broke, don't fix it. > But would they be running ntpsec? They are running gpsd, people keep trying to kill Python 2 support in gpsd, and the complaints are pretty quick to arrive. Let's try again in a year. RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgphJjkfI_ONs.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
On Sep 4, 2023 14:46, Matthew Selsky via devel wrote:On Mon, Sep 04, 2023 at 02:25:46PM -0700, Gary E. Miller via devel wrote: > From RHEL: > > "The RHEL 8 AppStream Lifecycle Page puts the end date of RHEL 8's > Python 2.7 package at June 2024." > > https://access.redhat.com/solutions/4455511 Hi Gary, Is the implication that we can safely drop python2 support after June 2024? Are there any other distributions that ship python2 that we want to maintain support for? How much does it cost us to maintain python2 support in our own code?By dropping 2.6 support we would eliminate the need to check for argparse in a few place, glue to replace ordereddict?, be able to use with for resource allocatoion, and the need to pretend to test on 2.6. By dropping 2.7 we could probably assume secrets which simplifies ntpkeygen, simplify ntp.poly, be able to drop the now oldoldstable? runner testing for asciidoc on python 2 support, and also have the option of adding type hinting.I am probably missing a whole bunch of stuff though.___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
On Mon, Sep 04, 2023 at 02:25:46PM -0700, Gary E. Miller via devel wrote: > From RHEL: > > "The RHEL 8 AppStream Lifecycle Page puts the end date of RHEL 8's > Python 2.7 package at June 2024." > > https://access.redhat.com/solutions/4455511 Hi Gary, Is the implication that we can safely drop python2 support after June 2024? Are there any other distributions that ship python2 that we want to maintain support for? How much does it cost us to maintain python2 support in our own code? Cheers, -Matt ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel
Re: Is python2 dead?
Yo Hal! On Mon, 04 Sep 2023 14:15:26 -0700 Hal Murray via devel wrote: > Really really dead? Or maybe just hiding in some dark corner? Rumours of its death are greatly exagerated. > Should we drop support for python2 as part of the next release? > Or announce in the next release that we will drop it as part of the > following release? From RHEL: "The RHEL 8 AppStream Lifecycle Page puts the end date of RHEL 8's Python 2.7 package at June 2024." https://access.redhat.com/solutions/4455511 RGDS GARY --- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 g...@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin pgpmVz_jXODnQ.pgp Description: OpenPGP digital signature ___ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel