paul j3 added the comment:
My opinion is that this is an unnecessary addition.
Reasons:
- it is easy to add as a custom action class
- I haven't seen other requests for it
- the append retains information about the argument strings that extend looses
- it is easy flatten the app
paul j3 added the comment:
http://bugs.python.org/issue11588 is an earlier request for 'necessarily
inclusive' groups.
The patches that I proposed there are more general, allowing for other logical
combinations of arguments, as well as nesting groups. As such it is more
complex
Paul Moore added the comment:
Pip and/or setuptools will add the Scripts directory when needed, so it's not a
big deal that the installer doesn't create it. In 2.7.9 and later, and 3.4
onwards, the Scripts directory is created as part of the ensurepip step of the
install, so it
Paul Moore added the comment:
Steve - is it the fact that it's not using the versioned user-site directory
that you're referring to?
--
___
Python tracker
<http://bugs.python.o
Paul Moore added the comment:
... because I think it does do that (see
http://bugs.python.org/file38085/userscripts.patch which updates this file)
--
___
Python tracker
<http://bugs.python.org/issue16
Paul Moore added the comment:
I think the problem here is that as the OP mentioned, win_add2path.py doesn't
add the directory if it doesn't exist, so if you run it immediately after
install, it won't add the directories that don't exist yet. And because it's
settin
Paul Moore added the comment:
One further thought - the installer can't create the user scripts directory if
you're doing an all-users install, that's sort of the point of "all users". It
could do so for a per-user install, but then there would be an inconsistency
tha
Paul Moore added the comment:
Here is a patch to fix the issue.
--
keywords: +patch
Added file: http://bugs.python.org/file38659/addpath.patch
___
Python tracker
<http://bugs.python.org/issue16
Paul Moore added the comment:
Cool. I'll try to set up a test (it's not covered by the testsuite AFAICT) on a
VM or something, just to confirm I haven't broken anything.
--
___
Python tracker
<http://bugs.pyt
Paul Moore added the comment:
One further thought. This is a change in behaviour (albeit to a script in
Tools), so I'm inclined to say it's a new feature for 3.5, rather than a bugfix
to be backported to 2.7 and 3.4.
For users of 2.7/3.4, the workaround is simply to rerun the s
Paul Moore added the comment:
There's actually a bug in the pre-3.5 script beyond the "does the directory
exist" check. The code is
if hasattr(site, "USER_SITE"):
userpath = site.USER_SITE.replace(appdata, "%APPDATA%")
userscripts = os.pa
Paul Moore added the comment:
I think the main (only?) user of having sys.path entries in the registry is
pywin32. It might be worth asking them if they can switch to a more mainstream
approach, and then maybe the whole registry finder thing can be removed
completely.
--
nosy
paul j3 added the comment:
OK, so you are thinking about what happens to the subparsers `dest` when the
user names a command. That isn't handled by the `store` action, but by the
call of the subparsers action
class _SubParsersAction(Action):
def __c
Changes by paul j3 :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker
<http://bugs.python.org/issue23487>
___
_
paul j3 added the comment:
As to the nature of the error when 'add_subparsers' is given an 'action'
parameter:
'add_subparsers' does several things to 'kwargs' before it passes them to the
relevant Action class.
def add_subparsers(self,
Paul Moore added the comment:
The correct solution to this issue now is to install the Microsoft supplied
"Visual C++ Compiler for Python 2.7" package (available as a free download from
MSDN). That has all the components needed to build 32 and 64-bit extensions.
Your setup.py ne
New submission from Paul Eckhardt:
The bahaviour of __format__ for decimal.Decimal type differs in one detail from
float:
The minimum number of digits used for the exponent is 1 for Decimal, and 2 for
float.
e.g.: "{:8.2E}".format(1.0) --> "1.00E+00"
"
Paul Moore added the comment:
I believe it's the way it is because Python follows the Standard Decimal
Specification, which includes tests for conformance to the current formatting
behaviour.
--
nosy: +paul.moore
___
Python tracker
paul j3 added the comment:
I can't reproduce this with either 3.4.2 or the latest development
'argparse.py' file (that I just downloaded).
There have been some issues with the method used format the usage line,
_format_actions_usage. It formats the line with all the group brac
Changes by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<http://bugs.python.org/issue23058>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
paul j3 added the comment:
Without actually running this case I think it is caused by the
http://bugs.python.org/issue9351 patch.
You can check the __call__ method for class _SubParsersAction and how it
handles invocation of the subparser. Does it get the existing namespace, or a
new one
paul j3 added the comment:
This is another manifestation of the
http://bugs.python.org/issue9351 partial patch (on how the namespace of the
parser relates to the namespace of the subparser).
see also
http://bugs.python.org/issue23058
--
___
Python
Changes by paul j3 :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue23555>
___
___
Python-bugs-list mailing list
Unsubscrib
paul j3 added the comment:
http://bugs.python.org/issue22672
float arguments in scientific notation not supported by argparse
is a newer complaint about the same issue. I've closed it with link to here.
--
___
Python tracker
paul j3 added the comment:
closed with reference to #9334
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue22672>
___
___
Python-
Changes by paul j3 :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue22500>
___
___
Python-bugs-list mailing list
Unsubscrib
Paul Moore added the comment:
It returns True.
--
___
Python tracker
<http://bugs.python.org/issue23808>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue14243>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Moore added the comment:
The patch looks good to me.
rhettinger: I'm not sure I see a problem with the doc changes in the latest
patch - noting that commonprefix may return an invalid path is fine, and what
the current docs say. Directing people to commonpath if they don't wa
Paul Moore added the comment:
Assuming new code should be using pathlib, I agree this should probably be
closed now as obsolete.
One proviso - pathlib objects don't take a bytestring path in the constructor.
If there's a need for a low-level splitpath taking bytes objects, there may
paul j3 added the comment:
The handling of defaults is a bit complicated.
Note that `set_defaults` both sets a `_defaults` attribute, and any actions
with a matching `dest`. So it could change the `default` of 0, 1 or more
actions.
def set_defaults(self, **kwargs):
self
Paul Moore added the comment:
A few minor review comments. Nothing substantial, tbh. Looks good.
--
___
Python tracker
<http://bugs.python.org/issue23731>
___
___
Paul Moore added the comment:
On Windows, subprocess.Popen has to convert an argument list to a command line
(because that's what the OS expects for CreateProcess). It does so internally,
using subprocess.list2cmdline, which follows the quoting rules for the MS C
runtime (because that
Paul Moore added the comment:
Presumably this would just be a case of moving "activate" from
venv/scripts/posix to venv/scripts/common? I don't think including csh or fish
scripts on Windows is worthwhile...
Attached is a patch on that basis. I didn't see any tests for
paul j3 added the comment:
It's a possible addition, but I don't have sense of the demand for it.
I wonder, what does the class offer that a function like this doesn't?
def adate(date_string):
return datetime.datetime.strptime(date_string,'%Y-%m-%d').date(
paul j3 added the comment:
Examples of datetime types from Stackoverflow:
http://stackoverflow.com/questions/21437258/defining-python-argparse-arguments
The suggested answer (but not accepted) is 'type=lambda s:
datetime.datetime.strptime(s, '%Y-%m-%d')'
another
http
Paul McMillan added the comment:
As Martin said, backporting a change for this wouldn't be appropriate
for Python 2.7. The 2.7 docs could certainly be updated to make this
clearer, but we can't introduce a breaking change like that to the
stab
Paul Moore added the comment:
Doh. That latter approach (a RawIOBase implementation) is *precisely* what
win_unicode_console does for stdout (using utf16le rather than utf8 as that's
the native Windows encoding used by WriteConsole). So (a) yes it would work,
and (b) it has al
New submission from Paul Moore:
Console code page issues are a consistent source of problems on Windows. It
would be nice, given that the Windows console has Unicode support, if Python
could write the full range of Unicode to the console by default.
The MSVC runtime appears to have a flag
Paul Moore added the comment:
Generally, my understanding is that the console does pretty badly at supporting
Unicode via the normal WriteFile APIs and the "code page" support (mainly
because support for the UTF8 code page is rubbish). But the WriteConsole API
does, I believe, h
Paul Moore added the comment:
My proof-of-concept attempt to use _O_U8TEXT resulted in some very bizarre
behaviour - odd buffering of the interactive interpreter output and what appear
to be Chinese characters being displayed for normal (ASCII) interactions.
I suspect there is some oddity
paul j3 added the comment:
It'll take me a while to work through this proposed patch. My first reaction
is that I am uncomfortable with adding an attribute to all parsers just to
implement this help feature. For one thing it seems to cross functionality
boundaries.
I need to revie
Paul Moore added the comment:
Hmm, I thought everyone was too scared to change distutils. Brave man :-)
More seriously, I'm not sure I can comment usefully, I don't really understand
any of this code, and the changes are pretty big. I guess the biggest risk is
that someone directly
Paul Moore added the comment:
Sounds fair enough to me. I guess you have most of the bases covered, and
AFAIK, we've never actually supported building extensions with anything other
than the compiler python.org uses, so that seems a reasonable view to take.
Apart from the numpy/scipy
paul j3 added the comment:
Giving the `subparsers` Action a `metavar` might achieve everything the
proposed patch does - without any code changes.
In the 1st test case:
subparsers = parser.add_subparsers(title='subcommands',
d
Paul Moore added the comment:
Is it not reasonable to simply say that implementations of numbers.Rational
which allow the numerator and denominator to have types for which true division
doesn't return a float, have to provide their own implementation of __float__()?
It's cert
Paul Moore added the comment:
Alternatively, return int(self.numerator) / int(self.denominator). After all, a
fraction whose numerator can't be represented as a Python (unlimited precision)
integer is a pretty odd sort of fraction...
--
___
P
Paul Moore added the comment:
Link to the SO answer? Does it explain *why* this is a requirement?
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue24
Paul Moore added the comment:
That seems to merely be saying that each threading.local() object is distinct,
so if you want to share threadlocal data between workers, creating local
objects won't work.
I think I see what the confusion is (although I can't quite explain it yet,
I&
Paul Moore added the comment:
I should also say, I'll try to work up a doc patch for this, once I've got my
head round how to explain it :-)
--
___
Python tracker
<http://bugs.python.o
Paul Moore added the comment:
You're right, the SO answer is simply wrong. I've posted a (hopefully clearer)
answer. If anyone wants to check it for accuracy, that'd be great.
Agreed this can probably be closed as "not a bug". On first reading, I thought
the docs co
paul j3 added the comment:
This overlaps with http://bugs.python.org/issue22240
argparse support for "python -m module" in help
This issue also tries to handle zip files as well.
Deducing the `prog` was moved to a separate function.
One challenge with that issue was construct
Paul Moore added the comment:
On 21 April 2015 at 23:11, Ethan Furman wrote:
> Hmmm... could my problem be that even though function locals are thread-safe,
> the globals are not, so trying to create a threading.local via a global
> statement was clobbering other threading.local
paul j3 added the comment:
A similar Stackoverflow question
http://stackoverflow.com/questions/21692395/hiding-selected-subcommands-using-argparse/21712058#21712058
--
___
Python tracker
<http://bugs.python.org/issue22
Paul Moore added the comment:
As described. this seems to be a Windows-only feature (it's replacing a
registry lookup with a config file alongside the Python DLL).
So I'm not sure I understand Nick's comment - Nick, are you suggesting this
should be a cross-platform feature? If
paul rubin added the comment:
Hey, thanks for updating this. I still remember the nasty incident that got me
filing this report in the first place. I'll look at the patch more closely
when I get a chance, but the immediate comment I'd make is it's worth adding a
sentence sa
Paul Moore added the comment:
I think the documentation is fine:
"""
The key corresponding to each item in the list is calculated once and then used
for the entire sorting process.
"""
This corresponds with the standard "decorate-sort-undecorate" appr
Paul Moore added the comment:
On 29 April 2015 at 19:42, Sergey B Kirpichev wrote:
>> It's a common computer science technique
>
> Could you provide any language that avoid this optimization?
>
> Here is Perl 5:
> http://perl5.git.perl.org/perl.git/blob/HEAD:/pp_sort
New submission from Paul Moore:
Although the new generator methods introduced in PEP 342 are documented, the
term "coroutine" is not defined anywhere. In particular, the fact that Python
coroutines work in conjunction with an event loop rather than transferring
control directly be
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue23572>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
It's the spaces and/or brackets in the metavar, along with a usage line that is
long enough to wrap, that is raising this error.
It's a known problem.
http://bugs.python.org/issue11874
--
nosy: +paul.j3
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue24127>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Moore added the comment:
Install is noted as being on Windows 10 tech preview. I don't have a Windows 10
installation present, but the similar issues reported in Wine seem to be
related to limited support in Wine for Windows job objects. Have there been any
changes to Job object su
Paul Moore added the comment:
One issue with your code - what would you expect str(test) to produce?
"dir/test.txt" or "dir\test.txt"? That's the point of the "flavour" - is it a
Windows path or a Unix path?
Agreed that an easier method of creating Path s
Paul Moore added the comment:
It looks like something in the QueryInformationJobObject API has changed with
Windows 10. The code says:
ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation,
&info, sizeof(info), &rc);
if (!o
Paul Moore added the comment:
Cheers. I missed a bit of code, job comes from "job = CreateJobObject(NULL,
NULL)" so it shouldn't be NULL unless that call failed.
Rather than speculate though, I'll leave it with you.
Paul Moore added the comment:
For that type of function, I'd suggest you use a standalone function rather
than subclassing and methods or operator overloading. You don't gain enough to
be worth the complexity of having to subclass path objects. And duck typing
means that your func
Paul Moore added the comment:
Adding Jason Coombs and Vinay Sajip, as if this needs a fix to the launcher
code, then the launchers used by distlib and setuptools (for exe wrappers of
console entry points) will need to be changed as well.
It would be really useful if all 3 projects used a
Paul Moore added the comment:
I have no problem with that - it's a style choice certainly.
As I said, I'd like to see simpler subclassing of pathlib objects. I just think
it'll be quite hard to do (given the complexities of classes for Windows/Unix
as well as pure and concret
Paul Moore added the comment:
> Are you the author of path lib ?
Nope, that's Antoine.
--
___
Python tracker
<http://bugs.python.org/issue24132>
___
_
Paul Moore added the comment:
> What is the good way to propose a patch ?
If you have a patch, attach it here, and it will get reviewed.
--
___
Python tracker
<http://bugs.python.org/issu
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue17620>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue1602>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Paul Baker:
On the "www.python.org/downloads/windows" page, the "Windows x86 MSI installer"
links for versions 2.4.4, 2.4.3, 2.4.2 and 2.4.0 point to the IA64 versions of
the installers rather than the x86 versions.
For example, the 2.4.4 link points t
Paul Baker added the comment:
Done: https://github.com/python/pythondotorg/issues/751
--
___
Python tracker
<http://bugs.python.org/issue24167>
___
___
Python-bug
paul j3 added the comment:
I wouldn't describe this as bug, just a nuance on how parsers and subparsers
play together.
To the main parser, the subparser argument looks like another positional. It
allocates strings to it and any following positionals based on their respective
'na
paul j3 added the comment:
And the behavior does match the help
{ls,du} ... vm [vm ...]
It's just that one of the strings is allocated to the first `...`, whereas you
expected it to be put in the second.
--
___
Python tracker
Paul Moore added the comment:
I agree with Steve, we shouldn't be constrained to preserve all the
undocumented internals of distutils - doing that in the past is what has made
distutils essentially unmaintainable.
I don't think there's a concrete example of real code that wi
paul j3 added the comment:
Look at http://bugs.python.org/issue9338
argparse optionals with nargs='?', '*' or '+' can't be followed by positionals
That has a proposed patch that wraps the main argument consumption loop in
another loop.
The current loop a
Paul Moore added the comment:
You should add docs for the new method, as well.
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue24195>
___
___
Paul Moore added the comment:
Just as a note - to test a pure Pthon patch like this, you can apply the patch
to your installed Python 3.4 installation, and just run the test using that.
There should be no need to build your own Python.
>python C:\Apps\Python34\Lib\t
Paul Moore added the comment:
So just to be clear - this proposal would *only* affect the tagged filename
used for loading ".pyd" files? (And in practice, the untagged form is normally
used for Windows .pyd files anyway...)
--
nosy: +
Paul Moore added the comment:
Multiprocessing works by firing up additional processes. Those processes won't
have access to functions defined in the interactive interpreter.
Can you reproduce this problem in a standalone script? I suspect not, but if
you can please post the script
Paul Moore added the comment:
OK, if it's not reproducible in a standalone script, I'll close this as it's
expected behaviour.
Correcting the typo in your script (__name__ == "__main__"), I ran it and it
worked as expected on my system:
>type multi.py
import mult
Paul Moore added the comment:
I'm not a heavy user of concurrent.futures, so I don't have a strong opinion.
I've never felt a need for this function, though, so I guess I'm -0. A recipe
in the docs would be good, though.
--
__
Paul Moore added the comment:
I presume the copy method is intended as a file copy, not for copying the
object. But calling the method copy() is likely to be confusing, precisely as
happened here :-)
--
nosy: +paul.moore
___
Python tracker
<h
Paul Moore added the comment:
Supporting mingw building of extensions has always been a complicated process,
mainly because there appear to be many variants of mingw (and in particular,
there seem to be multiple 64-bit builds). Add to this the fact that cygwin is
sometimes used as a cross
Paul Moore added the comment:
Not at all. Mingw support is important for the scientific community, as I
understand it, and I'm willing to help there if I can. That won't be at the
cost of other areas I can contribute to, but I consider packaging as much my
area of expertise as Win
Paul Moore added the comment:
Ruben,
Thanks for the detailed explanations. Just to be clear, I am *not* the person
that will take this aspect of the process forward - that will be the community
of people building (or wanting to build) extensions for Python with mingw. I
don't know if
Paul Moore added the comment:
> If there is no interest in having a (community-supported, semi-
> official) GCC-built Python on Windows, I'm sure something else
> can also be worked out, which would include stripping the current
> dinosaur -mno-cygwin code which is what this b
Paul Moore added the comment:
On 19 May 2015 at 17:09, Руслан Ижбулатов wrote:
> 3) Use MSVC for CPython and MinGW-w64 for the rest and somehow ensure that
> FDs are converted when passing the CRT barrier. And stat structs as well. And
> everything else that differs. This is
Paul Moore added the comment:
==
ERROR: test_read_only_directory (test.test_tempfile.TestMkdtemp)
--
Traceback (most recent call last):
File "C:\Work\Pro
Paul Moore added the comment:
Fantastic news, thanks for the feedback.
Closing this as a third party issue.
--
resolution: -> third party
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Paul Moore added the comment:
Works fine with the new patch:
>.\rt.bat -x64 -q test_tempfile
C:\Work\Projects\cpython\PCbuild>"C:\Work\Projects\cpython\PCbuild\amd64\python.exe"
-Wd -E -bb "C:\Work\Projects\cpython\PCbuild\..\lib\test\regrtest.py"
test_tempfile
Paul Moore added the comment:
Ralf, thanks for the comments. The scientific community is definitely the key
group that *need* mingw (as opposed to people who merely want to use it because
they don't want to buy into MS compilers, or for similar personal reasons).
My personal view is th
Paul Moore added the comment:
The patch looks fine to me, although I don't think you need the comment showing
the old code. The new code is perfectly clear on its own.
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/is
Paul Moore added the comment:
I'm not sure I follow. Isn't the point of this patch to try again in certain
cases of a PermissionError, where currently the code breaks out of the loop
early? How can the result be worse than the current behaviour? Suerly sometimes
(maybe not always
Changes by Paul Moore :
--
nosy: +paul.moore
___
Python tracker
<http://bugs.python.org/issue2528>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
http://bugs.python.org/issue21633
also deals with the formatter of subparsers. I note there that few of
parameters of the main parser propagate to the subparsers.
The current design gives the programmer maximum control, at the expense of a
bit of typing. If I
paul j3 added the comment:
Another example where the old way would have worked better
http://bugs.python.org/issue27859
--
___
Python tracker
<http://bugs.python.org/issue9
2601 - 2700 of 3213 matches
Mail list logo