Skip to content

Fix jdftx.outputs usage of 3.11+ only syntax #4484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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

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.

2 participants