Skip to content

Python3 with application initialization #4

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

Merged
merged 5 commits into from
Jun 5, 2018

Conversation

rbu
Copy link
Member

@rbu rbu commented May 17, 2018

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

@icemac
Copy link
Member

icemac commented May 17, 2018

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

@rbu rbu force-pushed the python3-with-application-initialization branch from 150ae0d to 298e447 Compare May 18, 2018 13:16
@veritazx
Copy link

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
Copy link
Member Author

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 3 commits May 29, 2018 11:08
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 force-pushed the python3-with-application-initialization branch from d29e4b7 to 6cf7742 Compare May 29, 2018 09:08
@rbu rbu requested a review from icemac June 4, 2018 08:47
@rbu rbu force-pushed the python3-with-application-initialization branch from 6cf7742 to 1a5fb74 Compare June 5, 2018 09:58
@rbu rbu merged commit 2c60200 into master Jun 5, 2018
@rbu rbu deleted the python3-with-application-initialization branch June 5, 2018 10:18
@icemac
Copy link
Member

icemac commented Jun 6, 2018

Released to PyPI as https://pypi.org/project/Products.TemporaryFolder/5.1/

@rbu
Copy link
Member Author

rbu commented Jun 6, 2018

🍾 thanks

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 this pull request may close these issues.

3 participants