Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33381>
___
___
Python-bugs-list mailing list
Unsubscribe:
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,
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue9305>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue13305>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue12750>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue25729>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue16322>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue22005>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue9004>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue28730>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue22377>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue5516>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue22426>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue15390>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue27741>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34158>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Change by paul j3 :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34299>
___
___
Python-bugs-list
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
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
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
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
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
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
Change by Paul Moore :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34359>
___
___
Paul Moore added the comment:
Others use absolute paths, as I mentioned in my reply.
--
___
Python tracker
<https://bugs.python.org/issue34359>
___
___
Pytho
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
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
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
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
Change by Paul Price :
--
keywords: +patch
pull_requests: +8213
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34377>
___
___
Python-
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
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
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.
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
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
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_
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34365>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue1100942>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34404>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Paul Ganssle :
--
pull_requests: +8336
___
Python tracker
<https://bugs.python.org/issue34454>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34423>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34481>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue30717>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
pull_requests: +8434
___
Python tracker
<https://bugs.python.org/issue34454>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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:
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
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
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +8457
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34481>
___
___
Py
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
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
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
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
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
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
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
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
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
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
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
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33052>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34672>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33259>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue32313>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue31635>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +belopolsky
___
Python tracker
<https://bugs.python.org/issue34672>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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 %
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
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__',
'
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34716>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34715>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34735>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue34742>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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.
Change by paul j3 :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34458>
___
___
Python-bugs-list
1601 - 1700 of 3012 matches
Mail list logo