Skip to content

Python3 with application initialization - #4

Merged
rbu merged 5 commits into
masterfrom
python3-with-application-initialization
Jun 5, 2018
Merged

Python3 with application initialization#4
rbu merged 5 commits into
masterfrom
python3-with-application-initialization

Conversation

@rbu

@rbu rbu commented May 17, 2018

Copy link
Copy Markdown
Member

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

@icemac

icemac commented May 17, 2018

Copy link
Copy Markdown
Member

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
Copy Markdown

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

rbu commented May 28, 2018

Copy link
Copy Markdown
Member Author

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

icemac commented Jun 6, 2018

Copy link
Copy Markdown
Member

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

@rbu

rbu commented Jun 6, 2018

Copy link
Copy Markdown
Member Author

🍾 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