Skip to content
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

Can we get a new release with scheduled deprecations removed #4248

Closed
lbluque opened this issue Jan 8, 2025 · 4 comments
Closed

Can we get a new release with scheduled deprecations removed #4248

lbluque opened this issue Jan 8, 2025 · 4 comments
Labels

Comments

@lbluque
Copy link
Contributor

lbluque commented Jan 8, 2025

Python version

Python 3.12

Pymatgen version

v2024.11.13

Operating system version

No response

Current behavior

The latest release v2024.11.13 does not have deprecated functions past their deadlines removed:

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/io/ase.py:16: in <module>
    from pymatgen.core.structure import Molecule, Structure
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/__init__.py:12: in <module>
    from pymatgen.core.composition import Composition
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/composition.py:22: in <module>
    from pymatgen.core.periodic_table import DummySpecies, Element, ElementType, Species, get_el_sp
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py:63: in <module>
    class ElementBase(Enum):
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py:7[55](https://github.com/FAIR-Chem/fairchem/actions/runs/12676568814/job/35330031581?pr=963#step:7:56): in ElementBase
    @deprecated(is_rare_earth, message="is_rare_earth is corrected to include Y and Sc.", deadline=(2025, 1, 1))
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/monty/dev.py:1[57](https://github.com/FAIR-Chem/fairchem/actions/runs/12676568814/job/35330031581?pr=963#step:7:58): in deprecated
    raise_deadline_warning()
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/monty/dev.py:86: in raise_deadline_warning
    raise DeprecationWarning(
E   DeprecationWarning: This function should have been removed on 2025-01-01.

Expected Behavior

A new release with the deprecated functions removed.

Minimal example

No response

Relevant files to reproduce this bug

No response

@lbluque lbluque added the bug label Jan 8, 2025
@DanielYang59
Copy link
Contributor

DanielYang59 commented Jan 9, 2025

Hi @lbluque happy new year.

Looks like you might be using Python 3.9, and unfortunately both pymatgen and monty have dropped Python 3.9 support.

If you have to use Python 3.9, you might need to temporarily remove the CI environment variable to disable the deprecation check for now, #4243 (comment)

If you're happy to move to Python 3.10 and onwards, the latest monty 2025.1.3 has fixed this issue so you wouldn't get that deprecation exception anymore


Update: I have opened a PR to revert Python 3.9 support for monty, if this got accepted, no workaround might be needed:

@DanielYang59
Copy link
Contributor

@lbluque A new release of monty (which supports Python 3.9) is out, and a pymatgen release too.

@lbluque
Copy link
Contributor Author

lbluque commented Jan 10, 2025

Thanks a lot @DanielYang59 for the timely response and release!

@lbluque lbluque closed this as completed Jan 10, 2025
@DanielYang59
Copy link
Contributor

No problem, I'm not a maintainer so the credit goes to Shyue.

I learned a lot from your nearest neighbor code as well BTW :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants