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

Small tweaks to allow Python 3.5 compatibility #35

Merged
merged 2 commits into from
Jan 13, 2021

Conversation

theangryangel
Copy link
Contributor

I'm working on a project which is (for now) pinned to Python 3.5, and I was hoping to use pydifact.

I just had to replace the fstrings with format calls instead, everything else so far seems fine (test suite passes, etc.)

As-per the docs I did run black as well, which has formatted code I did not write. I can back out these changes if you would like.

@nerdoc
Copy link
Member

nerdoc commented Jan 13, 2021

Hmmm. Python 3.5 has no support any more. So, as this is intended as future release (pydifact is alpha ATM), I see it problematic to use older, unsupported versions of Python and support them too... Why is it pinned to an old version? Would it be a possibility to use a separate branch for that? I'd really like to keep up with newer, faster features of Python... What do you say?

@theangryangel
Copy link
Contributor Author

theangryangel commented Jan 13, 2021

As much as I would love to upgrade Python, the project I was ultimately looking to use this is in within an Odoo 12.0 installation (Odoo is a monolithic ERP written in Python, where support is "limited" to the version specified at each new major release - 12.0 released at 3.5, 13.0 at 3.6, and so on).

Technically you can run Odoo under newer version of Python than specified. Practically this leads to issues like this which in a monolith that's running an entire business is a hell of a problem to wake up to on a Monday, so we tend to be conservative and pin to the officially supported versions.

There are plans to take this project from 12.0 to 14.0 (which would allow me to upgrade from Python 3.5), but there's a lot of moving parts to that, and it's not happening any time soon.

I'd love to contribute changes I add (i.e. #18), rather than fork or look for other solutions, but it would all be 3.5 compatible at the moment.

If that's not a direction you want this library to go in, that's no problem and I totally understand :)

@nerdoc
Copy link
Member

nerdoc commented Jan 13, 2021

Ok, I understand. And I think pydifact will be there for a longer time, as I'll use it in a long term project. But the real "start" will be in "a future, (not) far from now" - meaning - I don't really know. And I think at that time the active Python version will be 5.0 ;-)
So ok, I'll have a look at it and will pull it - it's a small "scrifice" for having more people on an open source project. Thanks anyway.

@nerdoc
Copy link
Member

nerdoc commented Jan 13, 2021

Yes, looks all good. Thanks for making the black reformatting an extra commit - i'm surely ok with that. If not you, I'd have been the next one who'd have done that, so no matter.

@nerdoc nerdoc merged commit dccd264 into nerdocs:master Jan 13, 2021
@nerdoc
Copy link
Member

nerdoc commented Jan 13, 2021

oh, and maybe I'll open an issue, to remind me of the old Python3.5 compatibility. If you don't need it any more, please tell me.

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