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

Python3.8 multiprocessing support #229

Closed
wants to merge 16 commits into from
Closed

Python3.8 multiprocessing support #229

wants to merge 16 commits into from

Conversation

janjaapdriessen
Copy link
Contributor

On python3.8 I get the error:

...
AttributeError: Can't pickle local object 'code_analysis.<locals>.taskrunner'

Moving def taskrunner to the module level fixes this issue. I don't see a test case for multiprocessing, and the version pins in buildout.cfg are a bit outdated. Let's see whether the tests pass on travis on python3.8.

@mister-roboto
Copy link

@janjaapdriessen you need to sign the Plone Contributor Agreement in order to merge this pull request.

Learn about the Plone Contributor Agreement: http://docs.plone.org/develop/coredev/docs/contributors_agreement_explained.html

@janjaapdriessen
Copy link
Contributor Author

I did the contributor agreement dance, waiting for approval.

@tisto
Copy link
Sponsor Member

tisto commented Sep 18, 2020

@janjaapdriessen can you provide steps to reproduce? We are running stuff on 3.8 and I never saw the error above.

@janjaapdriessen
Copy link
Contributor Author

I added the multiprocessing setting to this repo's own buildout config and ran buildout with python3.8.5 (I had to remove the version pins for zope.i18nmessageid and zope.security in order to install all dependencies). Running bin/code-analysis gives the pickle attribute error only when I move the taskrunner back inside the code_analysis function.

@janjaapdriessen
Copy link
Contributor Author

@tisto could you have a look at this PR again please? You might have missed my last comment, I didn't mention you.

@tisto
Copy link
Sponsor Member

tisto commented Oct 20, 2020

@janjaapdriessen the problem is that Travis is red (most likely unrelated to your PR) which makes it impossible to merge and release this PR right now. Unfortunately, I do not have the time to look into it. I am happy to merge PRs and do a release but I can not work on fixing things these days...

@janjaapdriessen
Copy link
Contributor Author

@tisto I asked @sirex to revive rubygemsrecipe from bitbucket, there is a 0.3.0 release that makes the buildout work again, we no longer need to run buildout twice, which is nice.
However, I can not get the travis builds to work on python2.7, because of an issue with newer versions of zipp, zipp < 2 only installs with older versions of pip/setuptools. Would you be okay with removing 2.7 support?

@tisto
Copy link
Sponsor Member

tisto commented Nov 3, 2020

@janjaapdriessen I'd prefer to keep the Python 2 compatibility for a while. At least as long as Plone 5.2 is the main Plone release and still supports Python 2. We will break tons of existing buildouts when we drop Python2 support. The zipp issue should be fixable.

@janjaapdriessen
Copy link
Contributor Author

Continuing in another PR because I opened this PR before signing the contributors agreement.

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.

None yet

3 participants