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

Python3 with application initialization #4

Merged
merged 5 commits into from Jun 5, 2018

Conversation

Projects
None yet
3 participants
@rbu
Member

rbu commented May 17, 2018

This needs zopefoundation/Zope#277 and zopefoundation/Zope#281 to be merged in Zope

@icemac

This comment has been minimized.

Member

icemac commented May 17, 2018

If fails on Python 2.7, but I am not sure why.

@veritazx

This comment has been minimized.

veritazx commented May 22, 2018

Thank you for this! Was wondering where session-init had gone. Didn't think far enough to realize the Application was missing during Product initialization (I just thought I didn't find it when I tried to fix the session initialization).
But got some questions: Should temp_folder/session_data (which is configurable in the session data manager) not better be retrieved from the session data manager during initialize instead of beeing hard-coded here? Is there a way to make sure the sdm is installed before the ZODBMountPoint-initialize happens?

@rbu

This comment has been minimized.

Member

rbu commented May 28, 2018

The initialization of SessionDataManager in this product has a bad smell, but I don't see a way to handle this differently without a major API change. The order in which products are loaded is deterministic (at least), but it's dependent on the user configuration. As seen in OFS/Application.py:import_products, the order of products is by Products paths, and then by name within each path.

So by that logic, Products.TemporaryFolder will usually load after Products.Sessions (except when users have TemporaryFolder in a filesystem path that is included before Sessions)

I'll adapt the buildout.cfg so that the build is green and then would like to merge this. ACK?

rbu added some commits May 17, 2018

Add Application initialization
When splitting off this product from the main Zope repository, the
Application initialization has been removed. This code brings back the
automatically created temporary folder and Session Data Container.

@rbu rbu requested a review from icemac Jun 4, 2018

@rbu rbu merged commit 2c60200 into master Jun 5, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+17.9%) to 87.651%
Details

@rbu rbu deleted the python3-with-application-initialization branch Jun 5, 2018

@icemac

This comment has been minimized.

Member

icemac commented Jun 6, 2018

@rbu

This comment has been minimized.

Member

rbu commented Jun 6, 2018

🍾 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment