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

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

[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

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

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

[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

[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

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

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

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

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

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

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 p

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: Oops, that previous comment was intended for a completely different ticket. My mistake. -- ___ Python tracker <https://bugs.python.org/issue27

[issue22005] datetime.__setstate__ fails decoding python2 pickle

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

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

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

[issue28730] __reduce__ not being called in dervied extension class from datetime.datetime

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

[issue22377] %Z in strptime doesn't match EST and others

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

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

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

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

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

[issue15390] PEP 3121, 384 refactoring applied to datetime module

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

[issue27741] datetime.datetime.strptime functionality description incorrect

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

[issue34153] 10/3 - last digit

2018-07-18 Thread Paul Moore
Paul Moore added the comment: See https://docs.python.org/3.7/tutorial/floatingpoint.html. Essentially, the behaviour you are seeing is caused by the fact that the results calculations you are attempting cannot be exactly represented in binary floating point, so approximate results are

[issue34158] Documentation of datetime '%z' format code is odd

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

[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2018-07-23 Thread paul j3
paul j3 added the comment: Do you understand why this is happening? Subparsers is, in effect, a positional argument with 'choices' - the choices being the parsers (and their aliases). But '-dr' looks like an flagged (optionals) argument. Since you didn't define

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-23 Thread paul j3
paul j3 added the comment: argparse does import 'textwrap', but as '_textwrap', so it could be used with: argparse._textwrap.dedent(...) Importing your own is cleaner. -- nosy: +paul.j3 ___ Python tracker <https://bug

[issue34191] argparse: Missing subparser error message should be more clear

2018-07-23 Thread paul j3
paul j3 added the comment: Your code runs fine under 3.6.5. But if I add 'subparsers.required=True', I get your error. It's having problems formatting the name of the subparsers command when issuing the error message. If I add a 'dest' to the add_subparsers

[issue34188] Allow dict choices to "transform" values in argpagse

2018-07-23 Thread paul j3
paul j3 added the comment: The 'choices' mechanism is a simple 'value in choices' test. A dictionary (or other mapping) works because it works with 'in'. 'type' as noted is the means that argparse provides for transforming an input string into some o

[issue34191] argparse: Missing subparser error message should be more clear

2018-07-23 Thread paul j3
paul j3 added the comment: Updating you Python3.7 might change the behavior. If I read https://github.com/python/cpython/commits/master/Lib/argparse.py correctly, subparsers are no longer required by default (it reverted back to earlier Py3 behavior). There is a proposed patch for

[issue34299] argparse description formatting

2018-08-02 Thread paul j3
Change by paul j3 : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34299> ___ ___ Python-bugs-list

[issue32797] Tracebacks from Cython modules no longer work

2018-08-04 Thread Paul Moore
Paul Moore added the comment: > What's wrong with that? Installing the .pyx sources together with the .so > compiled modules makes a lot of sense to me: it is very analogous to > installing the .py sources together with the .pyc byte-compiled files. In > https://bugs.pyth

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: On Sun, 5 Aug 2018 at 06:51, Stefan Behnel wrote: > This whole idea looks backwards and complicated. As Brett noted, .pyc files > were moved out of the source tree, because they are build time artifacts and > not sources. With that analogy, it's

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: So, where is the filename coming from? Looking at exception and frame objects, I don't see a "source filename" attribute anywhere - have I missed something here? -- ___ Python tracker <https

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: On Sun, 5 Aug 2018 at 18:10, Brett Cannon wrote: > One other thing I will say is that the PEP 302 APIs were seemingly designed > for working with Python source and were not necessarily oriented towards > alternative code representations that were exec

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Paul Moore
Paul Moore added the comment: If you're OK with that, I don't see the problem. My objection was with the claims that ExtensionLoader.get_source shouldn't return None or shouldn't exist. PEP 302 mandates that loaders have a get_source, and that get_source should retur

[issue34359] Wrong virtual environment found

2018-08-08 Thread Paul Moore
Paul Moore added the comment: >From https://docs.python.org/3.7/using/windows.html#shebang-lines the >supported shebang lines are * /usr/bin/env python * /usr/bin/python * /usr/local/bin/python * python There's a provision in there: """ The /usr/bin/env form of sh

[issue34359] Wrong virtual environment found

2018-08-08 Thread Paul Moore
Change by Paul Moore : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34359> ___ ___

[issue34359] Wrong virtual environment found

2018-08-08 Thread Paul Moore
Paul Moore added the comment: Others use absolute paths, as I mentioned in my reply. -- ___ Python tracker <https://bugs.python.org/issue34359> ___ ___ Pytho

[issue34359] Wrong virtual environment found

2018-08-08 Thread Paul Moore
Paul Moore added the comment: Oh, and I suspect that the reason that "The thing with the relative path works if I change the order in the path" is simply because the bit of code that searches PATH just ignores what's after #!/usr/bin/env and looks for python.exe. (More or l

[issue33125] Windows 10 ARM64 platform support

2018-08-08 Thread Paul Monson
Paul Monson added the comment: I'm interested in getting python working on Windows running on Raspberry Pi (Thumb-2 instruction set). I can also contribute to ARM64 Windows. I've made some progress getting ARM32 working on a fork. The next roadblock for my investigation is libf

[issue33125] Windows 10 ARM64 platform support

2018-08-10 Thread Paul Monson
Paul Monson added the comment: The PR hasn't changed since September. Is it still active? Should I consider updating the libffi_msvc code to support ARM32 in Python? Completing the switch to libffi makes more sense to me. I fetched the PR code to my fork and rebased it on the cu

[issue34377] Update valgrind suppressions

2018-08-10 Thread Paul Price
New submission from Paul Price : I've found that the valgrind suppressions don't work for me with cpython 3.6.2. Renaming PyObject_Free/PyObject_Realloc to _PyObject_Free/_PyObject_Realloc in the suppressions file works. I've got a patch that I'll pu

[issue34377] Update valgrind suppressions

2018-08-10 Thread Paul Price
Change by Paul Price : -- keywords: +patch pull_requests: +8213 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34377> ___ ___ Python-

[issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments

2018-08-13 Thread paul j3
paul j3 added the comment: Parsing is a two step process. First the strings are passed through def _parse_optional(self, arg_string): which classifies them as 'O', an optional flag, or 'A', an argument. - no prefix char => A - the string is in the dictionary of optio

[issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments

2018-08-13 Thread paul j3
paul j3 added the comment: Duplicate of https://bugs.python.org/issue22909 [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg (closed as duplicate) https://bugs.python.org/issue22433 Argparse considers unknown optional arguments with

[issue34416] PyCapsule_Import seems to release the GIL without acquiring it

2018-08-16 Thread Paul Ganssle
New submission from Paul Ganssle : I was recently debugging some multithreaded Rust code that was deadlocking, and I tracked it down to what I'm fairly certain is a bug somewhere in PyCapsule_Import, where it seems that PyCapsule_Import releases the GIL without first acquiring it.

[issue34416] PyCapsule_Import seems to release the GIL without acquiring it

2018-08-16 Thread Paul Ganssle
Paul Ganssle added the comment: Using a modified version of Python 3.7.0 that prints "Releasing GIL" whenever PyGILState_Release, I get this: Waiting for GIL (0) Gil acquired! (0) Waiting for GIL (1) Gil acquired! (1) Releasing GIL Gil released! (0) Releasing GIL Gil release

[issue34416] PyCapsule_Import seems to release the GIL without acquiring it

2018-08-17 Thread Paul Ganssle
Paul Ganssle added the comment: > It does not seem to me that two threads have the GIL at the same time. To be clear, this was never my contention. I was under the impression that if you take the GIL with PyGILState_Ensure(), the GIL was held until you called PyGILState_Release(), as wit

[issue34188] Allow dict choices to "transform" values in argpagse

2018-08-18 Thread paul j3
paul j3 added the comment: The 'choices' mechanism is quite simple. As noted for testing it simply uses an 'in' test. For help formating it uses choice_strs = [str(choice) for choice in action.choices] result = '{%s}' % ','.join(choice_

[issue34407] datetime.time.isoformat function has inconsistent behavior with timezone

2018-08-20 Thread Paul Ganssle
Paul Ganssle added the comment: For one thing, this is not how pytz is supposed to be used. You have fallen prey to one of the most common errors when using pytz. See my blog post: https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html The issue at hand is also more about what

[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"

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

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

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

[issue34404] test_time incorrectly defined

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

[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-21 Thread Paul Ganssle
Paul Ganssle added the comment: So this is related to something I was actually meaning to fix. When I wrote this code I didn't understand the way PyUnicode works, there's actually no need to call `PyUnicode_AsUTF8AndSize()` on the entire unicode string. My understanding is that

[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-21 Thread Paul Ganssle
Paul Ganssle added the comment: > Note that technically a difference between C and Python implementation of > fromisoformat() will still remain: if a part of the input string before or > after the separator contains surrogates, the C code will throw a > UnicodeEncodeError whil

[issue34458] No way to alternate options

2018-08-22 Thread paul j3
paul j3 added the comment: I agree that a custom Action subclass like this is the way to go. The regular 'append' is implemented in _AppendAction class, which is different from the default _StoreAction. So even if there was enough demand for this new idea to be put into devel

[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-22 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +8336 ___ Python tracker <https://bugs.python.org/issue34454> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34423] Overflow when casting from double to time_t, and_PyTime_t.

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

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

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

[issue30717] Add unicode grapheme cluster break algorithm

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

[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-27 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +8434 ___ Python tracker <https://bugs.python.org/issue34454> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-27 Thread Paul Ganssle
Paul Ganssle added the comment: Somewhat related: #6697. Turns out there are already some tests here for this, specifically for the C version only: https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L3328 -- ___ Python

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2018-08-28 Thread Paul Overing
New submission from Paul Overing : I have found that using timeout with a python queue.Queue() results in an average delay of 14.5ms in Windows over Ubuntu in python 3.6.5/3.7, I subtracted the 1 ms timeout. I have also tried datetime.datetime.now() to measure the time, with similar

[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-08-28 Thread Paul Pinterits
New submission from Paul Pinterits : In a conversation with Ethan Furman (the author of the enum module) I've been informed that Enum automatically checks whether the _missing_ method has returned an instance of the correct class, and raises a TypeError if not. (Link:

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-28 Thread paul j3
paul j3 added the comment: The subparser is called with `parse_known_args` which just puts unknown args in a _UNRECOGNIZED_ARGS_ATTR attribute slot in the namespace, which is then passed back to the main parser. (this occurs in _SubParsersAction.__call__) If `parser.parse_known_args` is

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-28 Thread paul j3
paul j3 added the comment: Errors that are associated with a specific argument, such as a wrong 'type' do get usage from the appropriate subparser. e.g. In [164]: p.parse_args('--foo 1 cmd1 --bar x'.split()) usage: ipython3 cmd1 [-h] [--bar BAR] ipython3 cmd1: e

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-28 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +8457 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34481> ___ ___ Py

[issue34541] pathlib.Path.iterdir doesn't throw an exception until you start iterating

2018-08-29 Thread Paul Pinterits
New submission from Paul Pinterits : The fact that `Path.iterdir()` only throws exceptions once you start iterating over it makes it very difficult to write correct code. Let's look at an example: We'll iterate over all children of a directory and print their file size. If we tr

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2018-08-29 Thread Paul Overing
Paul Overing added the comment: Thank you for your quick response. But 1ms resolution or not, 14.5ms does not seem reasonable given that in Ubuntu it is 0.049ms. Ubuntu is on average 295x faster. Also the variability in times is much higher in Windows max/avg = 9.547, avg/min = 8.69

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-29 Thread Paul Ganssle
Paul Ganssle added the comment: I'm finding it very difficult to reconcile these things. I'm not entirely sure, but we may need to take a performance hit in normal strftime if we want to make this work with surrogate characters, which really does not appeal to me (though we can

[issue34541] pathlib.Path.iterdir doesn't throw an exception until you start iterating

2018-08-29 Thread Paul Pinterits
Paul Pinterits added the comment: As an afterthought, I'd like to suggest an alternative solution: If changing the `iterdir` behavior is not possible or not desirable for some reason, please add a `Path.listdir` method that returns a list instead of an iterator. Lazy file system opera

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2018-08-29 Thread Paul Overing
Paul Overing added the comment: Thank you to everyone for looking at my issue esp Josh.r for the detailed response. I now understand the issue and I just wanted to bring it to the group's attention for everyone's benefit. Vstinner is correct; Linux is my solution as it is my

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-30 Thread Paul Ganssle
Paul Ganssle added the comment: @izbyshev That's totally fair and I wouldn't want to make it a condition of merging the existing fixes - I've already made great progress in fixing the time.strftime part as well. The main reason it relates here is that I generally find the te

[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Paul Moore
Paul Moore added the comment: I don't see an appveyor.yml file in the CPython repository. How are the appveyor builds configured? I was going to take a look, but need to see the config :-( On Wed, 5 Sep 2018 at 10:32, STINNER Victor wrote: > > > STINNER Victor added the comment

[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Paul Moore
Paul Moore added the comment: One thought - appveyor.yml says that the cache of externals depends on PCBuild. Could it be that appveyor is caching PCBuild to verify whether it's changed (and hence whether to use the cached externals)? I know that sounds bizarre, but I'm not ent

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-09-05 Thread Paul Ganssle
Paul Ganssle added the comment: I've left a mostly finished PR on #8983, but I've decided it's not really worth continuing to work on. Anyone can feel free to take it and run with it if they want to implement the fix for this. As Alexey mentions, that PR indeed already fi

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2018-09-09 Thread paul j3
paul j3 added the comment: It's been sometime since I looked at this issue. The main sticking point is passing unittests, and ensuring that there are no backward compatibility issues. But, since FileType is a standalone class, anyone could put a corrected version in their own work

[issue27869] test failures under Bash on Windows / WSL

2018-09-09 Thread Paul Waldorf
Paul Waldorf added the comment: Thought my experience could be helpful. My env is varies from @brett.cannon in that I'm running Debian 9 (Stretch) on my WSL, which makes me think that these failures have more to do with WSL than any difference in distros? Configured with ./conf

[issue32027] argparse allow_abbrev option also controls short flag combinations

2018-09-10 Thread paul j3
paul j3 added the comment: The PR 4396 should be closed. -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue32027> ___ ___ Python-bugs-list m

[issue33052] Sporadic segmentation fault in test_datetime

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

[issue34672] '%Z' strftime specifier never works with musl

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

[issue34676] Guarantie that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-14 Thread Paul Ganssle
Paul Ganssle added the comment: I would be somewhat worried that this might break something like numpy (though not numpy specifically) which might be counting on the ability to write a wrapper that overloads this behavior. Another concern is that people could be playing it fast-and-loose

[issue33259] Encoding issue in the name of the local DST timezone

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

[issue32313] Wrong inspect.getsource for datetime

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

[issue31635] test_strptime failure on OpenBSD

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

[issue34672] '%Z' strftime specifier never works with musl

2018-09-14 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +belopolsky ___ Python tracker <https://bugs.python.org/issue34672> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32313] Wrong inspect.getsource for datetime

2018-09-16 Thread Paul Ganssle
Paul Ganssle added the comment: I think this is *mostly* the correct behavior (though it may indeed be confusing). Note that `datetime.py` *is* the source of the module `datetime`, it's just that most of the code in there is shadowed by the line you've linked. If you try and get

[issue31635] test_strptime failure on OpenBSD

2018-09-16 Thread Paul Ganssle
Paul Ganssle added the comment: I think this is the relevant test: https://github.com/python/cpython/blob/3.7/Lib/test/test_strptime.py#L536 The issue seems to be in `strftime` rather than in `strptime`. According to Serhiy's paste, it seems that `datetime.datetime.strftime("%G %

[issue31635] test_strptime failure on OpenBSD

2018-09-16 Thread Paul Ganssle
Paul Ganssle added the comment: This appears to be a duplicate of issue #13414, which was resolved as fixed in BSD. @serhiy Are you using a very old version of BSD? -- ___ Python tracker <https://bugs.python.org/issue31

[issue34676] Guarantee that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-17 Thread Paul Ganssle
Paul Ganssle added the comment: @Serhiy I like the "convert to a tuple" idea before returning *better*, though I think I'd prefer to just check that it's tuple-like, something like: if not all(hasattr(return_val, attr) for attr in ['__getitem__', '

[issue31635] test_strptime failure on OpenBSD

2018-09-17 Thread Paul Ganssle
Paul Ganssle added the comment: @Serhiy Looking more closely at #13414, I think there's a good chance that we've just discovered a different bug in OpenBSD's implementation of wcsftime (or strftime). Looks like OpenBSD 6.1 was released in 2017, which should have been year

[issue34716] MagicMock.__divmod__ should return a pair

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

[issue34715] timemodule.c fails to compile on BSD

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

[issue31635] test_strptime failure on OpenBSD

2018-09-18 Thread Paul Ganssle
Paul Ganssle added the comment: I do think this is an active bug in OpenBSD's ISO calculations, here: https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/lib/libc/time/wcsftime.c#L326 I re-created this algorithm in Python and at the beginning of the year it

[issue31635] test_strptime failure on OpenBSD

2018-09-18 Thread Paul Ganssle
Paul Ganssle added the comment: Bug reported to BSD here: https://marc.info/?l=openbsd-bugs&m=153728102618747&w=2 -- ___ Python tracker <https://bugs.python.org

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

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

[issue34724] argparse subparser help indent too short

2018-09-19 Thread paul j3
paul j3 added the comment: Looks like I had my say on this in the Stackoverflow link (3 yrs ago). -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue34

[issue34742] Add optional argument for exit status in argparse.ArgumentParser.error

2018-09-19 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue34742> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34744] New %(flag)s format specifier for argparse.add_argument help string

2018-09-19 Thread paul j3
paul j3 added the comment: In your example, what is 'flag'? There's no Action attribute of that name. There is a 'dest' and a 'option_strings' list. All the 'help' '%(...)s' does is display one of the Action object attribute

[issue34742] Add optional argument for exit status in argparse.ArgumentParser.error

2018-09-20 Thread paul j3
paul j3 added the comment: While I don't think this change will cause any backward compatibility issues, I wonder whether it does much good. https://docs.python.org/3/library/argparse.html#exiting-methods already documents the option of customizing `parser.exit` and `parser.

[issue34458] No way to alternate options

2018-09-20 Thread paul j3
Change by paul j3 : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34458> ___ ___ Python-bugs-list

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