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 support #75

Open
eirnym opened this issue May 15, 2019 · 4 comments · May be fixed by #81
Open

Python 3 support #75

eirnym opened this issue May 15, 2019 · 4 comments · May be fixed by #81

Comments

@eirnym
Copy link

eirnym commented May 15, 2019

Please, provide support for python 3

@trimbo trimbo self-assigned this Aug 22, 2019
@aadarsh-patel aadarsh-patel linked a pull request Oct 5, 2019 that will close this issue
@septatrix
Copy link

I just had some spare time and decided to run the benchmark with python 3:

Python 3.8.6 (default, Jan 27 2021, 15:42:20) 
[GCC 10.2.0]
Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Package       Version
------------- -----------
asgiref       3.3.1
Cheetah3      3.2.6.post1
Django        3.1.7
Jinja2        2.11.3
Mako          1.1.4
MarkupSafe    1.1.1
pip           20.1.1
pkg-resources 0.0.0
pytz          2021.1
setuptools    44.0.0
spitfire      0.0.1
sqlparse      0.4.1
Running benchmarks 1000 times each...

The following template engines are not installed and will be skipped in the benchmark: ['spitfire']
Cheetah template                               13.84 ms
Django template                                58.68 ms
Django template autoescaped                    58.95 ms
Jinja2 template                                 3.15 ms
Jinja2 template autoescaped                     5.92 ms
Mako template                                   2.48 ms
Mako template autoescaped                       5.45 ms
Python string template                         14.27 ms
Python StringIO buffer                          2.48 ms
Python list concatenation                       2.36 ms

Jinja and Mako come close to the performance of spitfire in python 2. It would be interesting to see how spitfire performs in python 3 or if we are just better of just using e.g. Jinja with PyPy or similar which is also known to improve performance by a significant amount.

@re-masashi
Copy link

Maybe too late, but I think that 2to3 will be a temporary solution if one badly needs it.

@trimbo trimbo removed their assignment Feb 20, 2023
@re-masashi
Copy link

You can now get the Python 3 supported version on my fork.

@re-masashi
Copy link

@trimbo Can I take over this issue?
I have documented the code and the template syntax and prepared a template environment (a class which loads templates). This makes Spitfire more accessible. It's also available as a PyPi Package

TL;DR: I would like to oversee this issue. Thanks in advance.

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 a pull request may close this issue.

4 participants