-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
PLIP: Add support for Python 3.8 #2890
Comments
I implemented support for Python 3.8 with the following pull-requests:
With these Plone seems to run fine on Python 3.8. 1. SyntaxWarningsWhen running the application or the test many warnings such as these appear:
They appear when identity checks ( 2. Failing TestsRunning the test in Python 3.8 yields some new failing tests. We'll need a jenkins-job to make these publicly visible. But locally you can reproduce them. Errors are |
@pbauer The files with the syntax warnings seem to be generated by Ironically the SyntaxWarnings seem to show a paradigm shift in using |
@icemac wrote:
Maybe is is no longer true for the beta versions of Python 3.8. I've seen it on alpha versions. |
Thanks for the tip, that helps. After
The issues seems to be in Chameleon and not in the templates. Here is one example: # <Boolean "python:'selected' if chain == () else None" (162:81)> -> __attr_selected
__token = 7798
__attr_selected = ('selected' if (getitem('chain') == ()) else None)
if (__attr_selected is '__default__'):
__attr_selected = None
else:
if __attr_selected:
__attr_selected = 'selected'
else:
__attr_selected = None
if (__attr_selected is not None):
__append((' selected="%s"' % __attr_selected))
__append('>')
__stream_4752630400 = []
__append_4752630400 = __stream_4752630400.append
__append_4752630400('No workflow')
__msgid_4752630400 = __re_whitespace(''.join(__stream_4752630400)).strip()
if 'label_mapping_no_workflow':
__append(translate('label_mapping_no_workflow', mapping=None, default=__msgid_4752630400, domain=__i18n_domain, context=__i18n_context, target_language=getitem('target_language')))
__append('</option>')
__append('\n\n ') The original template here is With this information I was able to find the code that created that and with malthe/chameleon#293 the warnings are gone. |
@icemac can you estimate how significant the performance-benefit of |
@pbauer I think in union.cms it reduced the time for the test runs by 10 to 20 %. Each template which is used more than 2 to 3 times should benefit from the cache as it does not have to be recompiled. We are using the caching in development, tests and production. (In development we also use Yes, the directory has to exist, it is not created automatically. |
New Chameleon release 3.6.2 that fixes syntax error. |
I tested the speed-difference for our tests. I ran But the difference when using Without With That's a speed-increase of more than 20% when setting a cache. I think this means we should configure a |
cc @loechel may you comment on the RestrictedPython issue with 3.8 please? |
@gforcada created the jenkins-jobs https://jenkins.plone.org/job/plone-5.2-python-3.8/ and https://jenkins.plone.org/job/plone-5.2-python-3.8-robot-chrome. Thanks! They are not yet triggered by github changes though. The last failing tests should be fixed with #2903. After that is merged and the 3.8 tests are green we could hook them up with github changes and create a pull-request-job as well. Also: RestrictedPython 4.0 supports Python 3.8. |
+1 |
That's a serious case of inside knowledge. RestrictedPython and Zope both declare support for 3.8. The respective pull-requests are zopefoundation/RestrictedPython#145, zopefoundation/RestrictedPython#150 and zopefoundation/Zope#477. And none mentions any unresolved issues. If the @plone/security-team says we should not declare support for 3.8 for whatever reason they should please tell me so. Then I'll remove the classifier again. |
I will wait to push the jobs until someone confirms python 3.8 support is ready to be tested... |
We can test it already, but from a security POV the @plone/security-team still discusses if we better need to wait until 3.8 final is out, check all, and then declare official support. |
I removed the classifier after discussions with the @plone/security-team. |
jobs are there on PR: plone/plone.dexterity#106 next time though, do we really need to rush to support a beta version of an incremental release? 🤔 🤷♂️ |
@pbauer this PLIP has been approved by the framework team. |
all merged and part of 5.2, close |
The @plone/framework-team is happy :) |
PLIP (Plone Improvement Proposal)
Responsible Persons
Proposer: Philip Bauer
Seconder:
Abstract
Python 3.8 is in beta right now and the final final release is scheduled for October 21st 2019. (see https://www.python.org/dev/peps/pep-0569/#schedule)
We should make sure that Plone 5.2 supports it asap. Zope 4.1 already has preliminary support for Python 3.8.
Python 3.8 has many new features and a bunch of spee-optimizations from which we might also benefit. See https://docs.python.org/3.8/whatsnew/3.8.html for details
Motivation
Keeping up-to-date with current Python versions.
Assumptions
Updating our codebase should be relatively easy. Some deprecated imports need to be replaces (most notably
from cgi import escape
) but I do not expect bigger problems.Proposal & Implementation
Deliverables
Risks
Participants
The text was updated successfully, but these errors were encountered: