Pedro added the comment:
I guess I'm a little allergic to magic strings. I think there is value in
greater consistency across modules, but agree it's not a big deal because the
Action classes are already accessible that way.
I was unaware of the details behind `action` and actually
Changes by Pedro :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29632>
___
___
P
New submission from Pedro:
ArgumentParser._get_value() has two exception handlers: one for
ArgumentTypeError, and one for (TypeError, ValueError). But in the latter case,
any custom message I include the TypeError or ValueError is ignored and
replaced with a generic "invalid value&quo
Pedro added the comment:
You can get around the message suppression by raising anything that isn't a
ValueError, TypeError, or subclass thereof. It will propagate up past
_get_value(). I still don't see the reason for giving special treatment to
ValueError and
Pedro added the comment:
Paul,
There are a number of scenarios in which you need to check a value and not just
a type. For instance, I have a tool with several command-line arguments that
need to be *nonnegative* integers, and a call to int() would not catch that.
Many other utilities that
Pedro added the comment:
Just voicing my support for this. I was also looking for a solution on
StackOverflow and ended up here.
--
nosy: +pgacv2
___
Python tracker
<http://bugs.python.org/issue11
New submission from Pedro :
Embedded Python interpreters, such as Boost.Python, do not have sys.argv
available. (sys itself works fine.) This causes the interpreter to crash with
the following exception when you try to access argv:
AttributeError: 'module' object has no attri
Pedro added the comment:
My first inclination would be no. An argv value of [''] means "zero
command-line arguments" (not even a filename), which implies the following as
far as I know:
1. Python was called as an executable rather than a library, because you can't
pa
Pedro added the comment:
My comment above uses "code that we provide for supporting embedding," not
"third party code," as the definition of embedded.
--
___
Python tracker
<https://bug
Pedro added the comment:
I agree that an empty list, instead of a list with an empty string, makes more
sense. Leaving _xoptions as {} would be the same as when it runs non-embedded
without any -X arguments, but I guess there's no way of making {} any more
New submission from Pedro :
The docs for Logger.debug()
(https://docs.python.org/3/library/logging.html#logging.Logger.debug) specify
that exc_info can take an exception instance as of version 3.5.
However, the docs for logging.debug()
(https://docs.python.org/3/library/logging.html
Pedro added the comment:
Might be cleaner to just say, "The arguments are interpreted as for
debug/info/warning/error/critical/exception/log," but with the bookmark URL
pointing to the Logger methods.
--
___
Python track
New submission from Pedro :
I am trying to create an RPM on SLES12 SP2. (I think that corresponds to
OpenSUSE 42.2.) This is my setup.py file, nothing special:
import setuptools
setuptools.setup(name='MyApp',
version='1.2.3',
New submission from Pedro :
https://pip.pypa.io/en/stable/user_guide/#installing-from-local-packages states
that you can use a --directory option with the install subcommand. This fails
with pip 18.1 on both Python 2.7 on SLES12 and Python 3.6 on Windows 10:
==
pip install
New submission from Pedro:
The docs for the copy module contain a bullet that says the following:
"Because deep copy copies everything it may copy too much, e.g., even
administrative data structures that should be shared even between copies."
There should be a "not" betw
Pedro added the comment:
"Because deepcopy copies everything it may copy too much, such as data which is
intended to be shared (instead of duplicated) between copies."
A bit more explicit?
--
___
Python tracker
<http://bugs.python.o
New submission from Pedro:
The possible values for action are currently:
'store'
'store_true'
'store_false'
'store_const'
'append'
'append_const'
'count'
'help'
'version'
a subclass of argparse.Action
The
New submission from Pedro Torres :
Currently, the addition of Annotated in PEP 593 on Python 3.9 allows adding
arbitrary metadata for type hints.
Let's consider the following
time_available_online: list[str] =
[
'1m',
'5m',
'1d'
]
```
Hour = An
Change by Pedro Torres :
--
title: Add typeof or eum behavior for in the Typing module -> Add typeof or
enum behavior for in the Typing module
___
Python tracker
<https://bugs.python.org/issu
Change by Pedro Torres :
--
title: Add typeof or enum behavior for in the Typing module -> Add typeof or
enum behavior in the typing module
___
Python tracker
<https://bugs.python.org/issu
New submission from Pedro Larroy :
When I build it compiles with both -O2 and -O3...
this is debian testing on amd64.
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o
Python/getcompiler.o Python
New submission from Pedro Mendes :
The documentation existent (
http://docs.python.org/library/threading.html#threading.Timer ) is not very
helpful. The user is left wondering about the exact syntax of this function,
what types of parameter it accepts etc. Could this possibly be fixed
Pedro Werneck added the comment:
It seems the right thing to do would be to have it raise a base
exception, but SMTPConnectError docstring states "Error during
connection establishment.", so I chosen to use it with the errno and
message from socket.error, even if it's supposed
Pedro Werneck added the comment:
Previous patch didn't passed the tests right. This patch fixes both the
code, unindenting port number conversion to integer and the test.
Added file: http://bugs.python.org/file9509/issue_2118_fixed.patch
__
Tracker &l
Pedro Werneck added the comment:
Fixed by raising StopIteration when the stack is empty.
--
nosy: +werneck
Added file: http://bugs.python.org/file9510/issue_1375_hotshot.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Pedro Werneck added the comment:
I had some code here to do the exact same thing with XML-RPC server. The
patch adds the feature to SocketServer, with a server.shutdown() method
to stop serve_forever(), and change the unittest to use and test the
feature.
I disagree on adding the daemon_threads
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
In 3.0 it happens with any class. Just the cls argument missing on the
call to instancecheck.
--
keywords: +patch
nosy: +werneck
Added file: http://bugs.python.org/file10174/issue2325.patch
__
T
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10174/issue2325.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
Seems like that's the wrong usage and the PEP 3119 notices that it's
hard to get the right semantics. To use it that way you need to define
the methods as a classmethod().
http://www.python.org/dev/peps/pep-3119/#
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
That's expected as mktime is just a thin wrapper over libc mktime() and
it does not expect microseconds. Changing time.mktime doesn't seems an
option, so the best alternative is to implement a method in datetime
type. Is the
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9499/issue_2118_smtplib.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
I tried reproducing the bug with the info provided but neither case
worked. Since it doesn't mention platform, I'm including the file in
case anyone wants to try it on anything other than Linux/Python2.5.
--
nosy: +we
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
Just a bare self._getints will raise an exception with no item selected
and an empty string returned, so I'm adding a patch to check for it and
return an empty tuple in that case, or the tuple with ints.
It's open for discuss
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Added file: http://bugs.python.org/file10248/issue869780_3.patch
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10246/issue869780_2.6.patch
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10248/issue869780_3.patch
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
I used the tuple from splitlist() in both cases. I'm not sure if it
should return None on an empty selection since that is not documented
anywhere.
Added file: http://bugs.python.org/file10252/iss
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
Neither I do, but the current version already returns an empty tuple.
Since the map(int, curselection) idiom is widely used, changing to int
is not likely to break any code, but returning None on empty select
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
I agree it's not a good idea to be too much specific about this. The
patch attached adds the following footnote to the 'is' operator:
Due to automatic garbage-collection, free lists, and the dynamic nature
of descri
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
Just note the error happens even without the try/except block inside the
'if' statement.
--
nosy: +werneck
__
Tracker <[EMAIL PROTECTED]>
<http://
Changes by Pedro Werneck <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10252/issue869780.py
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.
Pedro Werneck <[EMAIL PROTECTED]> added the comment:
I get it with r63075, r63085, on Linux.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2378>
__
__
Pedro Lacerda added the comment:
Hi, there is a working PR at https://github.com/python/cpython/pull/2735.
I was in doubt about get the default section with `__init__(...,
allow_unnamed_section=True)` and `config.get('', 'option')` or with
`config.get(DEFAULT_SECT
New submission from Pedro Gimeno :
>>> float.fromhex('0x0.8p-1074')
0.0
>>> float.fromhex('0x.8p-1074')
5e-324
One of them is obviously wrong. It's the second one, because:
- The smallest denormal is 0x1p-1074
- Therefore, 0x0.8p-1074 is a tie for
Pedro Gimeno added the comment:
> @Pedro Thanks again for the report! Just out of curiosity, how did you manage
> to find this?
I'm writing a C strtod implementation and I was adding corner cases to the unit
testing (now published here:
https://codeberg.org/pgimeno/ACSL/src/br
New submission from Pedro Gimeno :
When implementing an error handler, it must return a tuple consisting of a
substitution string and a position where to resume decoding. In the case of the
UTF-8 codec, the resume position is ignored, and it always resumes immediately
after the character
Pedro Gimeno added the comment:
I forgot the quotes in the assertion, it should have been "b'xz'".
--
___
Python tracker
<https://bug
Pedro Gimeno added the comment:
Python 3.5 from Debian stretch (oldstable). You're right, I can't reproduce it
in 3.7 from Buster. Sorry for the bogus report.
--
___
Python tracker
<https://bugs.python.o
Pedro Algarvio added the comment:
Any possible workaround for this issue?
I seem to be consistingly hitting this issue.
--
nosy: +s0undt3ch
___
Python tracker
<https://bugs.python.org/issue38
Pedro Algarvio added the comment:
What I'm able to copy from the console(though I doubt I'm getting all of
the traceback):
Traceback (most recent call last):
File "", line 1, in
File
"c:\hostedtoolcache\windows\python\3.5.4\x64\lib\multiprocessing\spawn.py&
Pedro Algarvio added the comment:
Our software uses a plug-in based approach.
Plugins are able to add/modify internal behavior, and, as part of bug
submission process we have a CLI flag which provides information about the core
app as well as any intervening plugins.
This is where we need
New submission from Pedro Algarvio :
With `pkg_resources` an `EntryPoint` has a dist attribute which allows you to
get the distribution that provided that specific entry-point, however, with
`importlib.metafata` and `importlib_metadata` that's not an east task.
```p
Change by Pedro Algarvio :
--
keywords: +patch
pull_requests: +2
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23334
___
Python tracker
<https://bugs.python.org/issu
Pedro Algarvio added the comment:
Guess I jumped too fast :)
Will the changes in CPythom be included in `importlib_metadata`?
--
___
Python tracker
<https://bugs.python.org/issue42
Pedro Kroger added the comment:
Attached patch to fix this issue.
--
keywords: +patch
nosy: +kroger
Added file: http://bugs.python.org/file24791/issue14256.diff
___
Python tracker
<http://bugs.python.org/issue14
Pedro Lacerda added the comment:
Thank you 林自均! I just made a pull-request with the relevant bits.
--
___
Python tracker
<http://bugs.python.org/issue22
Changes by Pedro Lacerda :
--
pull_requests: +2805
___
Python tracker
<http://bugs.python.org/issue27268>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Pedro Larroy :
When running a command with pipe character as argument the result is not the
same as in commandline
For example:
>>> subprocess.call([r"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Commo
n7\IDE\devenv","/build",r"De
Pedro Meirelles added the comment:
Hello,
I am biologist I am just starting to learn Python.
I have a mac and I am using OS X 10.8.2. I have installed Python 2.7.3 and when
I try to copy and paste (use command) or go to preferences IDLE crashes. I did
what Ned Deily said in msg169739:
sudo
Pedro Meirelles added the comment:
Thank you very much, Ned!
It worked, awesome!
All the best
2012/10/20 Ned Deily
>
> Ned Deily added the comment:
>
> Pedro, try installing the older ActiveTcl 8.5.11.1 from here:
>
> http://downloads.activestate.com/ActiveTcl/releases/8
Pedro Algarvio added the comment:
This is not a 2.7 issue only:
>>> import sys
>>> sys.version_info
(2, 6, 5, 'final', 0
>>> 'Foo {0}'.format(u'bár')
Traceback (most recent call last):
File "", line 1, in
UnicodeEnco
Pedro Gimeno added the comment:
I consider peephole optimization when no optimization was requested a bug.
Documentation for -O says it "Turns on basic optimizations". Peephole
optimization is a basic optimization, yet it is performed even when no basic
optimizations were requested
New submission from pedro flores :
this simple comparison (1.6-1.0)>0.6 , python answer TRUE, and that isnt true.
--
components: Windows
files: bug.py
messages: 97785
nosy: DhaReaL
severity: normal
status: open
title: Math calculation problem (1.6-1.0)>0.6, python said TRU
pedro flores added the comment:
kk, then i cannot use this comparison?, and this not happen
with8.6-8>0.6 this is false, according to python.
2010/1/14 Mark Dickinson
>
> Mark Dickinson added the comment:
>
> This is not a bug: Python, like many other computer la
Pedro Lacerda added the comment:
I also never found a mixture of sectionless options followed by sectioned
options. So an unnamed section that is also the DEFAULTSECTION will probably
work.
In this patch when `default_section=None` is passed to `RawConfigParser` it
will parse top level
Changes by Pedro Lacerda :
Added file: http://bugs.python.org/file43403/sortcommands.patch
___
Python tracker
<http://bugs.python.org/issue27320>
___
___
Python-bug
Pedro Lacerda added the comment:
Please look if these simple patches are acceptable. I don't know if standard
commands are already in a sane order or if it also need to be sorted.
--
keywords: +patch
nosy: +Pedro Lacerda
Added file: http://bugs.python.org/file43402/sortextra.
Pedro Lacerda added the comment:
Maybe useful at mmapmodule.c replacing
/* SVR4 method to map anonymous memory is to open /dev/zero */
fd = devzero = _Py_open("/dev/zero", O_RDWR);
tagname is unused at UNIX version of new_mmap_object() so if provided something
lik
Pedro Lacerda added the comment:
Following the bug pointed by Adam and Eryk.
--
keywords: +patch
nosy: +Pedro Lacerda
Added file: http://bugs.python.org/file43405/float.patch
___
Python tracker
<http://bugs.python.org/issue27
Pedro Lacerda added the comment:
I was unable to reproduce this bug using the following snippet
import email, sys
from email.generator import BytesGenerator
from email.mime.text import MIMEText
fp = open('flatten-exception.mail', 'rb')
email.message
Pedro Lacerda added the comment:
Seems that ``token.has_fws`` evaluates to True in the following condition
if token.has_fws:
causing ``token._fold(self)`` where isn't needed and raising the exception.
Hope it helps!
By the way, why the _header_value_parser.py was removed fro
Pedro Lacerda added the comment:
Now the file is back! If any previous header has a newline before the value the
error will not happen. But even with the output correct it isn't as expected.
--
Added file: http://bugs.python.org/file43456/flatten-no-exception
Pedro Lacerda added the comment:
Now the file is back! If any previous header has a newline before the value the
error will not happen. But even with the output correct it isn't as expected.
--
Added file: http://bugs.python.org/file43457/flatten-no-exception
Changes by Pedro Algarvio :
--
nosy: +Pedro.Algarvio
___
Python tracker
<http://bugs.python.org/issue21423>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pedro Algarvio added the comment:
Would also love to see this in the stdlib soon. My use case is logging
setup(forward logs to the main process).
--
___
Python tracker
<http://bugs.python.org/issue21
New submission from Luís Pedro Coelho:
from os import *
def Fork():
b = fork()
if b < 0:
raise Exception('fork() failed')
return b
r,w=pipe()
b = Fork()
if b == 0:
dup2(w,1)
close(w)
execlp('echo',\
'echo',\
Luís Pedro Coelho added the comment:
Original poster here.
The benchmark is artificial, but the problem setting is not. I did have a
problem that is roughly:
interesting = set(line.strip() for line in open(...))
for line in open(...):
key,rest = line.split('\t', 1)
Luis Pedro Coelho added the comment:
I think some of this conversation is going off-topic, but there is no
disk-swapping in my case.
I realize ours is not a typical setup, but our normal machines have 256GB of
RAM and the "big memory" compute nodes are >=1TB. Normally, swa
New submission from Pedro Clemente Pereira Neto:
Problems with float and "6" type
Hi, I am having problems both in the Windows version on the Linux
version of Python as put some number with some 6 type that it always
returns a value me, following examples:
>>> 2.0
2.0
>
New submission from Pedro Andres Aranda Gutierrez :
When creating ElementTree objects that hold SVG drawings, I need a CDATA object
similar to the ProcessingInstruction object. There was a circumvention of the
problem for Python 2.6:
http://stackoverflow.com/questions/174890/how-to-output
New submission from Pedro Andres Aranda Gutierrez :
I have extended the xml.etree.ElementTree.Element class and pass the text
attribute in the arguments. This creates much more compact code:
import xml.etree.ElementTree as xml
class Element(xml.Element):
def __init__(self
Pedro Andres Aranda Gutierrez added the comment:
Touché :-)
I was just frustrated because my XMLs never have tail or text as
attributes and I wanted to have more compact code...
On Mon, Jan 16, 2012 at 12:14 PM, patrick vrijlandt
wrote:
>
> patrick vrijlandt added the comment:
>
Pedro Andres Aranda Gutierrez added the comment:
Thanks a lot again :-)
We have a saying here: you'll never go to sleep without having learnt
something new :-)
On Tue, Jan 17, 2012 at 4:11 PM, patrick vrijlandt
wrote:
>
> patrick vrijlandt added the comment:
>
> Hi,
>
&g
83 matches
Mail list logo