Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(95793)

#19940: ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 11 months ago by 4kir4.1i
Modified:
5 years, 6 months ago
Reviewers:
pitrou
CC:
bill.janssen_gmail.com, AntoinePitrou, christian.heimes, docs_python.org, akira, devnull_psf.upfronthosting.co.za, shankhabanerjee_gmail.com
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 12

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Total comments: 4

Patch Set 6 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/ssl.rst View 1 2 3 4 5 1 chunk +23 lines, -11 lines 0 comments Download
Lib/ssl.py View 1 2 3 4 5 1 chunk +27 lines, -5 lines 0 comments Download
Lib/test/test_ssl.py View 1 2 3 4 5 2 chunks +71 lines, -0 lines 0 comments Download

Messages

Total messages: 3
AntoinePitrou
Here are a couple comments on the patch. Since those are mostly cosmetic, I'll fix ...
5 years, 8 months ago #1
akira
Thank you for the review. Sorry for the delay. I have not received e-mail notification. ...
5 years, 7 months ago #2
AntoinePitrou
5 years, 6 months ago #3
Thanks for the patch! I think it looks mostly good. A couple of very minor
comments below.

http://bugs.python.org/review/19940/diff/11721/Doc/library/ssl.rst
File Doc/library/ssl.rst (right):

http://bugs.python.org/review/19940/diff/11721/Doc/library/ssl.rst#newcode397
Doc/library/ssl.rst:397: previously. Return an integer (no fractions of a second
in the
You say "return an integer" but your example shows a floating-point number.

http://bugs.python.org/review/19940/diff/11721/Lib/ssl.py
File Lib/ssl.py (right):

http://bugs.python.org/review/19940/diff/11721/Lib/ssl.py#newcode906
Lib/ssl.py:906: # return an integer, break compatibility with the previous
This comment sounds a bit scary, but returning an integer shouldn't really
"break compatibility". I suggest to reword it and make it lighter.

http://bugs.python.org/review/19940/diff/11721/Lib/test/test_ssl.py
File Lib/test/test_ssl.py (right):

http://bugs.python.org/review/19940/diff/11721/Lib/test/test_ssl.py#newcode675
Lib/test/test_ssl.py:675: def test_cert_time_to_seconds_returned_type(self):
I don't think checking that an int (rather than a float) is returned is useful.
Float timestamps are perfectly normal in Python.

http://bugs.python.org/review/19940/diff/11721/Lib/test/test_ssl.py#newcode688
Lib/test/test_ssl.py:688: self.assertEqual(timestring.replace(' 5', '05'),
d_timestring)
This assertEqual looks a bit pointless.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+