Paul Ganssle added the comment:
> But I'm wondering how the `fromisocalendar` API relates to this patch.
> Rather, wouldn't this patch contribute to improving the usability of the
> `fromisocalendar` API?
The `fromisocalendar` API relates to this patch only insofar as
Paul Ganssle added the comment:
> Dong-hee Na, if you want to make a fresh PR for this and bring it to
> fruition, I would be happy to review and apply it.
It seems premature to say that you will accept a PR for this when there's no
consensus for actually adding the feature, and
Paul Ganssle added the comment:
> What IS unprecedented is having a C function bend over backwards to return an
> instance of collections.namedtuple().
Is this an issue that anyone is currently insisting upon? From what I can tell
the current implementation uses a structseq and none
Paul Ganssle added the comment:
In an effort to get a sense of how useful this would actually be, I did a code
search for `.isoformat()` on github. I saw a few doctests that will break (if
they're even being run) if we make this change, but I also found that the
*vast* majority of us
Paul Ganssle added the comment:
I haven't had time to try this with an optimized build, I have done a few more
benchmarks using a standard build, I'm seeing almost a 50% regression on
isocalendar() calls, but the picture is a little rosier if you consider the
fact that you need to
Paul Ganssle added the comment:
I have compiled both versions with optimizations on, looks like the gap gets a
bit smaller (percentage-wise) after that:
benchmark| master (ns) | PR 15633 (ns) | Δ
New submission from Paul Ganssle :
The datetime module has a capsule API, which is very useful for other
languages' bindings, but the C API documentation for datetime only covers the C
macros: https://docs.python.org/3/c-api/datetime.html
The current extent of the documentation is
Paul Ganssle added the comment:
Hi Abhisek,
This is actually the expected / intended behavior, and it is documented under
"strptime() and strftime() behavior":
https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
(which is linked to by the time.strftime doc
Paul Ganssle added the comment:
This is done, thanks Petr and Jeroen!
I don't see a need to backport this unless we also want to backport GH-14311 or
something else that depends on it.
--
resolution: -> fixed
stage: patch review -> resolved
status: ope
Paul Ganssle added the comment:
New changeset 3fb1363fe87a24cdb2ee1dd9746f1c49046af958 by Paul Ganssle (Brad)
in branch 'master':
Overhaul datetime documentation (GH-13410)
https://github.com/python/cpython/commit/3fb1363fe87a24cdb2ee1dd9746f1c
Change by Paul Ganssle :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.or
Paul Ganssle added the comment:
New changeset 7117074410118086938044c7a4ef6846ec1662b2 by Paul Ganssle (Raymond
Hettinger) in branch 'master':
bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895)
https://gi
Change by Paul Ganssle :
--
resolution: -> fixed
stage: patch review -> backport needed
status: open -> pending
___
Python tracker
<https://bugs.python.or
Change by Paul Ganssle :
--
pull_requests: +15595
status: pending -> open
pull_request: https://github.com/python/cpython/pull/15961
___
Python tracker
<https://bugs.python.org/issu
Change by Paul Ganssle :
--
pull_requests: +15596
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/15962
___
Python tracker
<https://bugs.python.org/issu
Paul Ganssle added the comment:
New changeset 8ed6503eca4e3ea4949479d8d7fd9ffd54f81038 by Paul Ganssle (Jason
R. Coombs) in branch 'master':
bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993)
https://github.com/python/cpython/commit/8ed6503eca4e3ea4949479d8d7fd9f
Paul Ganssle added the comment:
Sorry guys, my mistake. I think I was a bit caught up in the workflow at the
sprint where I've been going through the review-cleanup-merge process a lot
faster than I usually do (partially since I have the time and partially since
the huge number o
Paul Ganssle added the comment:
New changeset 2d32bf1ef23c9e468b2e8afab3c24e7a2047ac36 by Paul Ganssle
(Harmandeep Singh) in branch 'master':
bpo-13927: time.ctime and time.asctime return string explantion (GH-11303)
https://github.com/python/cpyt
Paul Ganssle added the comment:
We've merged the PR and I think it resolves this issue, so we can close this
issue now. Please let me know if it's not fully resolved and we can re-open.
Thanks Roger for reporting this and Harmandeep for making the PR and requeste
Change by Paul Ganssle :
--
stage: -> needs patch
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.org/issu
Paul Ganssle added the comment:
Hi Yixing, thank you for your bug report. This issue has already been reported,
and the discussion is in issue #22377.
In the short term I believe the solution will be to document the current
behavior. In the long term there are some solutions, though I
Paul Ganssle added the comment:
Thanks Joannah!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Paul Ganssle :
Currently the datetime module has no __all__, which means we only advertise
what is public and private based on leading underscores. Additionally, because
there are two implementations (Python and C), you actually get different things
when you do `from
Paul Ganssle added the comment:
Hi Tahia: Go ahead and make a PR, no need to worry about the test.
I mainly put in the bit about tests because I was hoping to nerd-snipe someone
into figuring out how to do it for me ;) It's not a particularly important
Paul Ganssle added the comment:
Actually, how about adding this simpler test into `Lib/test/datetimetester.py`,
right above test_name_cleanup
(https://github.com/python/cpython/blob/ff2e18286560e981f4e09afb0d2448ea994414d8/Lib/test/datetimetester.py#L65):
def test_all(self
Paul Ganssle added the comment:
New changeset d6a9d17d8b6c68073931dd8ffa213b4ac351a4ab by Paul Ganssle
(Elizabeth Uselton) in branch 'master':
bpo-37555: Update _CallList.__contains__ to respect ANY (#14700)
https://github.com/python/cpython/commit/d6a9d17d8b6c68073931dd8ffa213b
Paul Ganssle added the comment:
The current state of the PR doesn't hinge on the pure Python implementation, we
went with a very simple tuple subclass to keep the two more closely in sync and
because we don't need any of the additional functionality that namedtuple
brings, but
Paul Ganssle added the comment:
Is this issue only in Python 3.6? I believe Python 3.6 is only receiving
security fixes at the moment, so this could only be fixed in 3.7, 3.8 and 3.9.
--
nosy: +p-ganssle
___
Python tracker
<ht
paul j3 added the comment:
Which is more valuable to you, the string conversion, or the checking?
What's wrong with doing the 'type check' in post parsing code? (MarSoft's
answer in the SO link).
To make a better case for this, I'd suggest writing your own fix.
Paul Ganssle added the comment:
New changeset 96b1c59c71534db3f0f3799cd84e2006923a5098 by Paul Ganssle (t k) in
branch 'master':
bpo-38155: Add __all__ to datetime module (GH-16203)
https://github.com/python/cpython/commit/96b1c59c71534db3f0f3799cd84e20
Paul Ganssle added the comment:
Closing this as resolved. I don't think we should backport this, as it's more
of an enhancement than a bug fix (and since no one has ever complained about it
to my knowledge, I don't think there's any big rush to see this released).
Than
Change by Paul Ganssle :
--
pull_requests: +15935
pull_request: https://github.com/python/cpython/pull/16356
___
Python tracker
<https://bugs.python.org/issue35
Paul Ganssle added the comment:
Considering that `namedtuple` is special-cased, I think it's reasonable to
special-case `defaultdict` as well, though it may be worth considering more
general solutions that will also work for things other than the standard
library. One would be to solve
Paul Ganssle added the comment:
I checked and it appears that `attrs` handles this by creating *all* dicts
using the default dict_factory (similar to my original suggestion of just using
`dict` instead of the specific type), if I'm reading this right:
https://github.com/python-attrs/
Paul Martin added the comment:
run_in_executor doesn't necessarily create a new thread each time so
create_thread would be misleading. run_in_thread might be better.
--
nosy: +primal
___
Python tracker
<https://bugs.python.org/is
New submission from Paul Sokolovsky :
CPython's Data Model -> Internal types -> Code objects, direct link as of
version 3.7 is:
https://docs.python.org/3.7/reference/datamodel.html?highlight=co_stacksize#index-55
, states following:
* "co_nlocals is the number of local varia
New submission from paul rubin :
It would be nice if the library reference manual had type signatures for all
the stdlib functions at some point. It might be possible to extract a lot of
them automatically from typeshed and semi-automatically paste them into the doc
files. It might also be
paul rubin added the comment:
Yes, the suggestion was just for the docs, and since those are intended for
human rather than machine consumption, it's fine if there are some blurry cases
where there is no signature. Ideally in those cases, the issue should be
explained in the doc tex
paul rubin added the comment:
abs takes any value that understands the __abs__ method and returns something
of the same type. In fact there is already a type protocol for it:
https://mypy.readthedocs.io/en/stable/protocols.html#supportsabs-t
So abs's signature would be (x : Abs[T])
paul rubin added the comment:
At first glance, having a typeclass for each protocol (at least the widely used
ones) seems fine. It's inherent in Haskell and a lot of libraries are
organized around a common set of typeclasses--look up "Typeclassopedia" for
descriptions of t
paul rubin added the comment:
I don't think we're going to accomplish anything continuing the eternal
static-vs-dynamic debate, which in Python's case has already been resolved by
adding optional static typing. It's a done deal, and the issue here is just
how to docum
Paul Ganssle added the comment:
>From what I can tell, this is a Python 2.7-only bug, and it's not a security
>issue, so I think we can close the issue as either "wontfix" (because we won't
>fix it in Python 2) or "fixed" (because it is already
New submission from Paul Moore :
The venv module with Python 3.4 on Windows doesn't install pip - even though
the --without-pip flag is not specified. This appears to be a regression since
pip is installed when using 3.7:
>C:\Utils\PythonVersions\Python-3.7.3\python.exe -m venv ve-
Paul Moore added the comment:
This appears to be somehow caused by running Python 3.7.4 from an active
virtualenv (which I'd forgotten I had active when I did the test).
Regardless, I'd have expected that the command would either correctly create a
venv containing pip, or fail to
Paul Moore added the comment:
Further update - this appears to also happen on Ubuntu (at least the version
available through the Windows Linux subsystem), so it's not a Windows-specific
issue.
--
assignee: steve.dower ->
___
Python
Paul Moore added the comment:
Sigh. Never mind, this appears to be because virtualenv uses its own hacked
copy of site.py which is missing a lot of the venv support code.
I'll report this over on virtualenv.
--
resolution: -> third party
stage: -> resolved
status: ope
Paul Martin added the comment:
Should singledispatchmethod and cached_property be added?
--
nosy: +primal
___
Python tracker
<https://bugs.python.org/issue37
New submission from Paul Martin :
Expected behaviour for DatagramTransport (from_SelectorDatagramTransport):
transport.close() called.
If there is data in the write buffer, don't call connection_lost.
When all data is written and the buffer is empty, check if connection has been
lost a
Change by Paul Martin :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue38471>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Martin :
--
keywords: +patch
pull_requests: +16341
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16779
___
Python tracker
<https://bugs.python.org/issu
Paul Silisteanu added the comment:
Same issue on Window 10 and macOS Catalina with Python 3.8.0.
Here is the error I get on Windows 10:
C:\Users\x>py -3.8
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyri
Paul Moore added the comment:
Can you give an example of a script that fails? If you try to print (or
otherwise use the standard IO streams) pythonw will fail, because there are no
stdio streams for a GUI executable - and the traceback, which goes to stderr by
default, will be lost.
This
Change by Paul Martin :
--
pull_requests: +16408
pull_request: https://github.com/python/cpython/pull/16863
___
Python tracker
<https://bugs.python.org/issue38
paul j3 added the comment:
So the error occurs in HelpFormatter._format_action when 'help_lines' is an
empty list:
if action.help:
help_text = self._expand_help(action)
help_lines = self._split_lines(help_text, help_width)
>>
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue38438>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
Just today on SO someone found a similar bug in the help format with metavars,
that involved an unpacking the expected only one value, but got 2.
https://stackoverflow.com/questions/58541460/tuple-metavar-value-for-positional-argument-with-nargs-1
This had be
paul j3 added the comment:
Just clarify how the code currently works. `subparsers` is a positional Action
of subclass _SubParsersAction. It has a nargs='+...', requiring at least one
string, and taking all remaining strings. Its __call__ has the standard
signature. So everyth
Paul Martin added the comment:
I don't think changing the default executor is a good approach. What happens,
if two or more thread pools are running at the same time? In that case they
will use the same default executor anyway, so creating a new executor each time
seems like a
Paul Martin added the comment:
Run method should be:
async def run(self, func, *args, **kwargs):
call = functools.partial(func, *args, **kwargs)
return await self._loop.run_in_executor(None, call)
--
___
Python tracker
<ht
Paul Martin added the comment:
Good points. I made a mistake in run
Should be:
async def run(self, func, *args, **kwargs):
call = functools.partial(func, *args, **kwargs)
return await self._loop.run_in_executor(self._executor, call)
Also in this case run awaits and
Paul Ganssle added the comment:
This indeed seems to be a duplicate of 29097, which is fixed in Python 3.7, so
we can close this bug. Thank you for your report Dschoni, and thank you for
finding the duplicate Ma Lin!
--
resolution: -> duplicate
stage: -> resolved
status
Paul Ganssle added the comment:
Changing the superceder here as I think #36439 matches better than #37527.
--
nosy: +p-ganssle
resolution: duplicate ->
status: closed -> open
superseder: Timestamp conversion on windows fails with timestamps close to
EPOCH -> Inconsisten
Paul Ganssle added the comment:
This has been coming up in a few different contexts lately, so I think it would
be really good if we could get some sort of fix for it.
One option is to implement our own versions of these APIs for use in Windows,
but a thought occurred to me recently: we
Paul Ganssle added the comment:
Ah, my mistake. The examples all use `datetime.fromtimestamp`, so I didn't
notice that it was failing only on the `timestamp` side. Re-opening, thanks!
--
resolution: duplicate ->
status: closed -> open
superseder: [Windows] datetime.from
paul j3 added the comment:
A couple of quick observations:
- this is one of the first patches that I worked on, so the details aren't
fresh in my mind. A glance at my latest patch show that this isn't a trivial
change.
- nargs changes affect the input handling, the parsing
paul j3 added the comment:
With one exception, groups are not designed or intended to be nested. But by
inheritance (from _ActionsContainer) nesting isn't blocked nor does it raise
any errors.
As you surmise, an ArgumentGroup, is used only for grouping the help lines. By
default tha
paul j3 added the comment:
get_default just returns the default attribute as it is stored in the Action.
Defaults are stored as given.
During parsing the Action's default is placed in the args namespace at the
start. At the end, it checks if the value in the namespace is a string
Change by Paul Weiss :
--
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue27929>
___
___
Python-bugs-list mailing list
Unsub
Paul Ganssle added the comment:
> That it allows creating the datetime instance looks like a bug to me, i.e. a
> time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding?
`datetime.datetime(1, 1, 1, tzinfo=timezone(timedelta(hours=1)))` is a valid
datetime, it's j
New submission from Paul Moore :
I am trying to write a meta path finder that "redirects" module loads to a
different part of the filesystem. There's not much information in the importlib
documentation, but PEP 451 says "find_spec() must return a spec with "loader&
Paul Moore added the comment:
OK, cool. That might be worth explaining somewhere in the docs (although I
don't really know where, as I'm not sure where namespace packages are
documented, either :-))
I'm not at all sure what would happen if we have meta path find
Paul Moore added the comment:
> if they return a spec they can, if they don't then they can't
What I've never really got clear in my mind is how dotted names get handled.
But that's probably just a matter of needing to experiment a bit (I don't think
it's
paul j3 added the comment:
An overlapping issue
https://bugs.python.org/issue18943
argparse: default args in mutually exclusive groups
That issue shows that this problem arises with small integers as well (<257),
which in cpython have unique ids. It's an implementation detail,
Paul Ganssle added the comment:
> I don't think full nanosecond support is feasible to complete in the
> remaining weeks
This may be so, but I think the important part of that question is "what work
needs to be done and what questions need to be answered?" If the answe
Paul Moore added the comment:
There's a lot of technical discussion of implementation details here, but not
much about use cases. IMO, what's more important is whether NamedTemporaryFile
is *useful* to people, and what they want to use it *for*. Working out how to
implement i
Paul Moore added the comment:
Sorry - I'm maybe making an unwarranted assumption. If simply removing "delete
on close" behaviour in the CM case is acceptable, then I'm 100% in favour of
that.
I'd assumed that it was somehow unacceptable, but you're right,
New submission from Paul Pinterits :
It's documented behavior that @dataclass won't generate an __init__ method if
the class already defines one. It's also documented that a dataclass may
inherit from another dataclass.
But what happens if you inherit from a dataclass th
Paul Pinterits added the comment:
> dataclasses doesn't know the signature of the base class's __init__, so it
> can't know how to call it.
The dataclass doesn't need to know what arguments the parent __init__ accepts.
It should consume the arguments it needs
Paul Pinterits added the comment:
No, I'm saying Bar should initialize the 'bar' attribute, and then call
Foo.__init__ to let it initialize the 'foo' attribute.
--
___
Python tracker
<https:
Paul Pinterits added the comment:
Admittedly, with the way dataclasses accept their __init__ arguments, figuring
out which arguments to consume and which to pass on isn't a trivial task.
If a dataclass Bar inherits from a dataclass Foo, then Bar.__init__ is (for all
intents and pur
Paul Pinterits added the comment:
You're telling me that some people out there rely on their custom __init__
*not* being called? O.o
--
___
Python tracker
<https://bugs.python.org/is
paul j3 added the comment:
This is a well known (if not fixed) issue - if subparsers is required, then a
dest is needed to give a working error message. Looks like we've variously
talked about documenting the requirement, or using some sort of substitute for
the missing name.
One
Paul Moore added the comment:
New changeset 196983563d05e32d2dcf217e955a919f9e0c25e1 by Stéphane Bidoul in
branch 'master':
bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 (GH-25576)
https://github.com/python/cpython/commit/196983563d05e32d2dcf217e955a91
Paul Moore added the comment:
New changeset d962b00fcffa9070acdca850753f254828caa1d7 by Stéphane Bidoul in
branch '3.9':
[3.9] bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 (GH-25578)
https://github.com/python/cpython/commit/d962b00fcffa9070acdca850753f25
Paul Moore added the comment:
New changeset fc82f3f8fb36f88a4e7238a463812c2916bd4db0 by Stéphane Bidoul in
branch '3.8':
[3.8] bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 (GH-25576)
(GH-25579)
https://github.com/python/cpyt
paul j3 added the comment:
Let's see if I can clarify somethings. But first, I should say that I've
worked with this code for so long, that I may miss things that could confuse a
beginner.
A basic distinction is between "optionals" and "positionals". I put t
paul j3 added the comment:
Post parsing testing for the correct number of strings is the easy part.
It's the auto-generate usage that's harder to do right, especially if we wanted
to enable the metavar tuple option. Clean usage for '+
Paul Moore added the comment:
New changeset d92513390a1a0da781bb08c284136f4d7abea36d by Tzu-ping Chung in
branch 'master':
bpo-43312: Functions returning default and preferred sysconfig schemes
(GH-24644)
https://github.com/python/cpython/commit/d92513390a1a0da781bb08c284136f
New submission from Paul Moore :
The importlib.metadata documentation states that the PackagePath class is "a
pathlib.Path derived object". This isn't true - it's a PurePath subclass, and
in particular it does not have a resolve() method. In fact, it has an
undocu
Change by Paul Moore :
--
keywords: +patch
pull_requests: +24358
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25669
___
Python tracker
<https://bugs.python.org/issu
Paul Moore added the comment:
To be explicit, I'm +1 on breaking backward compatibility in the minor form
described by Ethan: if NamedTemporaryFile is used as a context manager, the
file is closed *on context manager exit* and *not* when the file is closed.
Breaking compatibility is al
Paul Moore added the comment:
I'd suggest also posting it on the Packaging discourse, to get feedback from
other distro maintainers.
--
___
Python tracker
<https://bugs.python.org/is
Paul Moore added the comment:
Looking at the various comments, I think we have 5 votes for deleting on CM
exit when used as a CM, and no change in behaviour otherwise (me, Zachary,
Ethan, Jason and Steve). Steve also wants O_TEMPORARY to be removed, which
doesn't seem controversial
Paul Moore added the comment:
Eryk, thank you for clarifying. I apologise - I got bogged down somewhere in
the middle of the discussion on reimplementing bits of the CRT (your posts are
so information-dense that my usual habit of skimming breaks down - that's not a
complaint, t
Paul Moore added the comment:
New changeset bf99b7151663905fd5e71efe45184dc8fffc3236 by Stéphane Bidoul in
branch 'master':
bpo-43993: Update vendored pip to 21.1.1 (GH-25761)
https://github.com/python/cpython/commit/bf99b7151663905fd5e71efe45184dc8fffc3236
--
nosy: +
Paul Moore added the comment:
New changeset af1e06c62f3958082c4b409e771f291d12479b3d by Stéphane Bidoul in
branch '3.9':
[3.9] bpo-43993: Update vendored pip to 21.1.1 (GH-25761). (GH-25782)
https://github.com/python/cpython/commit/af1e06c62f3958082c4b409e771f29
Paul Moore added the comment:
New changeset 6034c4aa58fe7257d39b53c77944393700c66396 by Stéphane Bidoul in
branch '3.8':
[3.8] bpo-43993: Update vendored pip to 21.1.1 (GH-25761). (GH-25783)
https://github.com/python/cpython/commit/6034c4aa58fe7257d39b53c7794439
paul j3 added the comment:
You test with RawDescriptionHelpFormatter, but quote from the
RawTextHelpFormatter.
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue43
paul j3 added the comment:
To a large degree the Action parameters operate independently. That is,
different parts of the code use the parameters for their own purposes. The
composite behavior is a result of those individual actors, rather than some
sort of overall coordinated plan.
First
Paul Ganssle added the comment:
@Terry
> The problem with random input tests in not that they are 'flakey', but that
> they are useless unless someone is going to pay attention to failures and try
> to find the cause. This touches on the difference between regression
401 - 500 of 3008 matches
Mail list logo