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

Fix allow_methods argument #8

Merged
merged 1 commit into from Apr 29, 2019
Merged

Fix allow_methods argument #8

merged 1 commit into from Apr 29, 2019

Conversation

di
Copy link
Member

@di di commented Apr 24, 2019

Currently this raises an exception:

[2019-04-24 14:36:39 -0500] [56254] [INFO] Starting gunicorn 19.9.0
[2019-04-24 14:36:39 -0500] [56254] [INFO] Listening at: http://127.0.0.1:8000 (56254)
[2019-04-24 14:36:39 -0500] [56254] [INFO] Using worker: aiohttp.worker.GunicornWebWorker
[2019-04-24 14:36:39 -0500] [56257] [INFO] Booting worker with pid: 56257
[2019-04-24 14:36:39 -0500] [56257] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/aiohttp/worker.py", line 49, in init_process
    super().init_process()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/dustiningram/git/pypa/conveyor/conveyor/app.py", line 16, in <module>
    application = configure()
  File "/Users/dustiningram/git/pypa/conveyor/conveyor/config.py", line 73, in configure
    allow_methods="GET",
  File "/Users/dustiningram/git/pypa/conveyor/.state/venv/lib/python3.7/site-packages/aiohttp_cors/resource_options.py", line 133, in __new__
    "got '{!r}'".format(allow_methods))
ValueError: 'allow_methods' must be either '*', or sequence of strings, got ''GET''

@di di mentioned this pull request Apr 24, 2019
@teonbrooks
Copy link
Contributor

ah, good catch. sorry I missed that in my PR

@di di merged commit 7b344a9 into master Apr 29, 2019
@di di deleted the fix-allow-methods branch April 29, 2019 03:25
@SimonBiggs
Copy link

@di should this be fixing pyodide/pyodide#147 (comment) ?

@di
Copy link
Member Author

di commented May 3, 2019

@SimonBiggs Conveyor is used for the packaging content (at files.pythonhosted.org) and documentation. I'm not totally sure what "package metadata" means there, do you mean the JSON API?

@mdboom
Copy link

mdboom commented May 3, 2019

Yes -- by "package metadata" I meant the JSON API.

It this is supposed to affect files.pythonhosted.org, then it seems it isn't yet in effect:

https://files.pythonhosted.org/packages/d4/6c/8a935e2c7b54a37714656d753e4187ee0631988184ed50c0cf6476858566/snowballstemmer-1.2.1-py2.py3-none-any.whl

returns:

HTTP/2.0 200 OK
x-amz-id-2: XUlTY2o5zjAe7ArvbZ8SotMe69w497FY4n5HqltapxKvhwNDoPdU4YiJmLh9L7olMTq1y/ttu7c=
x-amz-request-id: 37312A2B9549A26D
last-modified: Sat, 23 Apr 2016 03:57:53 GMT
etag: "198b60fa6a36d22c6c6f0b9304c6a40b"
x-amz-version-id: ZjAIy7CZc1hMcltpkyVR67eyK70o4srA
content-type: application/octet-stream
server: AmazonS3
cache-control: max-age=365000000, immutable, public
accept-ranges: bytes
date: Fri, 03 May 2019 12:13:09 GMT
age: 18538729
x-served-by: cache-sea1027-SEA, cache-dca17749-DCA
x-cache: HIT, HIT
x-cache-hits: 246, 1972
x-timer: S1556885590.652967,VS0,VE0
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
x-robots-header: noindex
content-length: 64341
X-Firefox-Spdy: h2

@di
Copy link
Member Author

di commented May 3, 2019

Ok, thanks, will investigate at the PyCon sprints next week.

@mdboom
Copy link

mdboom commented May 3, 2019

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.

None yet

4 participants