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

Python 3 compatibility #54

Closed
justinmayer opened this issue Jul 31, 2013 · 13 comments
Closed

Python 3 compatibility #54

justinmayer opened this issue Jul 31, 2013 · 13 comments

Comments

@justinmayer
Copy link

Recent updates to Flask and related components have included support for Python 3, and it would be great to be able to use Flask-DebugToolbar in projects running on Python 3. As it stands now, Flask-DebugToolbar must be disabled in such projects in order to run them without errors.

Are there plans to support Python 3 in the near future?

@arsenetar
Copy link

Running 2to3 seems to fix most issues... leaving just line 9 in templates/panels/headers.html. At least everything seems to be working for me at this point with running 2to3 and that edit.

-       {% for key, value in headers.iteritems() %}
+       {% for key, value in headers.items() %}

@jacobsvante
Copy link

Does anyone have a branch with py3 compatibility?

@mgood mgood closed this as completed in 091c4fa Nov 6, 2013
@justinmayer
Copy link
Author

Great to see Python 3 support has landed. Thanks, Matt!

Do you think you might be able to push out a release in the near future?

@mgood
Copy link
Contributor

mgood commented Nov 6, 2013

This probably needs some more testing, but I've added a tentative fix. I'm following @mitsuhiko's approach to using one codebase that's compatible with 2.6, 2.7 and 3.3+, so 2to3 is not required.

I'd been trying to come up with a better comprehensive testing approach, but for now I've checked in a really basic sanity test that checks that the toolbar at least loads for a very simple app. It can be run locally with Tox, or automated results are in Travis CI:

https://travis-ci.org/mgood/flask-debugtoolbar

@jacobsvante
Copy link

Great job @mgood. This got rid of the exceptions thrown during tox testing, though I haven't had time to test it manually yet but I'll report back if I find any issues.

@mgood
Copy link
Contributor

mgood commented Nov 7, 2013

Yeah, I'd appreciate you trying it out before I make a new release. I've only tested it with fairly trivial example apps since I don't have another app running with Python 3 yet.

@jacobsvante
Copy link

Seems to be working great here, no issues so far!

@justinmayer
Copy link
Author

Tested here and functioning precisely as expected. Well done!

@justinmayer
Copy link
Author

Hey Matt. Any possibility of releasing a new version of Flask-DebugToolbar? Would be great to have a released version that supports Python 3.3.

@justinmayer
Copy link
Author

Given that it's been nearly a year since the last release, is there any chance of a new Flask-DebugToolbar release soon? Anything I can do to help?

@jacobsvante
Copy link

Working well for at least me and @justinmayer so this should be safe to release. This is a package that is used under development environments only so IMHO there'd be no great harm if a bug was found at a later stage.

@mgood
Copy link
Contributor

mgood commented Jan 3, 2014

Sorry for the delay. I just uploaded version 0.9.0 with this and other changes. Thanks for the help and testing.

@eirnym
Copy link

eirnym commented May 1, 2014

Will you add 'Programming Language :: Python :: 3' classifier?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants