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

MSPileupData broken in python 3.9 #12114

Open
khurtado opened this issue Sep 26, 2024 · 0 comments
Open

MSPileupData broken in python 3.9 #12114

khurtado opened this issue Sep 26, 2024 · 0 comments
Labels

Comments

@khurtado
Copy link
Contributor

Impact of the bug

When importing pymongo from MSPileupData with python 3.9, we get errors due to crypto versions in this version.

Describe the bug
When importing MSPileupData:

File "/home/cmsbld/WMCore/src/python/WMCore/MicroService/MSPileup/MSPileup.py", line 14, in <module>
    from WMCore.MicroService.MSPileup.MSPileupData import MSPileupData

It gets stuck here:

from pymongo import IndexModel, errors

with the following error:

    from WMCore.MicroService.MSPileup.MSPileupData import MSPileupData
  File "/home/cmsbld/WMCore/src/python/WMCore/MicroService/MSPileup/MSPileupData.py", line 15, in <module>
    from pymongo import IndexModel, errors
  File "/usr/local/lib64/python3.9/site-packages/pymongo/__init__.py", line 105, in <module>
    from pymongo.mongo_client import MongoClient
  File "/usr/local/lib64/python3.9/site-packages/pymongo/mongo_client.py", line 59, in <module>
    from pymongo import (
  File "/usr/local/lib64/python3.9/site-packages/pymongo/uri_parser.py", line 23, in <module>
    from pymongo.client_options import _parse_ssl_options
  File "/usr/local/lib64/python3.9/site-packages/pymongo/client_options.py", line 26, in <module>
    from pymongo.pool import PoolOptions
  File "/usr/local/lib64/python3.9/site-packages/pymongo/pool.py", line 60, in <module>
    from pymongo.network import command, receive_message
  File "/usr/local/lib64/python3.9/site-packages/pymongo/network.py", line 24, in <module>
    from pymongo import _csot, helpers, message, ssl_support
  File "/usr/local/lib64/python3.9/site-packages/pymongo/ssl_support.py", line 22, in <module>
    import pymongo.pyopenssl_context as _ssl
  File "/usr/local/lib64/python3.9/site-packages/pymongo/pyopenssl_context.py", line 27, in <module>
    from OpenSSL import SSL as _SSL
  File "/usr/local/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1550, in <module>
    class X509StoreFlags(object):
  File "/usr/local/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1568, in X509StoreFlags
    NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY

A new version of PyOpenSSL may be required to fix this:
https://stackoverflow.com/questions/73830524/attributeerror-module-lib-has-no-attribute-x509-v-flag-cb-issuer-check

How to reproduce it
Run MSManager unit tests:
https://cmssdt.cern.ch/dmwm-jenkins/view/WMCore%20Docker/job/WMCore-Unittest-Baseline-khurtado2/48/testReport/junit/WMCore_t.MicroService_t.MSManager_t/MSManagerTest/test_services/

Expected behavior
Pymongo should be imported normally.

Additional context and error message
Related issue:
#11978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant