Paul Moore added the comment:
The embedded distribution is meant to be for just that - embedded applications.
I'm not quite sure what you mean by support it, or when you would write code
that needed to know it was being run from an embedded application.
Can you clarify precisely why you
Paul Moore added the comment:
With the embedded distribution, you should probably be calling the Python API
rather than running python.exe. And if you do it that way, you can set sys.path
via the API before calling user code.
Alternatively, you can set up a site.py within your copy of the
Paul Moore added the comment:
I'm still not clear what you're doing here - why does it matter where you have
the _pth file?
Could you explain how your application directory is laid out, and what is the
main executable for the application? I'm assuming it's a Windows ex
Paul Moore added the comment:
OK, well I certainly wouldn't bother supporting users trying to provide the
path to an embedded distribution of Python. That's not what the distribution is
for, and as the author of Bazel you'd be perfectly OK (IMO) to say you don't
support t
New submission from Paul Schreiber:
bugs.python.org does not redirect HTTP requests to HTTPS and does not provide
Strict Transport Security.
--
messages: 287661
nosy: paulschreiber
priority: normal
severity: normal
status: open
title: bugs.python.org does not redirect to HTTPS
type
Paul Schreiber added the comment:
The issue you linked to:
http://psf.upfronthosting.co.za/roundup/meta/issue463
covers psf.upfronthosting.co.za (which doesn't support HTTPS at all) and not
bugs.python.org (which supports, but does not enforce
New submission from Paul Schreiber:
Allow users to log in to bugs.python.org with the email address in the username
field.
--
messages: 287699
nosy: paulschreiber
priority: normal
severity: normal
status: open
title: Allow login to bugs.python.org with email address
type: enhancement
New submission from Paul Schreiber:
I created a standard account on bugs.python.org with username paulschreiber and
email address paulschreiber at gmail.com.
Later, I attempted to log in to bugs.python.org using Google and was shown an
error message:
There is already an account for
Paul Moore added the comment:
This sounds like a bug in winpython, not in Python itself. You need the
location of t1.py in your _pth file. See
https://docs.python.org/3.6/using/windows.html#finding-modules for details.
Python 3.5 didn't use the _pth file mechanism, which is why the beha
Paul Moore added the comment:
No (see the doc link I referenced) - paths are absolute, or relative to the
_pth file. So "." means "in the same place as the pth file".
I don't think there's a way with _pth files to get the "add the location of the
execu
Paul Moore added the comment:
I'm not sure about this, I've never seen __path__ used like this. Why can't you
just set sys.path?
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
That's how scripts typically adjust their s
Paul Moore added the comment:
No more so than any other method of adding entries to sys.path (which is what
__path__ does for packages, I've just never seen it used for modules).
--
___
Python tracker
<http://bugs.python.org/is
Paul Moore added the comment:
It's probably worth also saying that maybe winpython shouldn't even be using
the _pth file feature. I don't know why it is, but the intended use case for
_pth files is embedded systems, so it's not clear how an alternative standalone
Python
Paul Moore added the comment:
>> an alternative standalone Python interpreter
>
> It's a convenient way to avoid having your standard library hijacked by
> registry keys installed by the regular interpreter.
Ah yes, that makes sense - it's maybe not the *right* way, bu
paul j3 added the comment:
http://bugs.python.org/issue22047 "argparse improperly prints mutually
exclusive options when they are in a group"
is similar.
-
There are two issues:
- the nesting of mutually exclusive groups
- the formatting of the usage in such cases.
Both ha
paul j3 added the comment:
We need to see the parser setup as well. I've never seen a bug like this
before. The `usage` line suggests that you are using subparsers.
It might be better if you asked this on StackOverFlow with a repeatable code
example. That's a better place to get
paul j3 added the comment:
I played around with the patch 117. I was wrong in thinking this was another
case of excess brackets being wrongly purged. The fix works by adding ending ]
that were missing the original. And it does add a symmetry to the code.
But it is easy to construct a set
Changes by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<http://bugs.python.org/issue29632>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
paul j3 added the comment:
Those strings are defined in a 'parser.registry' dictionary, with expressions
like
self.register('action', 'store', _StoreAction)
(Users can also register their own custom classes. The registry can also be
used for the 'type&
paul j3 added the comment:
Earlier issue on the same topic - passing a mutually exclusive group via parents
http://bugs.python.org/issue16807
Can they be consolidated?
--
___
Python tracker
<http://bugs.python.org/issue25
paul j3 added the comment:
The PR117 patch adds an apparent symmetry. There's a if/else for 'start', so
shouldn't there also be one for 'end'?
if start in inserts:
inserts[start] += ' ['
else:
inserts[start] = '['
paul j3 added the comment:
I should probably give PR 120 more credit. By checking the group's container
it in effect eliminates this overlapping action problem. Nested groups aren't
used in the usage, just the union xor.
Maybe the question is, which is better for the user? To te
Paul Moore added the comment:
I have a vague recollection of once working on a (Windows) system that
mis-resolved localhost. But it was a long time ago, and I'm 100% OK with
calling such a system broken.
+1 on using localhost
--
___
Python tr
Changes by paul j3 :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29626>
___
___
Python-bugs-list
paul j3 added the comment:
With this setup
import argparse
parser=argparse.ArgumentParser(prog='cli')
parser.add_argument('nodes')
sp=parser.add_subparsers()
p1 = sp.add_parser('list', description='Lists nodes in your current project')
p1.add_argument(
paul j3 added the comment:
This help looks normal:
1427:~/mypy/argdev$ python3 issue29626.py delete -h
usage: cli delete [-h] [-p] userid
Deletes a user in your organization.
positional arguments:
userid The userid of user.
optional arguments:
-h, --help show this
paul j3 added the comment:
Sorry, I missed that. For some reason I looking something bigger.
That's coming from the `metavar=""'.
If I specify `metavar="xxx" that help line will have
-p xxx, --projectid xxx
Replace the 'xxx` with '', and yo
Changes by paul j3 :
--
status: closed -> open
___
Python tracker
<http://bugs.python.org/issue29626>
___
___
Python-bugs-list mailing list
Unsubscrib
paul j3 added the comment:
My answer to
http://stackoverflow.com/questions/23349349/argparse-with-required-subparser
is getting a slow but steady stream of + scores; so the `required subparser`
issue is still bothering people.
This particular question addresses the problem that the error
New submission from Paul Marinescu:
importlib.machinery.FileFinder.find_spec is incompatible with
importlib.abc.MetaPathFinder.find_spec (different number of arguments).
The following leads to a runtime error:
loader = (importlib.machinery.SourceFileLoader
Changes by Paul Marinescu :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue27276>
___
___
Python-bugs-
paul j3 added the comment:
There are 2 issues here -
- how to make the 'choices' list most compact
- how to make the multiple option strings display (long and short) more
compact, regardless of why the argument part is long.
When the choices display is too long, 'meta
paul j3 added the comment:
http://stackoverflow.com/questions/18275023/dont-show-long-options-twice-in-print-help-from-argparse
Once answer demonstrates how to change the Formatter:
class CustomHelpFormatter(argparse.HelpFormatter):
def _format_action_invocation(self, action):
if
Paul Moore added the comment:
Thanks Tim.
To clarify, the only 2 places that pip calls ctypes is to get the user
application directory (and we've confirmed that doesn't error when called
direct from Python), and in the vendored colorama package (which we removed and
still got the
Paul Moore added the comment:
Confirmed I can reproduce the issue on Windows 7, with Python 2.7.12rc1. I
don't have C debugging capabilities on this PC, so that's as far as I can go
for now.
--
___
Python tracker
<http://bugs.python.o
Paul Moore added the comment:
Tim, I just got the issue with the x64 installer from python.org
(https://www.python.org/ftp/python/2.7.12/python-2.7.12rc1.amd64.msi)
--
___
Python tracker
<http://bugs.python.org/issue27
Paul Moore added the comment:
The problem appears to be related to https (maybe openssl?) I just did the
following test:
>py -2
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016, 05:57:31) [MSC v.1500
64 bit (AMD64)] on win32
Type "help", "copyright", "cr
Changes by paul j3 :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue24419>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<http://bugs.python.org/issue8538>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
New submission from Paul Killey:
I wonder if the word 'not' is missing between 'that' and 'should' in this
sentence in https://docs.python.org/2/library/copy.html?
Because deep copy copies everything it may copy too much, e.g., administrative
data structures that
Paul Killey added the comment:
I'm sorry, 'not' could be missing between 'should' and 'be' --- 'should not be
shared'
--
___
Pytho
Paul Killey added the comment:
Ah, I see now -- your comment clarified it for me. Thanks.
--
___
Python tracker
<http://bugs.python.org/issue27416>
___
___
Pytho
Paul Moore added the comment:
Things I know that call CoInitialize - pywin32/pythoncom and comtypes. I assume
the proposal is to call CoInitializeEx in a way that won't break those?
I'm not sure I see how this would affect the user (i.e. Python code). Brett
mentions detecting
Paul Moore added the comment:
Hmm, this'll teach me to rely on my memory rather than checking :-)
It seems to me that core code that needs COM can use it by wrapping the code in
CoInitializeEx(sys.coinit_flags)...CoUninitialize(). That will either work fine
(I don't know where y
Paul Moore added the comment:
Strong -1 on anything that scans my locally-written scripts by default. There's
no reason or justification for that.
Maybe there's a point in having a way to submit an untrusted Python code
snippet for scanning, but why would that need to be a core s
Paul Moore added the comment:
OK, so a 3rd party module providing a "safe_exec" function would make a good
proof of concept, I assume. You could probably do that using comtypes or
pywin32.
I'm not going to try to say what is or isn't a security threat, that's no
Paul Moore added the comment:
>> I am puzzled as to why "use safe_exec rather than exec" isn't an option
> Because you're going to have a hard time convincing malware authors to use it.
:-) So the malicious payload is the whole python command, not just file.bin.
Paul Moore added the comment:
> This doesn't work when COM objects have to be kept around. In the AMSI case...
OK, so that's a limitation. Is there any *other* use case for keeping COM
objects (that are created by the core) around? If not, then like it or not,
this is a problem
Paul Moore added the comment:
I presume by "we" you mean "the core"? There's nothing to stop 3rd party code
using COM APIs.
The only downside to using COM in (user) Python code at the moment is the need
for a dependency on pywin32 (robust, mature, but a bi
Paul Moore added the comment:
Thanks for the explanation. Based on what's been said, I'd have no objections
to this, on a "you don't pay for what you don't use" basis - i.e., users who
don't enable AMSI should not pay any cost for its existence.
I'd be
Paul Winkler added the comment:
This was marked as a duplicate of http://bugs.python.org/issue8788 but the doc
changes in that issue, and the current docs for 2.7, do not mention anything
related to handling of unicode nor how `doseq` affects unicode-related
behavior. If we can agree on
Paul Moore added the comment:
This sounds like 2 related items (but I'm happy for them both to be under this
issue, I'm not suggesting we need 2 issues):
1. Allowing py -register to add PEP 514 metadata to the registry for the given
path.
2. Allowing py - to use PEP 514 met
Paul Moore added the comment:
On 23 July 2016 at 23:01, Eryk Sun wrote:
>> I assume you wouldn't expect to support shebang lines
>> like "#!python3.6r"?
>
> That's already supported in py.ini in the [commands] section, per PEP 397.
True, I'd forgot
Changes by Paul Marks :
--
nosy: +Paul Marks
___
Python tracker
<http://bugs.python.org/issue20215>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Marks added the comment:
First off, the server_address=('localhost', port) case: this feature is
fundamentally broken without support for multiple sockets, because the server
can listen on at most one address, and any single choice will often be
inconsistent with clients
Paul Marks added the comment:
> if the user specifically wants to bind to a numeric IPv4 address, is there
> any advantage of choosing the dual-stack [...]?
If you're in a position to write AF_INET6-only code, then dualstack sockets can
make things a bit cleaner (one family
Paul Sokolovsky added the comment:
What about rounding pi to 3 (and tau to 6)?
https://en.wikipedia.org/wiki/Indiana_Pi_Bill (and I'm sure we can find a cute
video about how cool to have pi as 3 to add it to the docs).
--
nosy: +pfalcon
___
P
Paul Moore added the comment:
LGTM. Maybe worth a documentation note - "Changed in 3.6 - added an exit
message"? But I'm OK with it as is if you don't think that's worth it.
--
nosy: +paul.moore
___
Python tracker
<http:
Changes by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<http://bugs.python.org/issue12713>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
paul j3 added the comment:
I haven't read the discussion in full, but it looks like this patch was added
without any recent discussion or testing.
Previously if we had `choices=['a','abc']`, any exact match would be accepted,
and partial matches rejected. With th
New submission from Paul McGuire:
In writing a simple UDP client using asyncio, I tripped over a call to
getsockname() in the _SelectorTransport class in asyncio/selector_events.py.
def __init__(self, loop, sock, protocol, extra=None, server=None):
super().__init__(extra, loop
Paul McGuire added the comment:
To clarify how I'm using a socket without a bound address, I am specifying the
destination address in the call to transport.sendto(), so there is no address
on the socket itself, hence getsockname()
Paul McGuire added the comment:
I was about to report this same issue - I get the error message even though I
explicitly call transport.close():
C:\Python35\lib\asyncio\selector_events.py:582: ResourceWarning: unclosed
transport <_SelectorDatagramTransport closing fd=232>
It looks li
Paul McGuire added the comment:
(issue applies to both 3.5.2 and 3.6)
--
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue27822>
___
___
Pytho
Paul McGuire added the comment:
Ok, I will submit as a separate issue.
--
___
Python tracker
<http://bugs.python.org/issue27746>
___
___
Python-bugs-list mailin
Paul McGuire added the comment:
Patch file attached.
--
keywords: +patch
Added file: http://bugs.python.org/file44182/ptm_27822.patch
___
Python tracker
<http://bugs.python.org/issue27
paul j3 added the comment:
This error is also produced by
help = ' '
that is, a help line with all blanks. As long as there is a nonblank character
in the help line it format fine.
This issue doesn't need to be resolved by itself, but should be considered if
and when th
paul j3 added the comment:
Another failure case:
parser.add_argument('--int', type=int, choices=[10,15,25])
'--int 15` puts 'int=15' in the Namespace.
'--int 2' puts 'int=2' in the Namespace, because it matches the 'str(25)'.
'--i
New submission from paul j3:
The production argparse applies the type conversion to a string default whether
it is needed or not. With the 12776 and 15906 patch, that conversion is
postponed, so that it is applied only once. However, for a positional argument
with nargs='*', that
New submission from Paul Koning:
The __bytes__ special method has no effect in a subclass of "int" because the
bytes() builtin checks for int or int subclass before it gets around to looking
for that special method. The attached example shows it.
--
components: Interpreter
New submission from Paul Price:
The docs for resource.setrlimit
(http://docs.python.org/2.7/library/resource.html#resource.setrlimit) state:
"The limits argument must be a tuple (soft, hard) of two integers describing
the new limits. A value of -1 can be used to specify the maximum pos
paul j3 added the comment:
If nargs=2, type=float, an argv like '1e4 -.002' works, but '1e4 -2e-3'
produces the same error as discussed here. The problem is that
_negative_number_matcher does not handle scientific notation. The proposed
generalize matcher, r'^-.+
paul j3 added the comment:
We need to be careful about when or where _negative_number_match is changed.
"
We basically do:
parser = argparse.ArgumentParser(...)
parser._negative_number_matcher = re.compile(r'^-.+$')
"
This changes the value for the parser itself, bu
paul j3 added the comment:
While
parser._negative_number_matcher
is used during parser.parse_args() to check whether an argument string is a
'negative number' (and hence whether to classify it as A or O).
parser._optionals._negative_number_matcher
is used during parser.add_arg
paul j3 added the comment:
I think the `re.compile(r'^-.+$')` behavior could be better achieved by
inserting a simple test in `_parse_optional` before the
`_negative_number_matcher` test.
# behave more like optparse even if the argument looks like a opt
Paul Price added the comment:
The OSX manpage for setrlimit includes:
COMPATIBILITY
setrlimit() now returns with errno set to EINVAL in places that histori-
cally succeeded. It no longer accepts "rlim_cur = RLIM_INFINITY" for
RLIM_NOFILE. Use "rlim_cur = min(OPE
Paul Price added the comment:
Not sure how you want patches formatted, so I went for 'git format-patch'.
Also, this is my first attempt at writing ReST and my first attempt at writing
docs for Python, so you may want to double-check I didn't screw up the syntax
or style.
Paul Price added the comment:
P.S. This is relative to the 'default' branch in the public cpython.
--
___
Python tracker
<http://bugs.python.o
Paul Price added the comment:
That's good; it doesn't have what I added to the description of RLIMIT_NOFILE,
but perhaps you chose to leave that out on purpose.
Since both "unlimited" and "infinite" are both used in different contexts,
perhaps we should use b
Paul Price added the comment:
You missed out an "is":
Raises :exc:`ValueError` if an invalid resource is specified, if the new soft
limit exceeds the hard limit, or if a process tries to raise its hard limit
(unless the process has an effective UID of super-user). Spe
paul j3 added the comment:
This patch makes two changes to argparse.py ArgumentParser._parse_optional()
- accept negative scientific and complex numbers
- add the args_default_to_positional parser option
_negative_number_matcher only matches integers and simple floats. This
is fine for
Changes by Paul Moore :
--
nosy: +pmoore
___
Python tracker
<http://bugs.python.org/issue15867>
___
___
Python-bugs-list mailing list
Unsubscribe:
paul j3 added the comment:
Glenn
I looked at your t18a.py test case
parser = ArgumentParser()
parser.add_argument('--foo', dest='foo')
parser.add_argument('--bar', dest='bar')
parser.add_argument('foz')
parser.add_argument(&
paul j3 added the comment:
The 'args=' parameter is the same as the first positional parameter used in
most of the examples. That is normal Python behavior.
15.4.4.5. Beyond sys.argv
explains this alternative way of specifying argv.
Still 2 bullet points could be added to 15.4.4.
paul j3 added the comment:
This patch to argparse.rst adds the argument points to parse_args().
It also adds two points to the 'Upgrading optparse code' section, one about
using 'nargs=argparse.REMAINDER', and other about 'parse_known_args()'.
I'm not en
paul j3 added the comment:
I changed the reference to the optparse allow_interspersed_args attribute to
the disable_interspersed_args() method.
--
Added file: http://bugs.python.org/file29662/remainder.patch
___
Python tracker
<h
paul j3 added the comment:
The optparse page gives a reason for disable_interspersed_args():
"Use this if you have a command processor which runs another command which has
options of its own and you want to make sure these options don’t get confused.
For example, each command might h
paul j3 added the comment:
The test file, test_argparse.py, has a test case for this:
'class TestOptionalsActionAppendWithDefault'
argument_signatures = [Sig('--baz', action='append', default=['X'])]
successes = [
paul j3 added the comment:
Oops, I was wrong about this:
"Argparse doesn't prohibit all interspersed positionals. You could, for
example, have one or more positionals with other nargs that could be
interspersed. But the REMAINDER one has to be last."
parser.
paul j3 added the comment:
Looking further at test_argparse.py, I should say that the behavior of multiple
positionals when there is one cluster of positional argstrings is well
illustrated in the tests. It's the behavior when there are multiple clusters
(interspersed positionals) tha
paul j3 added the comment:
There are several problems with the patch provided in msg156315
This description:
"Added patch so that only the first '--' is removed by an argparse.PARSE or
argparse.REMAINDER argument."
should read
"Added patch so that only the first
paul j3 added the comment:
There's another 'feature' to the patch proposed here. It only deletes the
first '--' in the list of strings passed to '_get_values' for a particular
action.
parser = argparse.ArgumentParser()
parser.add_argument('fo
paul j3 added the comment:
I am working on an alternative solution that moves the '--' removal to the
consume_positionals() method, and only does it if there is a corresponding '-'
in the arg_strings_pattern.
--
___
P
New submission from Paul Wiseman:
I was using py2.7.3 and was getting None back for the errno attribute for an
ssl.SSLError('The read operation timed out').
I noticed in the 2.7.4 release notes that it sounds like there was a fix for
this:
Issue #12065: connect_ex() on an SSL
Paul Wiseman added the comment:
Ah ok, thanks for clearing that up. I thought there'd have been a socket.error
with ETIMEDOUT raised as the underlying exception, similar to if it times out
during the non-ssl part of the request
--
___
P
paul j3 added the comment:
I think this problem arises from a change made in
http://bugs.python.org/issue10424
Changeset to default (i.e. development) is
http://hg.python.org/cpython/rev/cab204a79e09
Near the end of _parse_known_args it removes a:
if positionals:
self.error(_(
paul j3 added the comment:
Further observations:
parser.add_subparsers() accepts a 'dest' keyword arg, but not a 'required' one.
Default of 'dest' is SUPPRESS, so the name does not appear in the Namespace.
Changing it to something like 'command' will p
Paul Munday added the comment:
This wasn't fixed by the patch for #1283289.
(Still true of at least 2.7.3 and 3.2.3)
--
nosy: +tallpaul
versions: +Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.org/issu
Changes by Paul Munday :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue1496278>
___
___
Python-bugs-list mailing list
Unsubscri
paul j3 added the comment:
This patch addresses both issues raised here:
- throw an error when the subparser argument is missing
- allow the subparser argument to be optional
argparse.py:
_SubParsersAction -
add 'required=True' keyword.
name(self) method - creates a name o
2201 - 2300 of 3212 matches
Mail list logo