Repository navigation
Conversation
openbabel was capped below 3.2 because 3.2.1 hung pytest collection on Linux. That cap is also what held rdkit at 2025.03.6 on linux-64 when conda-forge has 2026.09.2. Every openbabel 3.1.1 build depends on libxml2 <2.14, and libxml2 2.13 needs icu <=75. That rules out: - rdkit 2026.x, which needs cairo >=1.18.6 and libpq >=18.3, all of whose builds need icu 78; - rdkit 2025.09.x, which needs libpq >=18. The full matplotlib package (ours, and the one rmg::pysidt-rmg depends on) pulls in pyside6/qt6-main, and every qt6-main build linked against libpq 18 needs libxml2 >=2.14. The hang was never in pybel itself. Collection stopped at `import CoolProp` (via arkane -> rmgpy.data.solvation), spinning at 100% CPU in CoolProp's static initializer, inside rapidjson's Grisu2 number formatting. openbabel 3.2.1's JSON format plugins (ketformat, chemdoodlejson, chemicaljson, pubchemjson) bundle a newer rapidjson than CoolProp 6.7.0. The function-local static lookup tables in rapidjson are STB_GNU_UNIQUE symbols, so the copy from whichever library loads first is used by the whole process, even for plugins opened RTLD_LOCAL. In CoolProp `DigitGen()::kPow10` is 10 x uint32 (40 bytes); in openbabel 3.2.1 it is 20 x uint64 (160 bytes). pybel loads every plugin when imported, so when pybel comes first, CoolProp formats numbers with the wrong table and never terminates. openbabel 3.1.1's plugins export the same symbols, but with the old 40-byte layout, which is why it was harmless. Reversing the order works: `import CoolProp; from openbabel import pybel` is fine, and openbabel's JSON writers still work afterwards. CoolProp cannot simply be upgraded: 7.x needs fmt 10 and 8.0 needs fmt 12.2, while cantera 3.2.0 pins fmt 12.0. So import CoolProp before openbabel in each module that imports openbabel (rmgpy/molecule/converter.py has the full explanation; also translator.py, arkane/encorr/data.py and test/conftest.py). Then require openbabel >=3.2.1 in environment.yml and .conda/meta.yaml. Now that Python 3.9 is dropped, every supported Python has a 3.2.1 build. A floor, rather than no bound, keeps the solver from considering the old libxml2/icu 75 stack at all. meta.yaml previously had no cap at all, so this also puts the two files back in sync. Effect on the solve (mamba 2.9 dry runs): linux-64 py3.11 gets rdkit 2026.09.2, py3.10 gets 2026.03.6 (the newest py310 build), and osx-64 and osx-arm64 get 2026.09.2. Other packages that move on linux-64: icu 75 -> 78, libxml2 2.13 -> 2.15, libboost 1.86 -> 1.90, cairo 1.18.4 -> 1.18.6, libpq 17 -> 18, ffmpeg 8 -> 9, graphviz 13 -> 14, qt6-main/pyside6 6.9 -> 6.11, matplotlib 3.10 -> 3.11. numpy, scipy, cantera and h5py are unchanged. The linux-64 solve was also much faster in these runs (about 2 minutes vs. about 20 for the old file, under the same machine load), because the solver no longer searches for an rdkit that cannot fit. Tested on Linux (Explorer, Apptainer miniforge3) for py3.10 and py3.11: fresh env build, `make install`, the rmg.py superminimal and Arkane.py n-butanol_msc examples, `pytest --collect-only` (2324 tests in about 50 s; before this change it hung) and `make test-all`, compared against an unpatched official/main control (openbabel 3.1.1, rdkit 2025.03.6). Both patched runs: 2284 passed, 40 skipped, 0 failed. The only errors were 2 restart-test teardowns failing with "Directory not empty" on the NFS home directory, which the control hit too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On linux-64,
environment.ymlcurrently resolves to rdkit 2025.03.6, while conda-forge has 2026.09.2. The cause is theopenbabel <3.2cap. This PR lifts it toopenbabel >=3.2.1and works around the hang that led to the cap in the first place. That hang turned out to be a CoolProp import hang, not a pybel one.Why rdkit was held back
Every openbabel 3.1.1 build requires
libxml2 <2.14, and libxml2 2.13 builds need icu 75 or older. That blocks newer rdkit in two ways:cairo >=1.18.6andlibpq >=18.3. Every build of those needs icu 78.libpq >=18. Fullmatplotlib(ours, and the onermg::pysidt-rmgdepends on) pulls in pyside6/qt6-main, and every qt6-main build linked against libpq 18 needs libxml2 >=2.14.The "openbabel 3.2.1 hangs pytest" bug is a CoolProp import hang
conftest.py. It was stuck inimport CoolProp(reached viaarkane→rmgpy.data.solvation), spinning at 100% CPU in CoolProp's static initializer, inside rapidjson'sGrisu2.STB_GNU_UNIQUEsymbols, so the copy from whichever library loads first is used process-wide, even for plugins openedRTLD_LOCAL.DigitGen()::kPow10is 40 bytes in CoolProp and 160 bytes in openbabel 3.2.1. openbabel 3.1.1 exports the same symbols with the 40-byte layout, which is why it never hung.from openbabel import pybel; import CoolProphangs, whileimport CoolProp; from openbabel import pybelworks, and openbabel's JSON writers still work after that.arkane/encorr/data.pyimports pybel beforearkane/pdepimports CoolProp.Changes
import CoolPropbefore openbabel inrmgpy/molecule/converter.py(full explanation in a comment),rmgpy/molecule/translator.py,arkane/encorr/data.pyandtest/conftest.py.openbabel >=3.2.1in bothenvironment.ymland.conda/meta.yaml. Every supported Python has a 3.2.1 build now that 3.9 is dropped. On main,meta.yamlhad no upper cap, so this also puts the two files back in sync.Effect on the solve
mamba 2.9 dry runs:
Testing
Tested on Linux (Apptainer miniforge3) for py3.10 and py3.11, from fresh environments, against an unpatched
maincontrol (openbabel 3.1.1, rdkit 2025.03.6):make install, thermg.pysuperminimal example and theArkane.pyn-butanol_msc example all work.pytest --collect-onlycollects 2324 tests in about 50 s. Without the CoolProp import first, it hangs.make test-all: 2284 passed, 40 skipped, 0 failed on both Pythons.A proper upstream fix (hiding the symbols in the openbabel or coolprop feedstock) has not been filed yet.
🤖 Generated with Claude Code