pymatgen ftbfs with Python 3.12

Bug #2067725 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pymatgen (Debian)
New
Unknown
pymatgen (Ubuntu)
New
High
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1069219:

Package: src:pymatgen
Version: 2024.1.27+dfsg1-7
Severity: important
Tags: sid trixie ftbfs
User: <email address hidden>
Usertags: python3.12

[...]
=================================== FAILURES
===================================
______________________ TestTransformedStructure.test_snl
_______________________

self = <tests.alchemy.test_materials.TestTransformedStructure
testMethod=test_snl>

     def test_snl(self):
         self.trans.set_parameter("author", "will")
         with pytest.warns(UserWarning) as warns:
             snl = self.trans.to_snl([("will", "<email address hidden>")])
 > assert len(warns) == 1, "Warning not raised on type conversion
with other_parameters"
E AssertionError: Warning not raised on type conversion with
other_parameters
E assert 2 == 1
E + where 2 = len(WarningsChecker(record=True))

/<<PKGBUILDDIR>>/.pybuild/test_python3.12/tests/alchemy/test_materials.py:107:
AssertionError
____________________ TestLobsterin.test_dict_functionality
_____________________

self = <tests.io.lobster.test_inputs.TestLobsterin
testMethod=test_dict_functionality>

     def test_dict_functionality(self):
 > assert self.Lobsterinfromfile.get("COHPstartEnergy") == -15.0
E AssertionError: assert None == -15.0
E + where None = <bound method UserDict.get of
{'cohpstartenergy': -15.0, 'cohpendenergy': 5.0, 'basisset':
'pbeVaspFit2015', 'gaussian...s'], 'skipdos': True, 'skipcohp': True,
'skipcoop': True, 'skippopulationanalysis': True, 'skipgrosspopulation':
True}>('COHPstartEnergy')
E + where <bound method UserDict.get of {'cohpstartenergy':
-15.0, 'cohpendenergy': 5.0, 'basisset': 'pbeVaspFit2015',
'gaussian...s'], 'skipdos': True, 'skipcohp': True, 'skipcoop': True,
'skippopulationanalysis': True, 'skipgrosspopulation': True}> =
{'cohpstartenergy': -15.0, 'cohpendenergy': 5.0, 'basisset':
'pbeVaspFit2015', 'gaussiansmearingwidth': 0.1, 'basisfun...4s'],
'skipdos': True, 'skipcohp': True, 'skipcoop': True,
'skippopulationanalysis': True, 'skipgrosspopulation': True}.get
E + where {'cohpstartenergy': -15.0, 'cohpendenergy': 5.0,
'basisset': 'pbeVaspFit2015', 'gaussiansmearingwidth': 0.1,
'basisfun...4s'], 'skipdos': True, 'skipcohp': True, 'skipcoop': True,
'skippopulationanalysis': True, 'skipgrosspopulation': True} =
<tests.io.lobster.test_inputs.TestLobsterin
testMethod=test_dict_functionality>.Lobsterinfromfile

.pybuild/test_python3.12/tests/io/lobster/test_inputs.py:1655:
AssertionError
______________________ TestVasprun.test_potcar_not_found
_______________________

self = <tests.io.vasp.test_outputs.TestVasprun
testMethod=test_potcar_not_found>

     def test_potcar_not_found(self):
         filepath = f"{TEST_FILES_DIR}/vasprun.xml"
         # Ensure no potcar is found and nothing is updated
         with pytest.warns(UserWarning, match="No POTCAR file with
matching TITEL fields was found in") as warns:
             vasp_run = Vasprun(filepath, parse_potcar_file=".")
 > assert len(warns) == 2
E assert 3 == 2
E + where 3 = len(WarningsChecker(record=True))

/<<PKGBUILDDIR>>/.pybuild/test_python3.12/tests/io/vasp/test_outputs.py:645:
AssertionError
_________________________ TestVasprun.test_unconverged
_________________________

self = <tests.io.vasp.test_outputs.TestVasprun testMethod=test_unconverged>

     def test_unconverged(self):
         filepath = f"{TEST_FILES_DIR}/vasprun.xml.unconverged"
         with pytest.warns(UnconvergedVASPWarning,
match="vasprun.xml.unconverged is an unconverged VASP run") as warns:
             vasprun_unconverged = Vasprun(filepath,
parse_potcar_file=False)
 > assert len(warns) == 1
E assert 2 == 1
E + where 2 = len(WarningsChecker(record=True))

/<<PKGBUILDDIR>>/.pybuild/test_python3.12/tests/io/vasp/test_outputs.py:298:
AssertionError

Revision history for this message
Benjamin Drung (bdrung) wrote :

Updating to pymatgen 2024.5.1 should fix that failure. That release contains commit c1a610c259620509d47ca60db11a4ad32d085994 that adds official support for Python 3.12.

tags: added: ftbfs update-excuse
Changed in pymatgen (Ubuntu):
importance: Undecided → High
Changed in pymatgen (Debian):
importance: Undecided → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.