[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: Hmm. I never noticed this. In the past I have used the (undocumented) PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official that struct is considering it doesn't show up in the documentation. I agree that it should be possible

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue16322> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25729] update pure python datetime.timedelta creation

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue25729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12750] add cross-platform support for %s strftime-format code

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue12750> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31839] datetime: add method to parse isoformat() output

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: This is a duplicate of #15873 and #24954 and can be closed, as `fromisoformat()` was added in Python 3.7. -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue31

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: I believe this can be consolidated with #15873 and closed, since that is finished and available in Python 3.7. -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue24

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue13305> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9305] Don't use east/west of UTC in date/time documentation

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue9305> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31898] Add a `recommended-packages.txt` file

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: > datetime.timezone -> pytz.timezone (updates driven by IANA timezone database) I will note that `pytz.timezone` and `datetime.timezone` are not really comparable (they do two very different things), and as of Python 3.6, `dateutil.tz` is the recom

[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: I don't believe this is a duplicate if #32267, which is actually about the %z directive. I think the implementation here is correct and the documentation is semi-correct, it depends on how you look at it, consider: >>> datetime(2018, 1, 1, 0

[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue33381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue33940> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34023] timedelta(seconds=x) strange results when type(x) == np.int32

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue34023> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue6280> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15443] datetime module has no support for nanoseconds

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue15443> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue23607> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue33701> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue29097> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10381] Add timezone support to datetime C API

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: This can be closed now, I think. -- ___ Python tracker <https://bugs.python.org/issue10381> ___ ___ Python-bugs-list mailin

[issue33941] datetime.strptime not able to recognize invalid date formats

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue33941> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle
Paul Ganssle added the comment: > I am aware of that. In fact, some of the draft versions of PEP 495 > implementation did contain such code. The problem is that any such > tz.fromutc() implementation would necessarily change the behavior of the old > programs. This I'm no

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle
Paul Ganssle added the comment: So I created a little patch for this, and when I was working on it I realized that it's actually possible to implement full `fold` support in a generic way in `fromutc` under the assumption that `utcoffset - dst` holds at all points (which is the fundamental

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +7050 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: Ah, actually, my mistake, RFC 3339 most assuredly *does* require a UTC offset: 4.4. Unqualified Local Time A number of devices currently connected to the Internet run their internal clocks in local time and are unaware

