[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Paul Czyzewski
Paul Czyzewski added the comment: oops, if "k=400" -- ___ Python tracker <https://bugs.python.org/issue33494> ___ ___ Python-bugs-list mailing list Uns

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Paul Czyzewski
Paul Czyzewski added the comment: or, for a minimal doc change, change this sentence: "For example, the relative weights [10, 5, 30, 5] are equivalent to the cumulative weights [10, 15, 45, 50]," to: "For example, the relative call 'weights[10, 5, 30, 5]' is equivalen

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-15 Thread Paul Goins
Paul Goins added the comment: If we consider this to be the new normal... What about increasing the timeout to accomodate? From what I could gather, builds were running around 13 minutes or so before the changes, so the timeout wasn't much above actual exec time to begin with. Maybe

[issue31569] inconsistent case of PCbuild/ directory

2017-09-24 Thread Paul Moore
Paul Moore added the comment: I would strongly prefer the docs to be changed to match the implementation rather than the other way round. However, I don't see the use case for this - what case sensitive filesystem would anybody be building the Windows version of Python on? I&#x

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: OK, having re-read the PR, I'm fine with applying it as is, too. -- ___ Python tracker <https://bugs.python.org/issue31569> ___ ___

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: New changeset f1502d097c29b266a5748312ee2451a2d6ac0af6 by Paul Moore (Stefan Grönke) in branch 'master': bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) https://github.com/python/cpyt

