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

Can't use UWSGICache in Python 2.7 #100

Merged
merged 1 commit into from
Mar 25, 2019
Merged

Conversation

pogliamarci
Copy link
Contributor

Hello,

Using Python 2.7 and UWSGICache to add a caching layer to a legacy Flask application, I get AttributeErrors when uwsgi.py attempts to call any function from the uwsgi module.

Apparently, the import uwsgi is importing the uwsg.py itself instead of the top-level uwsgi module.

As a solution, this pull request renames uwsgi.py in uwsgicache.py to avoid the name clash, mostly in the same way it's already done for the redis backend (judging from the TODO comment at line 17 of backends/__init__.py).

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.92% when pulling b3989c0 on pogliamarci:master into 6140d2c on sh4nks:master.

@sh4nks
Copy link
Collaborator

sh4nks commented Mar 25, 2019

LGTM! I had the same issue with redis..

@sh4nks sh4nks merged commit b8600c5 into pallets-eco:master Mar 25, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants