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

Support future deprecated API for Context #2494

Merged
merged 3 commits into from
May 16, 2023
Merged

Conversation

Hind-M
Copy link
Member

@Hind-M Hind-M commented Apr 26, 2023

No description provided.

@JohanMabille
Copy link
Member

I think you need to update the stubs too.

@Hind-M
Copy link
Member Author

Hind-M commented Apr 26, 2023

Yeah I know (It was on purpose to have the answer from the CI ^^)

@Hind-M
Copy link
Member Author

Hind-M commented Apr 26, 2023

@AntoinePrv I was wondering if the deprecated function works?
https://github.com/mamba-org/mamba/blob/main/libmambapy/src/main.cpp#L65-L70
I tested locally (in the context of this PR) but it doesn't seem to. Did I miss something?

@AntoinePrv
Copy link
Member

@Hind-M they should work properly, but maybe what you are seeing is that Python does not show them by default.
The reason for that is that they would otherwise show up for conda users, which we do not want.

At least that the distinction I understand between DeprecationWarning and FutureWarning (doc).

You can try for youself:

import warnings

warnings.warn("Le deprecation warning", DeprecationWarning, stacklevel=2)
warnings.warn("Le future warning", FutureWarning, stacklevel=2)

With python [file.py] vs python -Walways::DeprecationWarning [file.py].

Note that test frameworks, such as Pytest do enable warnings.

@Hind-M
Copy link
Member Author

Hind-M commented Apr 26, 2023

Ok I see, so I should remove enabling them by default in my last commit. Thanks!

@Hind-M Hind-M marked this pull request as ready for review April 26, 2023 12:25
@Hind-M Hind-M self-assigned this Apr 26, 2023
@JohanMabille JohanMabille merged commit 32c64cd into mamba-org:main May 16, 2023
20 checks passed
@Hind-M Hind-M deleted the ctx_api branch May 17, 2023 07:59
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.

None yet

3 participants