-
Notifications
You must be signed in to change notification settings - Fork 139
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
feat: compat with python3.7 #87
Conversation
b50ecfa
to
556408b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in pyproject.toml we have to change target-version as well
Hey Aleksi, thanks for kind words, always nice to meet fellow Django developer :-P I left few comments in your PR but then I checked for how long 3.7 is going to be officially supported and after quick look I noticed that support is planned for another 6 days :-D I'm not sure if it makes sense to put an energy into this topic. What do you think? |
6fc3c05
to
ca9d7a3
Compare
Hey @lukasvinclav, thanks for your feedback. I've just fixed your comments. I work for a company that can't upgrade to python3.8 right now. They want an advanced Django Admin (django-unfold is perfect for what they want). I'd like to contribute directly to this repository rather than maintain a fork if you agree. I could also bring in some new features later :) |
Just tested python 3.7 support and it seems that Poetry requires at least 3.8. |
ca9d7a3
to
87bb833
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
details of my changes
src/unfold/settings.py
Outdated
@@ -39,7 +39,7 @@ | |||
} | |||
|
|||
|
|||
@lru_cache | |||
@lru_cache(maxsize=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to declare maxsize=None
for Python3.7 to avoid this error :
src/unfold/settings.py:43: in <module>
def get_config(settings_name=None):
/usr/lib/python3.7/functools.py:490: in lru_cache
raise TypeError('Expected maxsize to be an integer or None')
TypeError: Expected maxsize to be an integer or None
@Aleksi44 Regarding the lru_cache, I did some investigation and maybe I would prefer to use it without explicitly setting default values. You can read more here: I think this is the last thing which we are missing and then we are good to go. |
87bb833
to
27a604c
Compare
I've just made the change : @lru_cache(max_size=None) -> @lru_cache() |
Hey @lukasvinclav I see that the commit you merged is no longer on main. Did you have any problems? |
@Aleksi44 I sent you an email last Friday. I used address from your profile. |
Hello,
I'm the author of django-admin-tailwind (a django admin theme with TailwindCSS and AlpineJS too).
Congratulations for this great work (much better than my theme).
I'd like to add compatibility with python3.7 and I'm ready to make the effort to make it happen if it's okay with you.