Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue16181

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:cookielib.http2time raises ValueError for invalid date.
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.6, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: BreamoreBoy, Charles.Jones, berker.peksag, python-dev
Priority:normalKeywords:patch

Created on2012-10-09 20:06 byCharles.Jones, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
issue16181_v1.diffberker.peksag,2013-02-21 09:04review
Messages (4)
msg172515 -(view)Author: Charles Jones (Charles.Jones)Date: 2012-10-09 20:06
The docs for http2time state that "None is returned if [...] the time is outside the representable range". However, it is raising a ValueError when a year larger than datetime.MAXYEAR is provided (actually raised downstream by calendar.date()).To reproduce:import cookielibprint cookielib.http2time("08-Oct-3697739")Expected Result:Should return NoneActual Result:Raises ValueError: year is out of range
msg182582 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2013-02-21 09:04
Patch attached with a test.
msg220640 -(view)Author: Mark Lawrence (BreamoreBoy)*Date: 2014-06-15 14:26
A simple patch is attached so could someone take a look please, thanks.
msg261721 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-03-14 03:47
New changeset838f68a76ea1 by Berker Peksag in branch '3.5':Issue#16181: cookiejar.http2time() now returns None if year is higher than datetime.MAXYEARhttps://hg.python.org/cpython/rev/838f68a76ea1New changeset8b7de03261f5 by Berker Peksag in branch 'default':Issue#16181: cookiejar.http2time() now returns None if year is higher than datetime.MAXYEARhttps://hg.python.org/cpython/rev/8b7de03261f5
History
DateUserActionArgs
2022-04-11 14:57:37adminsetgithub: 60385
2016-03-14 03:49:11berker.peksagsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.6, - Python 3.4
2016-03-14 03:47:46python-devsetnosy: +python-dev
messages: +msg261721
2014-06-15 14:36:30berker.peksagsetstage: patch review
versions: + Python 3.5, - Python 3.3
2014-06-15 14:26:53BreamoreBoysetnosy: +BreamoreBoy
messages: +msg220640
2013-02-21 09:04:48berker.peksagsetfiles: +issue16181_v1.diff
versions: + Python 3.3, Python 3.4
nosy: +berker.peksag

messages: +msg182582

keywords: +patch
2012-10-09 20:06:52Charles.Jonescreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp