fangchenli opened a new pull request, #57071:
URL: https://github.com/apache/spark/pull/57071

   ### What changes were proposed in this pull request?
   
   In `test_timezone_with_pandas`, compare the series timezone via 
`str(dtype.tz)` instead of the pytz-specific `dtype.tz.zone` attribute.
   
   ### Why are the changes needed?
   
   pandas 3 defaults tz-aware dtypes to `zoneinfo.ZoneInfo` instead of `pytz`. 
`ZoneInfo` has no `.zone` attribute, so `ser1.dtype.tz.zone` raised 
`AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'zone'` under 
pandas 3. `str(dtype.tz)` yields the zone name (e.g. "Asia/Singapore") for both 
`pytz` (pandas 2) and `zoneinfo` (pandas 3). 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, test-only.
   
   ### How was this patch tested?
   
   `test_pyarrow_ignore_timezone` passes under pandas 3 + pyarrow 23, pandas 2 
+ pyarrow 23, and pandas 2 + pyarrow 22.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 4.8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to