[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Paul Moore
Paul Moore added the comment: I believe that's the case, although I'm somewhat surprised by the nature of the error. I'm just checking diffs at the moment. But VS 2015 is the officially supported compiler for 3.6. -- ___ Python

[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Paul Moore
Paul Moore added the comment: Standard Windows behaviour, in my experience, is inherited permissions. IMO, the current behaviour is correct - we default to an OS-managed secure location for system wide installs, and a user-modifiable location for user installs. If the person doing the

[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore
Paul Moore added the comment: Definitely. The reason it uses uncompressed files is simply an oversight on my part - I hadn't realised the default for zipfile was uncompressed. -- ___ Python tracker <https://bugs.python.org/is

[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore
Paul Moore added the comment: New changeset d87b105ca794addf92addb28293c92a7ef4141e1 by Paul Moore (Zhiming Wang) in branch 'master': bpo-31638: Add compression support to zipapp (GH-3819) https://github.com/python/cpython/commit/d87b105ca794addf92addb28293c92

[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore
Change by Paul Moore : -- assignee: -> paul.moore resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python

[issue31735] Documentation incorrectly states how descriptors are invoked

2017-10-09 Thread Paul Pinterits
New submission from Paul Pinterits : The [descriptor howto](https://docs.python.org/3/howto/descriptor.html#invoking-descriptors) states: "For example, obj.d looks up d in the dictionary of obj. If d defines the method __get__(), then d.__get__(obj) is invoked [...]" This is not

[issue31735] Documentation incorrectly states how descriptors are invoked

2017-10-09 Thread Paul Pinterits
Paul Pinterits added the comment: I'm aware that descriptors have to exist on the class in order to work. The point is that the documentation states "If d defines the method __get__(), then d.__get__(obj) is invoked" (where d is obj.d), which is

[issue31735] Documentation incorrectly states how descriptors are invoked

2017-10-09 Thread Paul Pinterits
Paul Pinterits added the comment: If we take this class: class Obj: @property def d(self): print('called') And we access Obj.d: _ = Obj.d According to the docs, the following should happen: # obj.d looks up d in the dictionary of obj d = Obj.__dict__['d&#x

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-10 Thread Paul Moore
Paul Moore added the comment: The "backports" module you refer to as being in site-packages is not shipped with the standard library, it's a 3rd party addon that presumably you installed yourself. You'll need to let us know what you did to install it. You say you manipula

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Paul Moore
Paul Moore added the comment: > I did use `pip` to install packages as you'll see in the screenshot. Sorry, I don't see any pip commands. Please could you include sample commands inline as text, and not as screenshots, as attached files aren't accessible from emails... A

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Paul Moore
Paul Moore added the comment: My feeling is still that it's an issue with things (i.e., imports) happening before you adjust sys.path. But without seeing actual code that reproduces the issue, there's no way of being sure. And if that is what's going on, it wouldn't b

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-12 Thread Paul Moore
Paul Moore added the comment: Also, one of the packages installed creates a file configparser-3.5.0-py2.7-nspkg.pth This has some very suspicious looking content: import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'],

[issue31640] Document exit() from parse_args

2017-10-12 Thread paul j3
paul j3 added the comment: And the actual exit is via `parse.error` and `parse.exit`, which are documented in 16.4.5.9. When run interactively in Ipython, exits (including the help) are captured and displayed with: In [896]: parser.parse_args() usage: ipython3 [-h] [--one | --two | --six

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-12 Thread paul j3
paul j3 added the comment: As documented in many other issues, the usage formatter is brittle. It formats the individual usages, joins them into a string. Then if too long to fit on one line it tries t split into actions, etc. This split produces an assertion error if there are '

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-12 Thread paul j3
paul j3 added the comment: I've changed your example a bit to clarify some points. parser.add_argument('n', type=int) group = parser.add_mutually_exclusive_group() group.add_argument("-v", "--verbose", action="store_true") group.add

[issue9253] argparse: optional subparsers

2017-10-18 Thread paul j3
paul j3 added the comment: In a recent stackoverflow question a user wanted this optional-subparsers ability in Python 2.7. https://stackoverflow.com/questions/46667843/how-to-set-a-default-subparser-using-argparse-module-with-python-2-7 Short of modifying the _parse_known_args method, the

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-19 Thread Paul G
Paul G added the comment: This seems very useful to me. I very frequently advise people *against* using dateutil.parser (despite my conflict of interest as maintainer of dateutil) for well-known formats, but the problem frequently comes up of, "what should I do when I have date creat

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

2017-10-30 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +4145 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31222> ___ ___ Py

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

2017-10-30 Thread Paul Ganssle
Paul Ganssle 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 tracker <ht

[issue31863] Inconsistent returncode/exitcode for terminated child processes on Windows

2017-11-05 Thread Paul Moore
Paul Moore added the comment: I'm not actually sure what the proposal here is. Are we suggesting that all Python's means of terminating a process should use the same exit code? Note that doing so would be a backward compatibility break, as os.kill() is documented as having the beha

[issue31951] import curses is broken on windows

2017-11-06 Thread Paul Moore
Paul Moore added the comment: The docs for the curses module say "While curses is most widely used in the Unix environment, versions are available for Windows, DOS, and possibly other systems as well." This is the only mention of platform support I can see. It might be worth

[issue24132] Direct sub-classing of pathlib.Path

2017-11-08 Thread Paul Moore
Paul Moore added the comment: @elguavas the problem is, no-one has proposed a patch. There's not likely to be much movement on this until someone provides one. -- ___ Python tracker <https://bugs.python.org/is

[issue31879] Launcher fails on custom command starting with "python"

2017-11-08 Thread Paul Moore
Paul Moore added the comment: Personally I don't see the value (in general, I don't see much use for the whole custom command idea - making the launcher into a generalised shebang processor was never really a core feature). But I'm not going to say no if others find it useful

[issue31998] test_zipapp failed when the zlib module is not available

2017-11-10 Thread Paul Moore
Paul Moore added the comment: Good catch, thanks Serhiy! -- ___ Python tracker <https://bugs.python.org/issue31998> ___ ___ Python-bugs-list mailing list Unsub

[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long
New submission from Paul Long : It would be helpful if the CSV module included standard functions that simplify the import of CSV files to a list and the export of CSV files to a list. Here's an example of what they could be: def csv2list(file_name): list_name=[] with

[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long
Paul Long added the comment: I should have added that there are thousands of 15 year old students completing GCSE Computer Science who would benefit massively from this. All the exam boards in England require students to be able to read from and write to CSV files. The complicated way of

[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long
Paul Long added the comment: Thanks for your advice. The reason it's not provided as a canned function is because different schools can use different programming languages, although the vast majority choose to use Python. -- ___ Python tr

[issue32116] CSV import and export simplified

2017-11-24 Thread Paul Long
Change by Paul Long : -- keywords: +patch pull_requests: +4478 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32116> ___ ___ Python-

[issue32213] assertRaises and subTest context managers cannot be nested

2017-12-04 Thread Paul Ganssle
New submission from Paul Ganssle : 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): def test_assert_outer

[issue32213] assertRaises and subTest context managers cannot be nested

2017-12-04 Thread Paul Ganssle
Paul Ganssle 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 status: open -

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

2017-12-04 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +4611 ___ Python tracker <https://bugs.python.org/issue15873> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-12-04 Thread Paul Ganssle
Paul Ganssle 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 the parsing rules > i

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

2017-12-04 Thread Paul Ganssle
Paul Ganssle 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 or something, the problem

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread paul j3
paul j3 added the comment: Did you copy the output right? Testing your parser: Without any arguments, I get the exclusive group error - the group is required: 0930:~/mypy/argdev$ python3 issue18943.py usage: issue18943.py [-h] (--device-get-capabilities | --ptz-absolute

[issue32123] Make the API of argparse.HelpFormatter public

2017-12-06 Thread paul j3
paul j3 added the comment: A difficulty with writing a public API is that useful changes can occur at almost any level of the class. The existing subclasses modify small, but deep methods, ones that handle things like line wrapping. On the other hand, most of the issues you cite deal with

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread paul j3
paul j3 added the comment: That's not how flagged (optionals) arguments work. The default value is used if the flag is not provided at all. One of your arguments is a 'store_true'. Its default value if False, which is changed to True if the '--device-get-capabiliti

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-12-06 Thread paul j3
paul j3 added the comment: In the recently pushed, https://bugs.python.org/issue14191, "argparse doesn't allow optionals within positionals" we added new parsing functionality by defining a new parser method: parse_intermixed_args It added functionality without requiring a ne

[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 : -- pull_requests: +4721 ___ Python tracker <https://bugs.python.org/issue5288> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32350] pip can't handle MSVC warnings containing special characters

2017-12-17 Thread Paul Moore
Paul Moore added the comment: This is a pip issue, not a Python issue. It's a known issue in the current version of pip, and should be fixed in the development version (via pull request https://github.com/pypa/pip/pull/4486). If you like, you can try the development version of pip. A

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

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

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

2017-12-18 Thread Paul Ganssle
Paul Ganssle 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 > 2017-12-18 23:59 “up” t

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

2017-12-21 Thread Paul Ganssle
New submission from Paul Ganssle : 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 code so that it bypasses the

[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2017-12-21 Thread Paul Ganssle
New submission from Paul Ganssle : 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: from datetime import datetime

[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle
New submission from Paul Ganssle : 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, timezone class

[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle
Paul Ganssle 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), who will likely m

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

2017-12-23 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +4881 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32403> ___ ___ Py

[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2017-12-23 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +4882 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32404> ___ ___ Py

[issue10381] Add timezone support to datetime C API

2017-12-28 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue10381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10381] Add timezone support to datetime C API

2017-12-28 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +4919 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

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

2017-12-28 Thread Paul Ganssle
Paul Ganssle 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 the main issue is that pypy user

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

2017-12-28 Thread Paul Ganssle
Paul Ganssle 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 forking the pure P

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

2017-12-28 Thread Paul Ganssle
Paul Ganssle 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 that other projects were *l

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Paul Ganssle
Paul Ganssle 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 "C global needs to be

[issue17972] inspect module docs omits many functions

2018-01-03 Thread Paul Rudin
Paul Rudin added the comment: If some are to be considered private then the questions are: which ones and how to fix. Presumably renaming to start with "_" might break existing code, so maybe adding an __all__, and just including the public objects is better? That could break cod

[issue17972] inspect module docs omits many functions

2018-01-05 Thread Paul Rudin
Paul Rudin added the comment: Documenting and generating a deprecation warning also makes them part of the documented public api. Or are you suggesting just the warning without including in the documentation? Incidentally, there are also the classes BlockFinder and EndOfBlock, which are

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

2018-01-05 Thread Paul Ganssle
Paul Ganssle 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/en/latest/parser.h

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

2018-01-05 Thread Paul Ganssle
Paul Ganssle 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 tzname and tzinfo (whether

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

2018-01-05 Thread Paul Ganssle
Paul Ganssle 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 <https://bugs.python.org/issue32

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

2018-01-05 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +4974 ___ Python tracker <https://bugs.python.org/issue30541> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Paul Moore
Paul Moore added the comment: Does this mean that we'll need to update the bundled ucrt whenever there are security patches to the baseline version? Are we happy with the security implications of that? I thought one of the key advantages of using the system CRT (whether the old msvcrX

[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Paul Moore
Paul Moore added the comment: Oh, so we're talking here about bundling the ucrt installers and then if the user doesn't already have ucrt installed system wide, we will install a local copy, but if they do, we don't do anything? If we install a local copy, then it'll be

[issue32474] argparse nargs should support string wrapped integers too

2018-01-08 Thread paul j3
paul j3 added the comment: In https://bugs.python.org/issue11354 'argparse: nargs could accept range of options count' I explored the option allowing regex style range arguments, such as nargs='{2,4}' or an equivalent tuple nargs=(2,4). But that builds on https://bugs.

[issue32123] Make the API of argparse.HelpFormatter public

2018-01-08 Thread paul j3
paul j3 added the comment: To elaborate on my last comment, the existing subclasses that customize formatting modify _fill_text _split_lines _get_help_string _get_default_metavar_for_optional _get_default_metavar_for_positional those are all 'private

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
New submission from Paul Ganssle : 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, seconds=0, microseconds=0) Or

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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 example implementation: from datetime

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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/dateutil/dateutil/blob/

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Change by Paul Ganssle : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue32522> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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
Paul Ganssle 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 `timedelta` is a bit of a st

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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') Da

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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__ implementation works. I guess

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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 it > then

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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. That said, it's

[issue32522] Add precision argument to datetime.now

2018-01-09 Thread Paul Ganssle
Paul Ganssle 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 together some summary in the next week

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-17 Thread Paul Goins
Paul Goins added the comment: Also, to be clear, I understand what David is saying and don't disagree at all. And if this really is Spectre related, it may be difficult to "go back" and test a before case, so my last comment about "digging in" may be rather moot.

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-17 Thread Paul Goins
Paul Goins added the comment: I don't know enough about those tests and how important they are considered. My only concern would be with the increased risk of undetected breakage caused by removing them from CI, but if people think the risk is negligible and/or acceptable, it's

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2018-05-26 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue15327> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

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

2018-05-28 Thread Paul Ganssle
Paul Ganssle 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). You can find a copy o

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

2018-05-28 Thread Paul Ganssle
Paul Ganssle 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 of UTC. While the Internet

[issue33698] `._pth` does not allow to populate `sys.path` with empty entry

2018-05-31 Thread Paul Moore
Paul Moore added the comment: You could add the line import sys; sys.path.insert(0, '') to a .pth file. The documentation you pointed out states that lines starting with "import" are executed... -- ___ Py

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-31 Thread Paul Koning
Paul Koning added the comment: FYI, I'm the one who created this problem back in 2012. I just submitted a GDB patch for this, using PyImport_AppendInittab to define the built-in module at startup. I'm not sure how I missed this originally; perhaps the documentation was not as

[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

[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 fundam

[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'

[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2018-06-30 Thread paul j3
paul j3 added the comment: `parse_intermixed_args` was added in v 3.7. https://docs.python.org/3/library/argparse.html#intermixed-parsing https://stackoverflow.com/questions/50916124/allow-positional-command-line-arguments-with-nargs-to-be-seperated-by-a-flag

[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:

[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

[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:

[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:

[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:

[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:

[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:

[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:

[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:

<    11   12   13   14   15   16   17   18   19   20   >