[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I think this is more a matter of misunderstanding the fact that ISO 8601 is a larger and more complicated spec than people think. You'll note that the original complaint also seems to think that a timezone is required (it is not). Y

[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-15 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I don't really agree with these changes to the documentation. The format that paulc identifies is actually an RFC 3339 datetime, which is a subset of ISO 8601, to the extent that you consider the fact that "we're using RFC 3339&

[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-01 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: ISO 8601 does not require an offset (in fact, most portions of the ISO 8601 date and time are optional - ISO 8601 is more complicated than most people think). Without an offset a datetime is assumed to be local time. The T del

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-04-22 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- versions: +Python 3.8 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28602> ___

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-20 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > Donald made an interesting suggestion over on > https://github.com/pypa/packaging-problems/issues/127#issuecomment-374401331, > which was to have distutils stop overwriting the Author metadata with the > Maintainer

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-17 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I've fixed this in setuptools ( PR here: https://github.com/pypa/setuptools/pull/1294 ). Should we leave this open to track distutils upgrading to support all of PEP 345, or close this with "distutils will never su

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-14 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: One thing that's unclear to me is whether PKG-INFO metadata spec should be considered exhaustive or whether you can add additional fields and still be considered compliant with the spec. If the latter is true, I think there's some

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-14 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @ncoghlan Yes, setuptools is affected. I've reported it there as well: https://github.com/pypa/setuptools/issues/1288 I have patches for both distutils and setuptools prepared. The distutils patch is more controversial b

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- keywords: +patch pull_requests: +5869 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33071] Document that PyPI no longer requires 'register'

2018-03-13 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: I've been asked to post this by @brainwave (who is having some trouble getting an account on bpo due to technical difficulties). Per twine's github issue 311 ( https://github.com/pypa/twine/issues/311 ), it seems that distutil'

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: This is basically the same as issue 962772, as there seems to have been a regression. The current version of distutils discards author= metadata if maintainer= is present, even though PEP 345 has added the Maintainer: and Main

[issue32988] datetime.datetime.strftime('%s') always uses local timezone, even with aware datetimes

2018-03-02 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I suspect discussion should be centralized in issue 12750, but if it were up to me %s would either work as expected or throw an error. Silently giving the wrong answer is a terrible comp

[issue32988] datetime.datetime.strftime('%s') always uses local timezone, even with aware datetimes

2018-03-02 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: It seems that %s is not supported and the fact that it works at all is incidental. See issue 12750 and this SO thread: https://stackoverflow.com/questions/11743019/convert-python-datetime-to-epoch-with-st

[issue32988] datetime.datetime.strftime('%s') always uses local timezone, even with aware datetimes

2018-03-02 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: adamwill: I think datetime's strftime is a wrapper around the system strftime, so it varies between platforms. Might be useful to specify which platform you are seeing this behavior on. -- nosy: +p-g

[issue10381] Add timezone support to datetime C API

2018-02-22 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5588 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue10381> ___ _

[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-02-22 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5589 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32403> ___ _

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2018-02-05 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5380, 5381 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2018-02-05 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5380 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue15873> ___ _

[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2018-01-26 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I'm not sure if this warrants a separate issue, but I also notice this in the documentation: > If the package cannot be located or loaded, or it uses a loader which does > not support get_data, then None is returned. I

[issue10381] Add timezone support to datetime C API

2018-01-25 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5164 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue10381> ___ _

[issue10381] Add timezone support to datetime C API

2018-01-25 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +5163 stage: resolved -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > Still, this feature is not appealing enough to try to squeeze into 3.7 > release schedule. I think this should go through a round of discussion > either on datetime-sig or python-ideas. Agreed. I will put togeth

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > This can be accomplished rather efficiently by truncating a time tuple: This will not preserve tzinfo, and (though this is not a concern unless nanosecond precision is added), I don't believe it preserves microseconds either.

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > Looking at the dateutil, I don't see a truncate to rrule function. Maybe a > good starting point would be to implement that in dateutil and if some > simpler pattern emerges that can be proposed for stdlib, we can discuss

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > In my experience, when dealing with temporal data truncation (rounding > towards -infinity) is more useful than any other form of rounding. See also > issue 19475. Ah, I agree - if you see that's how my __round__ implemen

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: One thing to note, the "example implementation" of __round__ above is an actual working prototype*: >>> round(Datetime.now(), 'second') Datetime(2018, 1, 9, 11, 59, 35) >>> round(Datetime.now(), 'day') Dat

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I think if we're going to use `timedelta` then `__mod__` is the more appropriate option here, since it would be hard to interpret what `round(dt, timedelta(hours=2, microseconds=31))` would do. Either __mod__ or __round__ with `tim

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @Barry I don't think it's a good idea to duplicate the `replace` functionality in `datetime` like that. I think the main problem isn't the `.replace`, it's the fact that you have to specify exactly which components you want to set to

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32522> ___ _

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @Victor: With regards to getting a "date as datetime", that is another way to do it that I have also done in the past (and in fact it's how the new dateutil.utils.today() function is implemented: https://github.com/dateut

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: An alternate possibility here might be to implement either `__round__` or a `round` function in `datetime` (which would basically automatically add this precision functionality to *all* the constructors, not just now). An e

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: One thing I think that is fairly common is the desire to get the current datetime only up to a current precision, so you see a lot of things in, say, `dateutil` like this: dt = datetime.now().replace(hours=0, minutes=0, sec

[issue30541] Add restricted mocks to the python unittest mocking framework

2018-01-05 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +4974 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30541> ___ _

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: Sorry, forgot to include the link to the dateutil implementation of the fold-resolution code: https://github.com/dateutil/dateutil/pull/517/files -- ___ Python tracker <rep...@bugs.p

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: By the way, one possibly significant problem with this interface is that it would tend to encourage the use of static timezone offsets rather than rule sets as intended by `tzinfo`. The main problem is that a simple mapping between

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: This is essentially what the `tzinfos` argument to `dateutil.parser.parse` does. I do think something *like* this is the only reasonable way to handle %Z->tzinfo mappings. In `dateutil` (https://dateutil.readthedocs.io/

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @Nick I'm certainly fine with re-configuring my PR to center around a new capsule module with deprecation of the old C API (though if you have any examples of what you have in mind that would be helpful to me). Certainly the &qu

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-28 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > There is no "fork" involved in other projects using it, from our point of > view. I did not mean "fork" in some judgmental sense, I'm mostly just familiar with pypy, but I was under the impression tha

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-28 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @Andrew Are you suggesting that a `copy` method be *added* to the C implementation, as an alias to __copy__? Because it makes no sense to keep the pure Python and C implementations out of sync just so that it's easier for projects f

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-28 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > I mean dropping `.copy()` breaks not only compatibility between pure python > versions but also between pypy releases and pypy/CPython code. That's why I suggest to keep `.copy()` as an alias for `__copy__()`. If th

[issue10381] Add timezone support to datetime C API

2017-12-28 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- keywords: +patch pull_requests: +4919 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue10381] Add timezone support to datetime C API

2017-12-28 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- nosy: +p-ganssle ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue10381> ___ _

[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2017-12-23 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- keywords: +patch pull_requests: +4882 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32403] date, time and datetime alternate constructors should take fast construction path

2017-12-23 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- keywords: +patch pull_requests: +4881 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: I've noticed that there's another complicating factor here, which is that addition of `timedelta` does not respect subclasses either, which means that third party libraries implementing fromutc (as was recommended in issue 28602)

[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: When preparing some tests for how subclasses of date and datetime react as part of a fix for issue 32403, I noticed a fairly big example of where subclass is not preserved - `tzinfo.fromutc`: from datetime import datetime, ti

[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2017-12-21 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: In writing some tests for the alternate date constructors as part of my PR for issue 32403 (https://bugs.python.org/issue32403), I noticed that for `datetime`, the `fromtimestamp` bypasses the `__new__` call on the subclass:

[issue32403] date, time and datetime alternate constructors should take fast construction path

2017-12-21 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: In the addition of the `fromisoformat()` alternate constructor (bpo-15873: https://github.com/python/cpython/pull/4699), I noted that I was able to get some significant speedup by special-casing the `datetime` baseclass in the C c

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-18 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > Not if the time is associated with a particular day. Imagine implementing > datetime.fromisoformat by separately calling date.fromisoformat and > time.fromisoformat. The date will be off by one day if you naively rounded

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-17 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @martin.panter I don't see the problem here? Wouldn't 23:59.995 round up to 00:00? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2017-12-12 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +4721 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue5288> ___ _

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-04 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > The other difference is Mattieu guarantees ValueError for invalid input > strings, which I think is good. I forgot to address this - but I don't think this is a difference in approaches. If you pass `None` or an int

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-04 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: > The better is the enemy of the good here. Given the history of this issue, I > would rather accept a well documented restrictive parser than wait for a more > general code to be written. Note that we can always relax th

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-04 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- pull_requests: +4611 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue15873> ___ _

[issue32213] assertRaises and subTest context managers cannot be nested

2017-12-04 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: @r.david.murray So it is, my mistake. I think I was conflating issues when this first came up, and then I didn't notice that the order the test cases printed in was different than I expected. -- stage: -> resolved sta

[issue32213] assertRaises and subTest context managers cannot be nested

2017-12-04 Thread Paul Ganssle
New submission from Paul Ganssle <p.gans...@gmail.com>: The TestCase.assertRaises and TestCase.subTest macros apparently don't interact with each other well. To demonstrate, consider the following code: from unittest import TestCase class SubTestRaisesTest(TestCase):

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-10-30 Thread Paul Ganssle
Paul Ganssle <p.gans...@gmail.com> added the comment: Some time ago this was fixed in pypy3: https://bitbucket.org/pypy/pypy/issues/2635/datetimereplace-always-returns I made a PR fixing this for `datetime`, `date` and `time`. -- ___ Python t

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-10-30 Thread Paul Ganssle
Change by Paul Ganssle <p.gans...@gmail.com>: -- keywords: +patch pull_requests: +4145 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

<    1   2   3   4   5