Skip to content
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

Change an f-string to .format to restore py2.7 compatibility #196

Closed
wants to merge 1 commit into from
Closed

Conversation

gcoxmoz
Copy link

@gcoxmoz gcoxmoz commented Feb 17, 2023

42a5a1d introduced an fstring which breaks the ability for this module to run on 2.7. This returns it to a portable format.

And while you can point and laugh that there's still folks using py2, the readme (updated 2w ago) still mentions 2.7, and this isn't a particularly strong break or official declaration that you're dropping 2, so this feel like a bug.

@gcoxmoz
Copy link
Author

gcoxmoz commented Feb 18, 2023

I realize this is now moot since 4.6.1 backed the breaking change out, but I'm gonna leave this open for a little bit in case it comes back on reland.

@gcoxmoz
Copy link
Author

gcoxmoz commented Feb 28, 2023

Closing out. This was a fix to the now-reverted #188.

@gcoxmoz gcoxmoz closed this Feb 28, 2023
@AaronAtDuo
Copy link
Contributor

AaronAtDuo commented Mar 6, 2023

@gcoxmoz We do plan to bring the reverted functionality back in the near future. In order to keep the scope down, we will probably not change the f-string portion when we do so. However, since that part is not crucial to the functionality, a follow-up commit or PR to go back to a py2-supported format will definitely be acceptable.

However, long term we will at some point need to stop trying to support Python 2. The README does mention Python 2, but only as an FYI to indicate where TLS support is available. We removed Python2 from the "tested with" section and from our CI a few months back, because the GitHub runners didn't support installing Python 2 as far as we could determine.

For one example of a change that would be impossible to fix for Python 2 support, PR #191 will definitely not work with Python 2 if we decide to land that.

I'm open to any ideas you have about how we can try to extend Python 2 support as long as possible, but I don't see any way we can do so indefinitely. So alternately, what would you want from us in terms of a definitive "we will no longer support Python 2 as of XYZ" statement?

@gcoxmoz
Copy link
Author

gcoxmoz commented Mar 7, 2023

I'm open to any ideas you have about how we can try to extend Python 2 support as long as possible, but I don't see any way we can do so indefinitely. So alternately, what would you want from us in terms of a definitive "we will no longer support Python 2 as of XYZ" statement?

I would say you've pretty much hit the nail on the head. If the only thing breaking py2 is "we did f-strings instead of format()" then that's poor portability-coding and we should avoid that.

But when you want to drop py2, do it cleanly, explicitly, and hard.

  • Declare a date.
  • Declare a semver bump where the change is explicitly spelled out as a "we are dropping support for X"
  • Land a change or two that will introduce incompatibilities in line with that change.

For example, 3.7 is going EOL soon, but I don't see why folks would drop support for it unless it's causing hardship on their own code.

py2 is just an extreme form of that. I have no right to demand you keep support. But when the difference between it working and not is a trivial s/fstring/format()/ in absence of a clean declared break, yeah, let's keep it working.

@gcoxmoz gcoxmoz deleted the py27 branch March 27, 2023 15:17
@gcoxmoz
Copy link
Author

gcoxmoz commented Mar 27, 2023

Handled by #202, thanks y'all.

@AaronAtDuo
Copy link
Contributor

Glad to help. But at some point, probably in the near future, we will have to drop py2 support. I will try my best to do it cleanly, explicitly, and hard :)

@AaronAtDuo
Copy link
Contributor

@gcoxmoz Well, we did it. We dropped py2 support in 5.0.0. Hopefully it's clean, explicit and hard enough.

@gcoxmoz
Copy link
Author

gcoxmoz commented May 4, 2023

Yep, totally ticks all the boxes, thank you. Amusingly, you caught me right after I went from 4.5 to 4.7 as "here ya go, the last version that has py2 support" and broke some stuff .. there's something in 4.6 that got unhappy on py2. OH WELL!

Think fondly of those of us in the past, Future Boy. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants