WMCore
WMCore copied to clipboard
MSPileupData broken in python 3.9
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: https://github.com/dmwm/WMCore/blob/4e0759d5648dfb66de7d7bc135e2975f88fecfbf/src/python/WMCore/MicroService/MSPileup/MSPileupData.py#L15
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: https://github.com/dmwm/WMCore/issues/11978