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

TypeError: __init__() takes at most 5 arguments (6 given) in subprocess.py #63

Closed
smspillaz opened this issue Jun 18, 2015 · 2 comments
Closed

Comments

@smspillaz
Copy link
Contributor

I'm getting the following traceback on pypy3

Traceback (most recent call last):
  File "/home/travis/build/polysquare/polysquare-ci-scripts/setup.py", line 44, in <module>
    include_package_data=True)
  File "/opt/python/pypy3-2.4.0/lib-python/3/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/python/pypy3-2.4.0/lib-python/3/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/opt/python/pypy3-2.4.0/lib-python/3/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/setuptools_green/__init__.py", line 34, in run
    sys.exit(green.cmdline.main())
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/green/cmdline.py", line 87, in main
    result = run(test_suite, stream, args) # pragma: no cover
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/green/runner.py", line 52, in run
    pool = LoggingDaemonlessPool(processes=args.subprocesses or None)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/green/subprocess.py", line 98, in __init__
    initargs, maxtasksperchild, context)
TypeError: __init__() takes at most 5 arguments (6 given)
smspillaz added a commit to smspillaz/green that referenced this issue Jun 18, 2015
@e3krisztian
Copy link
Contributor

context is optional in multiprocessing.Pool.__init__ and not used in green at all.

Would it do any harm if removed from LoggingDaemonlessPool.__init__?

@CleanCut
Copy link
Owner

@smspillaz

First, I'm not at all surprised that pypy3 crashed, as pypy3 targets the functionality of CPython 3.2.5, and CPython 3.2.0 was so hilariously awful from an implementing-green-point-of-view that I never even attempted it. (Green officially supports CPython 2.7, 3.4+, and pypy)

Second, I was absolutely shocked that pypy3 passed all of green's unit tests once this issue you pointed out was addressed. Either a lot of things changed between CPython 3.2.0 and 3.2.5, or pypy3 has just done an excellent job of adopting post-3.2 behavior.

Third, I took the advice of @krisztianfekete and just stopped attempting to pass-thru context. It's a slightly simpler fix for the moment (unless we start using context in the future).

It looks like I should be able to put this out in a 1.11.0 release later today.

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

No branches or pull requests

3 participants