[SERVER-85760] Build failure with Python 3.12 Created: 25/Jan/24  Updated: 01/Feb/24

Status: Needs Verification
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ryan Schmidt Assignee: Udita Bose
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Operating System: ALL
Sprint: Build and Correctness OnDeck
Participants:

 Description   

mongodb 7.0.5 does not build with python 3.12.1 on macOS 14.2.1.

 

% tar xzf mongodb-src-r7.0.5.tar.gz
% cd mongodb-src-r7.0.5
% python3.12 -m venv venv
% venv/bin/python3.12 -m pip install -r etc/pip/compile-requirements.txt
...
% venv/bin/python3.12 buildscripts/scons.py install-mongod
Traceback (most recent call last):
  File "/Users/me/mongodb-src-r7.0.5/buildscripts/scons.py", line 25, in <module>
    verify_requirements('etc/pip/compile-requirements.txt')
  File "/Users/me/mongodb-src-r7.0.5/site_scons/mongo/pip_requirements.py", line 37, in verify_requirements
    import requirements
  File "/Users/me/mongodb-src-r7.0.5/venv/lib/python3.12/site-packages/requirements/__init__.py", line 1, in <module>
    from .parser import parse
  File "/Users/me/mongodb-src-r7.0.5/venv/lib/python3.12/site-packages/requirements/parser.py", line 4, in <module>
    from .requirement import Requirement
  File "/Users/me/mongodb-src-r7.0.5/venv/lib/python3.12/site-packages/requirements/requirement.py", line 3, in <module>
    from pkg_resources import Requirement as Req
  File "/Users/me/mongodb-src-r7.0.5/venv/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2163, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
%
 

This problem doesn't happen with python 3.11.7 on the same system.



 Comments   
Comment by Daniel Moody [ 31/Jan/24 ]

We build and test mongodb 7.0 with Python 3.10 primarily and we generally don't try to backport python version support, however if the fix is trivially updating a python dependency version we could attempt that. The problem with us upgrading python or its dependencies is that we have many developer tools that rely on them, not just the build, so generally its rather involved.

Comment by Noopur Gupta [ 31/Jan/24 ]

Assigning to the Build team to take a look at it. 

Generated at Thu Feb 08 06:58:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.