Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@kevinjqliu
Copy link
Contributor

When looking into #1346, I was confused by why the datetime.datetime.utcfromtimestamp warning only errored for the branch and not for the main branch.
Turns out there's a bug in the _deprecation_warning code where all warnings are suppressed when displaying a deprecation warning. The datetime.datetime.utcfromtimestamp warning is suppressed in the main branch because the test also triggered other deprecation warnings. When those deprecation warnings are removed in the feature branch, the only other warning is shown and causes the test to fail.

This PR changes _deprecation_warning to temporarily override warning handling.

@kevinjqliu
Copy link
Contributor Author

Expecting this to surface the issue with pyspark using datetime.datetime.utcfromtimestamp and fail CI

@kevinjqliu kevinjqliu requested a review from Fokko November 20, 2024 20:29
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I like the context manager, thanks for fixing this!

@kevinjqliu kevinjqliu merged commit 8e0e6a1 into apache:main Nov 20, 2024
7 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/fix-deprecation-warning branch November 20, 2024 20:46
This was referenced Nov 25, 2024
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
* dont override global

* add back warning filter
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
* dont override global

* add back warning filter
JE-Chen pushed a commit to JE-Chen/iceberg-python that referenced this pull request Dec 23, 2024
* dont override global

* add back warning filter
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Dec 24, 2024
* dont override global

* add back warning filter
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.