Skip to content

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Aug 18, 2025

Summary

Fix the following 3.11+ only syntax:

Changed in version 3.11: Expressions in an expression list may be starred. See PEP 646.

E     File "/home/yang/pmg/src/pymatgen/io/jdftx/outputs.py", line 328
E       projections[spins[i]][:, :, *u_to_oa_map[u]] += proj_sjku[i, :, :, u]
E                                   ^
E   SyntaxError: invalid syntax

cc @benrich37

@DanielYang59 DanielYang59 marked this pull request as ready for review August 18, 2025 18:53
@benrich37
Copy link
Contributor

Sorry about this! I was under the impression when I wrote this that pymatgen was for python 3.12+, thank you for fixing this!

@DanielYang59
Copy link
Contributor Author

no problem at all,

pymatgen/pyproject.toml

Lines 47 to 51 in 12011a1

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",

Also noticed we don't test 3.10 and that's the reason this was not caught, maybe we should consider moving one of the windows configs to 3.10

@shyuep shyuep merged commit 38997ee into materialsproject:master Aug 21, 2025
43 of 44 checks passed
@DanielYang59 DanielYang59 deleted the fix-jdftx-syntax branch August 21, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants