Skip to content

Conversation

@jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Looks fine to me - does this need a whatsnew note if it fixes a segfault? Also, is there a way to reproduce the segfault locally?

@jbrockmendel
Copy link
Member Author

jbrockmendel commented Nov 28, 2022

does this need a whatsnew note if it fixes a segfault?

Nope, only relevant in main, not in any released version.

Also, is there a way to reproduce the segfault locally?

dti = pd.date_range(start="2015-03-29 02:00:00", periods=60, freq="min") tz = zoneinfo.ZoneInfo("Europe/Warsaw") dti.tz_localize(tz, nonexistent="shift_forward") 
@MarcoGorelli
Copy link
Member

MarcoGorelli commented Nov 28, 2022

Ah I was getting AttributeError, perhaps because I was using the zoneinfo backport on python3.8

In [1]: from backports import zoneinfo In [2]: dti = pd.date_range(start="2015-03-29 02:00:00", periods=60, freq="min") ...: tz = zoneinfo.ZoneInfo("Europe/Warsaw") ...: dti.tz_localize(tz, nonexistent="shift_forward") AttributeError: 'NoneType' object has no attribute 'total_seconds' 

I'll try in python3.9

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Can reproduce in Python 3.9 - looks good to me!

@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Nov 28, 2022
@MarcoGorelli MarcoGorelli added the Timezones Timezone data dtype label Nov 28, 2022
@mroeschke mroeschke merged commit 0d2c579 into pandas-dev:main Nov 28, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the nonexistent branch November 28, 2022 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Timezones Timezone data dtype

3 participants