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

Import fails with -Werror python option #2822

Closed
headtr1ck opened this issue Nov 25, 2022 · 4 comments
Closed

Import fails with -Werror python option #2822

headtr1ck opened this issue Nov 25, 2022 · 4 comments
Assignees
Labels
closed-for-staleness dependencies This issue is a problem in a dependency. response-requested Waiting on additional info and feedback.

Comments

@headtr1ck
Copy link

Describe the bug

When importing botocore.session with the python option -Werror the import fails.

Expected Behavior

Import works

Current Behavior

The import raises:

E DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: urllib3/urllib3#2680

Reproduction Steps

python -Werror -c "import botocore.session"

Possible Solution

In line:

except ImportError:

add DeprecationWarning to the excepted Errors.

Additional Information/Context

See pydata/xarray#7322 which run into this problem.

SDK version used

1.27.59

Environment details (OS name and version, etc.)

Win10/linux

@headtr1ck headtr1ck added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Nov 25, 2022
@tim-finnigan tim-finnigan self-assigned this Nov 28, 2022
@tim-finnigan
Copy link
Contributor

Hi @headtr1ck thanks for reaching out. This issue was previously reported here: #2744. You can refer to the discussion there for more context as well as the corresponding PR (#2763) for suppressing the warning. Please let us know if you had any follow up questions after reviewing the comments there.

@tim-finnigan tim-finnigan added response-requested Waiting on additional info and feedback. dependencies This issue is a problem in a dependency. closing-soon and removed bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. response-requested Waiting on additional info and feedback. labels Nov 28, 2022
@headtr1ck
Copy link
Author

Thanks for pointing out that issue. Unfortunately in my case the solution of this PR does not work since no warning is issued when using -Werror but an error is raised.

So adding the DeprecationWarning to the expect block is the only thing that would help.

@tim-finnigan
Copy link
Contributor

Do you see that error on the latest version of boto3/botocore?

@tim-finnigan tim-finnigan added the response-requested Waiting on additional info and feedback. label Dec 7, 2022
@github-actions
Copy link

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness dependencies This issue is a problem in a dependency. response-requested Waiting on additional info and feedback.
Projects
None yet
Development

No branches or pull requests

2 participants