paul rubin added the comment:
Oh nice, I didn't realize you could do that. len(range) and bool(range) (to
test for empty) also work. Ok I guess this enhancement is not needed. I will
close ticket, hope that is procedurally correct, otherwise feel free to fix.
T
New submission from paul rubin :
Inspired by a question on comp.lang.python about how to deal with an int set
composed of integers and ranges. Range objects like range(1,5,2) contain
start, stop, and step values, but it's messy and potentially tricky to get the
actual first and last v
New submission from Paul Ganssle :
Currently, the `datetime` documentation has this to say about naïve datetimes:
> A naive object does not contain enough information to unambiguously locate
> itself relative to other date/time objects. Whether a naive object represents
> Co
New submission from Paul Ganssle :
In bpo-9305, Fred Drake recommends preferring `Returns ...` over the imperative
`Return ...`: https://bugs.python.org/issue9305#msg110912
Currently we're pretty consistent about `Return ...`, which is consistent with
PEP 257: https://peps.python.or
Paul Ganssle added the comment:
I think this approach is probably the best we can do, but I could also imagine
that users might find it to be confusing behavior. I wonder if there's any
informal user testing we can do?
I guess the ISO 8601 spec does call "Z" the "
Paul Moore added the comment:
This is Windows (shell) behaviour. To avoid this, you need to add the .py
extension to the PATHEXT environment variable.
--
___
Python tracker
<https://bugs.python.org/issue47
John Paul Adrian Glaubitz added the comment:
> Awesome, thanks! I'll give it a try later today or tomorrow.
I have applied the patch and the problem seems to have been fixed. \o/
--
___
Python tracker
<https://bugs.python.org
John Paul Adrian Glaubitz added the comment:
Awesome, thanks! I'll give it a try later today or tomorrow.
--
___
Python tracker
<https://bugs.python.org/is
John Paul Adrian Glaubitz added the comment:
Hi Serhiy!
> The simple fix is to add UnicodeEncodeError to "except LookupError". But
> there may be other places where we can get a similar error. They should be
> fixed too.
I would be very interested to test this as t
Jean-Paul Calderone added the comment:
This is still/again broken, probably because the "fixed" version still
hard-codes all of the geometry values and these will certainly not be correct
for all combinations of display dpi, font configuration, etc.
Instead, `TreeNode
Paul Moore added the comment:
> as well as potentially being able to be a script or .pyz launcher with a
> simple rename.
Would it be possible to also make the launcher work when prepended to a
zipfile? That's a really useful use-case (make a zipapp automatically runnable,
paul j3 added the comment:
'-1' and '-1.23' are recognized as numbers, and treated as arguments. '-1'
requires some special handling because it is allowed as a flag, as in
parser.add_argument('-1','--one')
'-1:00' on the ot
New submission from Paul Jaggi :
Have the following simple program:
#include
#include
using namespace std;
int main(int argc, char** argv) {
wchar_t* args[argc];
for(int i = 0; i < argc; ++i) {
args[i] = Py_DecodeLocale(argv[i], nullptr);
}
Py_Initialize();
const
Paul Koning added the comment:
Thanks, I'll pass the word to the yarl and aiohttp team (both have this issue).
--
___
Python tracker
<https://bugs.python.org/is
Paul Koning added the comment:
The only dependency mentioned by the yarl documentation is multidict and
installing that makes no difference. I see I can tell yarl to build a
pure-python version to avoid compiling stuff. If I do that it installs. But
what I actually wanted to do is
New submission from Paul Koning :
Trying to install "aiohttp" with pip I get a compile error installing "yarl".
I get the same error when I install just that module. But it installs fine on
3.10. This is on an Apple M1 (ARM64) machine.
--
components: macOS
file
Paul Ganssle added the comment:
I don't think it's necessary to add a feature to `isoformat()` just for the
purpose of being able to add the corresponding parser, particularly when the
plan is to implement a much broader ISO 8601 parser for Python 3.11 (I've done
most of the
New submission from Paul Ganssle :
As part of bpo-35829, it was suggested that we add the ability to output the
"Z" suffix in `isoformat()`, so that `fromisoformat()` can both be the exact
functional inverse of `isoformat()` and parse datetimes with "Z" outputs. I
thi
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue46228>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by paul j3 :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue46080>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
Duplicate of https://bugs.python.org/issue41255
Argparse.parse_args exits on unrecognized option with exit_on_error=False
--
nosy: +paul.j3
resolution: -> duplicate
stage: patch review -> resolved
status: open -&g
Paul Kehrer added the comment:
NIST provides no official guidance on iteration count other than NIST SP
800-132 Appendix A.2.2, which states "The number of iterations should be set as
high as can be tolerated for the environment, while maintaining acceptable
performance."
I can t
Paul Ganssle added the comment:
Sorry I missed this! Thank you for taking the time to write this up and to make
a PR.
Unfortunately, I don't think I agree with the idea of warning about this. The
warnings about `utcnow` and `utcfromtimestamp` are a problem because `utcnow`
Paul Kehrer added the comment:
Changes in ABI don't seem to be the likely culprit since the Dockerfile
provided can demonstrate this bug and has no caching that would result in
obtaining alpha2-based binaries.
--
___
Python tracker
&
Change by Paul Pinterits :
--
nosy: -Paul Pinterits
___
Python tracker
<https://bugs.python.org/issue29964>
___
___
Python-bugs-list mailing list
Unsubscribe:
John Paul Adrian Glaubitz added the comment:
I'm running into exactly this issue when using 'offlineimap' which is written
in Python.
--
nosy: +glaubitz
___
Python tracker
<https://bugs.pyt
Paul Campbell added the comment:
Victor: The changes in the main branch gets me past this issue without having
to make additional changes.
--
___
Python tracker
<https://bugs.python.org/issue46
Paul Campbell added the comment:
> In Python, we are trying to provide a same C API on all platforms. If "struct
> stat" is no longer considered as portable, IMO we should attempt to avoid it,
> at least in the public C API.
Microsoft provides stat and struct stat, b
Paul Campbell added the comment:
Hi Victor, I was trying to compile with clang on Windows 10. I will try to pull
your 3.11 changes and test. Sorry to cause so much churn. It looked to me like
a simple issue that was missed, probably because whatever was trying to compile
was not normally
Paul Campbell added the comment:
I was trying to build python core (-DMS_WINDOWS -DPy_BUILD_CORE). I was using
clang, which I think is unsupported looking at Windows doc. After looking at
the issue though, it seemed that it was just some slight mistake which is why I
filed the bug.
clang
paul j3 added the comment:
"I tried to create a group hierarchy in a way that I can pass the
responsibility of argument validation to the argument parser."
I looked at your example in:
https://bugs.python.org/issue46058
The many levels of nesting groups was confusing, but now
paul j3 added the comment:
This patch should be rejected.
By using `common_opts_parser` as parent to both the main and subparsers, you
have defined the same argument in both.
By a long standing patch, the value assigned in the subparser has precedence
(whether it's the default or
Paul Ganssle added the comment:
> from practical experience, it is a whole lot better to not deal with
> timezones in data processing code at all, but instead only use naive UTC
> datetime values everywhere, expect when you have to prepare reports or output
> which has a require
Paul Ganssle added the comment:
Yes, this is the documented behavior, including a warning against using UTC now
in the documentation!
There is some possibility of removing utcnow entirely as an "attractive
nuisance", but I suspect that this will lead to much consternation and
han
Change by Paul Campbell :
--
title: _Py_stat using incorrect type for status argument -> _Py_stat and
_Py_wstat using incorrect type for status argument
___
Python tracker
<https://bugs.python.org/issu
Change by Paul Campbell :
--
keywords: +patch
pull_requests: +28681
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30478
___
Python tracker
<https://bugs.python.org/issu
Change by Paul Campbell :
--
components: +Build, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
type: -> compile error
___
Python tracker
<https://bugs.python.org/issu
New submission from Paul Campbell :
While attempting to embed the full cpython source in my application, I found
that during compilation on Windows, there was a compilation issue due to struct
stat not being defined. Taking a look at the file cpython/fileutils.h, it seems
that the type of
Jean-Paul Calderone added the comment:
My understanding of the resolution of this ticket is that it is still not
possible to use setrlimit with RLIMIT_STACK to raise the soft stack limit. Is
that correct?
In that case, the original bug report still seems valid and unresolved (and
indeed
paul j3 added the comment:
Don't add an argument_group to another argument_group. While input allows this
nesting, the formatting is not designed to handle it. Nor does the
documentation illustrate such nesting.
Nesting a mutually_exclusive_group in an argument_group works becaus
paul j3 added the comment:
At least until these latest deprecations, the only nesting that made sense was
to put a mutually_exclusive_group inside an argument_group. This was a way of
providing a title and description for the exclusive_group. (And not
documented.) I don't know if t
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue46101>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Ganssle added the comment:
Jason's patch looks good to me, but I don't understand why Karthikeyan
originally suggested using `normalize_path`. Trying to dig through exactly how
`files().joinpath().open` is implemented has so many layers of indirection and
abstract classes th
Change by Paul Kehrer :
--
title: Segfault -> Segfault when using trace functions in 3.11a3
___
Python tracker
<https://bugs.python.org/issue46159>
___
___
Py
New submission from Paul Kehrer :
In Python 3.11a3 on Linux/x86_64 (failed to replicate on macOS, not attempted
on Windows) the interpreter non-deterministically segfaults when running some
code under coverage. This did not occur under 3.11a2. Looking at the backtrace
from a core dump I see
Change by Paul Bryan :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Paul Bryan :
--
keywords: +patch
nosy: +pbryan
nosy_count: 2.0 -> 3.0
pull_requests: +28299
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30078
___
Python tracker
<https://bugs.python.org/i
New submission from Paul Bryan :
Currently, the documentation states it creates a new event loop; it should also
indicate that it returns the newly created event loop.
--
assignee: docs@python
components: Documentation
messages: 408425
nosy: docs@python, pbryan2
priority: normal
Paul Moore added the comment:
I tend to agree with Steven and David here. You define __getattribute__ and so
that's the behaviour you get when an attribute of the class is requested
(whether by the system or by your code). The documentation (here:
https://docs.python.org/3/refe
Paul Ganssle added the comment:
Updating this issue to cover the problem in date, time and datetime.
--
title: datetime: strftime method takes different keyword argument: fmt (pure)
or format (C) -> datetime, date and time: strftime method takes different
keyword argument: fmt (p
Paul Ganssle added the comment:
I think this is mostly a duplicate of bpo-41260, which has an open PR on it. I
think that got lost in the shuffle, I'm sad we didn't fix it in Python 3.10. I
think we should migrate all of these signatures that differ to whichever one
the C impleme
Paul Moore added the comment:
Well, we don't support doing that - so I'm not sure what you want beyond the
statement "it's not supported". If it works for you, then by all means use it,
but you'll be on your own for any issues you encounter unless you ca
paul j3 added the comment:
Put the required positional first
$ myapp myfile -s
or one of the store_true arguments
$ myapp -s -j myfile
I think
$ myapp -s -- myfile
will work as well, but that needs to be tested.
The '-s' has to be followed by something won't be
paul j3 added the comment:
https://bugs.python.org/issue9338
argparse optionals with nargs='?', '*' or '+' can't be followed by positionals
As you can see this is an old issue, but still too big for a quick fix.
As a general rule, don't use `nargs`
paul j3 added the comment:
prefix_chars is a parameter of the parent _ActionsContainer
class _ActionsContainer(object):
def __init__(self,
description,
prefix_chars,
argument_default,
conflict_handler):
super
paul j3 added the comment:
https://bugs.python.org/issue29553
Argparser does not display closing parentheses in nested mutex groups
supposedly fixed the parentheses for nested groups. You can read its
discussion and patches to see why it does not handle your case.
I don't see any exa
paul j3 added the comment:
Use of 'prefix_chars' as a argument_group parameter is not documented, nor
intended.
If it does appear to work in the help formatting, it is probably the result of
inheritance, since both ArgumentParser and Argument_group subclass a
_Actions_Conta
paul j3 added the comment:
This is too big of an example for this board; I think it should have been asked
on StackOverFlow. Or maybe trimmed do to a more compact example.
But in any case, this is normal behavior for argparse. Type checking, here
'int', is done after the
paul j3 added the comment:
There was a bug/issue that addressed problems with nested
mutually_exclusive_groups. It should be easy to find.
The problem is that the usage formatter is brittle, building a string and then
striping out "unnecessary" characters. I assume the fix h
paul j3 added the comment:
A new patch, https://bugs.python.org/issue45235 has clobbered this patch.
It has also exposed the inadequate unittesting for the case(s) where the 'dest'
of main namespace, subparser namespace, user provided namespa
paul j3 added the comment:
I should study previous posts in more detail, but here are some thoughts on
correctly handling user namespace.
At the start of `parse_known_args`, there's a
if namespace is None:
namespace = Namespace()
We need to hang on to a copy of
New submission from paul j3 :
https://bugs.python.org/issue45235
argparse does not preserve namespace with subparser defaults
was passed and put into the latest release with rather obvious buggy behavior.
This means that the unittest file does not adequately test for overlapping
'des
paul j3 added the comment:
Артём Иконников, developers and experienced users are familiar with other
programs, such as 'svn' which is used as an example
svn checkout, svn update, and svn commit
Also the use of '--foo' as flagged/optional(s) argument is so familiar to
Change by paul j3 :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45504>
___
___
Python-bugs-list
Change by paul j3 :
--
stage: resolved -> test needed
status: closed -> pending
___
Python tracker
<https://bugs.python.org/issue45235>
___
___
Python-bugs-
paul j3 added the comment:
A _SubParsersAction is private to the extent that users should not attempt to
create it directly, and thus don't need to know the details - beyond what's
documented:
"The add_subparsers() method is normally called with no arguments and returns a
paul j3 added the comment:
parser = argparse.ArgumentParser()
sub = parser.add_subparsers()
example_subparser = sub.add_parser("example")
example_subparser.add_argument("--flag", default=10)
print(parser.parse_args(["example","--flag=15"
paul j3 added the comment:
I just downloaded this `argparse.py`.
This change makes it impossible to use a subparser argument if it is defined in
the user provided namespace, or by the main parser. It blocks not only
subparser default, but also user input.
It has reverted the 9351 patch
paul j3 added the comment:
I haven't studied or tested this change, but it looks like a partial retraction
of
https://bugs.python.org/issue9351
argparse set_defaults on subcommands should override top level set_defaults
Originally the main namespace was passed to the subparser. S
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue45235>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
As a default option flags can be abbreviated (unless there's a conflict).
Recent version have a allow_abbrev parameter that lets you turn this off.
--
nosy: +paul.j3
___
Python tracker
<https://bugs.py
paul j3 added the comment:
Are you expecting the subcommand help to show the 'help' line that the main
help shows?
subparsers.add_parser('a', help='a help')
add_parser takes all of the parameters that `ArgumentParser` takes, including
description and epilo
paul j3 added the comment:
The usage formatting is fragile, with many associated bug reports. Until
someone does a major rewrite, it is best to avoid special characters,
especially `()` and `[]` in the `dest` or `metavar`.
Usage uses () to encolde mutually_exclusive_groups and [] to mark
paul j3 added the comment:
`add_argument` also returns a Action subclass object. All of those subclasses
are "private". While that return reference is usually ignored, sometimes it is
useful to it, assigning it to a variable or list. The documentation could be
clearer about
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue45587>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
Adding `newline` to `FileType` requires modifying both the `__init__` and
`__call__` methods. That's nearly the whole class. I'd copy and edit, and
forget about subclassing.
--
___
Python track
Paul Moore added the comment:
That's probably because you're using Python 3.10 (assuming the "version" tag
you added is correct) and those libraries haven't released Windows binaries for
Python 3.10 yet.
You should wait for binaries to be released, and check with th
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +27309
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29038
___
Python tracker
<https://bugs.python.org/issu
New submission from Paul Ganssle :
Right now the datetime documentation recommends using `dateutil.tz` for IANA
time zones, but we should update this to point to `zoneinfo`.
--
assignee: p-ganssle
components: Documentation
messages: 404207
nosy: p-ganssle
priority: low
severity
Change by Stephen Paul Chappell :
--
nosy: +Zero
___
Python tracker
<https://bugs.python.org/issue35228>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul added the comment:
oh ok. thx
--
___
Python tracker
<https://bugs.python.org/issue45432>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Paul :
here is my test file:
'''
import sys
print(sys.argv)
'''
when I then try 'python test.py ^test' the ^ character is stripped away, this
doesn't happen on Linux. This also doesn't happen if I put ^test in quotes
(only
paul rubin added the comment:
Bah, the above doesn't work in the cases where the iterator is empty or
(different symptom) where the tail part is empty. Rather than posting a
corrected version (unless someone wants it) I'll just say not to use that code
fragment, but that the in
paul rubin added the comment:
Oh wow, before_and_after will go into the itertools module per that patch? I
found this issue while looking for a way to this, but had written the following
implementation:
def span(pred, xs):
# split xs into two iterators a,b where a() is the prefix of xs
Paul Ganssle added the comment:
This is a great bug report, but for anyone else who gets a bit lost in the
details, here's the core of the issue:
>>> p = Path("/1/2")
>>> q = Path("1/2")
>>> p.parents[-1] # This is correct
PosixPath(
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue45414>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Broe added the comment:
Good Morning:
I was able to resolve the issue based on your assistance. I created this
topic at github.com
https://github.com/sphinx-doc/sphinx/issues/9669
Someone answered it and it was simple:
Thank you so much. That was it. I thought it was looking for a
New submission from Paul Broe :
Brand new build of Python 3.9.7 on RHEL 7. Placed in /usr/local/python3
Created new python environment
cd /usr/opt/oracle/
python3 -m venv py3-sphinx
source /usr/opt/oracle/py3-sphinx/bin/activate
Now verify that python is now linked to Python 3.
In this
Change by paul j3 :
--
Removed message: https://bugs.python.org/msg401554
___
Python tracker
<https://bugs.python.org/issue41255>
___
___
Python-bugs-list mailin
paul j3 added the comment:
In
https://stackoverflow.com/questions/69108632/unable-to-catch-exception-error-for-argparse
it looked like `exit_on_error` does not work when using subparsers. On on
further thought, I realized that it has to included in the definition of the
subparser. As
paul j3 added the comment:
In
https://stackoverflow.com/questions/69108632/unable-to-catch-exception-error-for-argparse
we found that `exit_on_error` does not work when the error occurs in a
subparser.
Unless someone wants to take time to get this right, I think this feature
should be
Paul Moore added the comment:
> I don't know technical details but i can successfully use this command: `pip
> install --upgrade pip`.
On Windows (and not under something like cygwin or msys, which have their own
rules)? Anyway, it's not that important, the recommended app
Paul Moore added the comment:
> You are wrong. Windows lets me update pip via pip.
You have misinterpreted what you are seeing.
> Should i create new issue for this?
No, you should follow the correct process and use `python -m pip`, and not use
pip di
Change by Paul Moore :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45148>
___
___
Paul Moore added the comment:
>From the documentation:
> upgrade indicates whether or not to upgrade an existing installation of an
> earlier version of pip to the bundled version.
Note the comment "to the bundled version". This command will not access the
internet
paul j3 added the comment:
The idea of combining help features by defining a subclass that inherits from
other subclasses was endorsed by the original developer (we could dig up an old
bug/issue to prove that).
The provided subclasses all tweak a "private" method, often one tha
paul j3 added the comment:
https://bugs.python.org/issue42980 argparse: GNU-style help formatter
https://bugs.python.org/issue33389 argparse redundant help string
https://bugs.python.org/issue29626
Issue with spacing in argparse module while using help
https://bugs.python.org/issue27303
paul j3 added the comment:
This is has been requested various times on StackOverflow, and possibly here
(I'd have to do a search).
The closest thing to making a compact action_invocation is to set the metavar
to '', and even thing we get a space, eg.
-f , --foo
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue44587>
___
___
Python-bugs-list mailing list
Unsubscribe:
1 - 100 of 3213 matches
Mail list logo