[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Ned Deily

Ned Deily  added the comment:

(Removing “3.7regression” as the problematic change for 3.7 had not yet been 
released.)

--
keywords:  -3.7regression

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1b1796df3a4292067a174faa11b1a852f79e98e3 by Pablo Galindo in 
branch '3.7':
[3.7] bpo-37915: Fix comparison between tzinfo objects and timezone objects 
(GH-15390) (GH-15417)
https://github.com/python/cpython/commit/1b1796df3a4292067a174faa11b1a852f79e98e3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +3.7regression -patch
nosy: +ned.deily
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +15118
pull_request: https://github.com/python/cpython/pull/15417

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 5c77730300c0358d7bebd2bb39ea5d10222a3d9a by Miss Islington (bot) 
in branch '3.8':
bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)
https://github.com/python/cpython/commit/5c77730300c0358d7bebd2bb39ea5d10222a3d9a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15107
pull_request: https://github.com/python/cpython/pull/15399

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington


miss-islington  added the comment:


New changeset 4be11c009abe88175fa164b45e4838e7267dfa97 by Miss Islington (bot) 
(Pablo Galindo) in branch 'master':
bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)
https://github.com/python/cpython/commit/4be11c009abe88175fa164b45e4838e7267dfa97


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +lukasz.langa
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks, Tom and Karthikeyan for the finding and the debugging :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is due to an incorrect type check in the timezone_richcompare, it should 
be a comparison against PyDateTime_TimeZoneType not against 
PyDateTime_TZInfoType. The segfault is due to an invalid casting to 
PyDateTime_TimeZoneType (the child) from the parent (PyDateTime_TZInfoType).

--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Tom Augspurger


Tom Augspurger  added the comment:

Thanks for debugging this Karthikeyan and for the quick fix Pablo!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +15100
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15390

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Seems this is due to issue37685 (dde944f9df) on bisecting datetime related 
changes. Adding Serhiy. I guess this could be marked as release blocker.

Here is a simplified reproducer on extracting pytz.utc source [0] which is an 
object of simple subclass of datetime.tzinfo : 

import sys
import datetime

print(sys.version)
class UTC(datetime.tzinfo):
pass

print(datetime.timezone.utc == UTC())
datetime.timezone.utc == datetime.tzinfo() # This also segfaults without a 
subclass and should be False

# Segfaults

➜  cpython git:(dde944f9df) git checkout dde944f9df && make -s -j4 > /dev/null
HEAD is now at dde944f9df bpo-37685: Fixed comparisons of datetime.timedelta 
and datetime.timezone. (GH-14996)
➜  cpython git:(dde944f9df) ./python.exe ../backups/bpo37915.py
3.8.0b3+ (tags/v3.8.0b3-30-gdde944f9df:dde944f9df, Aug 22 2019, 17:55:14)
[Clang 7.0.2 (clang-700.1.81)]
[1]33988 segmentation fault  ./python.exe ../backups/bpo37915.py

# Commit before works fine

➜  cpython git:(dde944f9df) git checkout dde944f9df~1 && make -s -j4 > /dev/null
Previous HEAD position was dde944f9df bpo-37685: Fixed comparisons of 
datetime.timedelta and datetime.timezone. (GH-14996)
HEAD is now at 4e402d37eb Correct description of HTTP status code 308. 
(GH-15098)
➜  cpython git:(4e402d37eb) ./python.exe ../backups/bpo37915.py
3.8.0b3+ (tags/v3.8.0b3-30-gdde944f9df:dde944f9df, Aug 22 2019, 17:55:14)
[Clang 7.0.2 (clang-700.1.81)]
False


[0] 
https://github.com/stub42/pytz/blob/62f872054dde69e5c510094093cd6e221d96d5db/src/pytz/__init__.py#L256

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
title: Segfault in comparison between datetime.timezone.utc and putz.utc -> 
Segfault in comparison between datetime.timezone.utc and pytz.utc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com