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

BFG: MonkeyPatch GEvent приводит к рекурсивному импорту ssl #891

Open
anasekin opened this issue Jun 5, 2023 · 0 comments

Comments

@anasekin
Copy link

anasekin commented Jun 5, 2023

В случае запуска yandex-tank с конфигом:

phantom:
  enabled: false
bfg:
  enabled: true
  
  ammofile: ./ammo.txt

  instances: 1
  worker_type: green
  green_threads_per_instance: 1
  
  gun_type: ultimate
  gun_config:
    module_path: ./
    module_name: single_request_test
    class_name: SingleRequestTest
  
  pip: >
    requests

  load_profile:
    load_type: instances
    schedule: const(1, 1m)

ломается импорт requests, в консоли:

/tank/yandextank/plugins/Bfg/worker.py:200: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.util.ssl_ (/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py)', 'urllib3.util (/usr/local/lib/python3.10/site-packages/urllib3/util/__init__.py)', 'pip._vendor.urllib3.util.ssl_ (/usr/local/lib/python3.10/site-packages/pip/_vendor/urllib3/util/ssl_.py)', 'pip._vendor.urllib3.util (/usr/local/lib/python3.10/site-packages/pip/_vendor/urllib3/util/__init__.py)']. 
  monkey.patch_all(thread=False, select=False)
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

1 participant