Robert added the comment:
You see the usecase from the stack trace: PythonWin (the IDE from pywin32
package) uses pyclbr - to inspect arbitrary user code.
(Neither code is from me)
I'm not inspecting __main__ explicitely. The problem seems to arise in newer
Python versions
New submission from Robert :
https://docs.python.org/3/tutorial/controlflow.html
4.7.8. Function Annotations
[...] "The following example has a positional argument, a keyword argument, and
the return value annotated:"
It is not a "positional argument" but a
New submission from Robert :
Hi all.
Is it an issue or on purpose that enabling and disabling the frame in plt.pie()
results in different sized pie charts? In my opinion the code below should
provide identical sized charts. If it is on purpose, can you give me a
reference? I am using the
New submission from Robert :
When pyclbr.readmodule_ex() is traversing "import __main__" or another
module without __spec__, it dies completely
with "ValueError: __main__.__spec__ is None / is not set".
=> It should at least continue with the (big)
Robert added the comment:
# `__main__` of the source code directory: `/tmp/rebound/rebound`.
# differentiate `__main__` of my target source code to read from the built-in
`__main__`? In other words, how do I read the module `__main__` of the
codebase: rebound?
=> when __main__.py
Change by Robert :
--
keywords: +patch
pull_requests: +23407
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24623
___
Python tracker
<https://bugs.python.org/issu
New submission from Robert :
When PY_SSIZE_T_CLEAN is not #defined in Py3.10, PyArg_ParseTuple() etc. sets
a SystemError but the return value says 1 (=SUCCESS)!
=> Causes terrific crashes with unfilled variables - instead of a clean Python
exception.
Background: pywin32 suffers in mas
Robert added the comment:
Would this patch already solve? :
https://github.com/python/cpython/pull/19130
There seems to be another bug: The strange 'latin-1' default encoding of
cgi.parse(), which only has effect in non-mulitpart:
if hasattr(fp,'encoding'
New submission from Robert :
I implemented a data-structure as an object in a script, let's call it
objectScript.py. I'm using this data-structure in other scripts like so:
from objectScript import data-structure
Populating this data-structure requires quite a bit of time, so whe
Robert added the comment:
Can anyone do a review?
--
___
Python tracker
<https://bugs.python.org/issue33591>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Robert:
When running the command
re.sub(r'X.', '+', '-X\n-', re.DOTALL)
you get '-X\n-' instead of '-+-'.
Curiously findall works correctly:
re.findall(r'X.', '-X\n-', re.DOTALL) =>
New submission from Robert:
email.utils.parseaddr() does not successfully parse a
field value into a (comment, address) pair if the
FROM header has 2 lines (or more) containing odd number of double quotes in
each of them.
The address in such tuple is not e-mail address but a part of comment
Changes by Robert :
--
components: +email
nosy: +barry, r.david.murray
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue31089>
___
___
Python-
Robert added the comment:
RFC regarding this topic looks quite complicated to me, but I know that \r\n is
used for line breaking in e-mail headers and \n is not. So in my opinion it
shouldn't be treated the same like \n. The \r\n should be removed in parsed
text, but \n should be pres
Robert added the comment:
regarding the proposal for mini format languages for bytes (msg292663):
Wouldn't it be more consistent if the format specifiers are identical to the
one of int's (see
https://docs.python.org/3/library/string.html#format-specification-mini-language).
I.e
New submission from Robert :
According to the documentation .return_value should be identical to the object
returned when calling the mock ("assert m() is m.return_value")
This is the case except on objects returned by __iter__ on MagicMocks. The
following script demonstrates t
New submission from Robert :
In the "py.ini" file it is possible to specifiy customized commands (see
https://www.python.org/dev/peps/pep-0397/#customized-commands).
Unfortunately it is not possible to specify custom commands beginning with one
of the buildin names (i.e. "p
Robert added the comment:
I am still waiting for a OK (or denial) of my proposed Modification.
I want to avoid that I start coding and when I am finished the PSF denies my
PullRequest.
Is anybody out there who can decide this or at least lead a discussion
Robert added the comment:
Of course I do not know the initial ideas/philosophy of the launcher.
But the current implementation supports these custom commands (for whatever
reason). Thus I'd say they should work "properly". My view of "properly" is
that the i
New submission from Robert :
Passing a non-str path which fulfills the new fspath-protcol (like a Path()
object) to CDLL (or WinDLL, PyDLL, ...) a exception is returned.
--
components: ctypes
messages: 317230
nosy: mrh1997
priority: normal
severity: normal
status: open
title: ctypes
Change by Robert :
--
keywords: +patch
pull_requests: +6678
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33591>
___
___
Python-
Change by Robert :
--
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue33591>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Robert :
When using the Python Launcher "py.exe", it uses 64bit by default and I can
enforce using 32bit.
But there is no way to enforce 64bit. If I run "py -3.6" the actual called
interpreter depends on the interpreter versions installed on my system
New submission from Robert :
Currently py.ini allows to set default interpreters for python 3 and 2. i.e.:
python3=3.6-32
python2=2.7-32
But it is not possible to set a default interpreter on a specific version.
I.e. when running "py -3.6" it would be nice to set the default to
Robert added the comment:
A thanks!
In the meantime I found the corresponding changelog entry:
https://bugs.python.org/issue30291
I checked the corresponding commit:
there is no documentation update. It would be nice if the new feature can be
found in the documentation (including the fact
Change by Robert :
--
pull_requests: +7460
___
Python tracker
<https://bugs.python.org/issue30291>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Robert :
--
pull_requests: +7459
___
Python tracker
<https://bugs.python.org/issue33922>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert added the comment:
I extended the documentation and created a pullrequest:
https://github.com/python/cpython/pull/7849
--
___
Python tracker
<https://bugs.python.org/issue33
Robert added the comment:
According to this chapter (
https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock )
the specialmethods in MagicMock are different:
.return_value is preinitialized with defaultvalues, which depends on the
operator. In the case of .__iter__
New submission from Robert :
macOS uses TCP_KEEPALIVE in place of TCP_KEEPIDLE. It would be good to have
this available in the socket library to use directly.
Pull request coming up.
--
components: Library (Lib)
messages: 327351
nosy: llawall
priority: normal
severity: normal
status
Robert added the comment:
Acknowledging the test failure and message pointing to #32394:
==
FAIL: test_new_tcp_flags (test.test_socket.TestMSWindowsTCPFlags
Robert added the comment:
I'm not sure if this is related or not, but on 3.4.1 I get the following:
>>> print(round(float(3/2)))
2 (as expected)
>>> print(round(float(5/2)))
2 (expected 3, as float should round .5 up)
--
nosy: +fenofonts
___
New submission from Robert Einhorn :
https://docs.python.org/3.10/reference/grammar.html
# original grammar rule:
file: [statements] ENDMARKER
# suggested grammar rule:
file: NEWLINE* [statements] ENDMARKER
--
components: Parser
messages: 409524
nosy: RobEin, lys.nikolaou
New submission from Robert Einhorn :
Definition of invalid_double_starred_kvpairs PEG grammar rule is not found:
https://docs.python.org/3.10/reference/grammar.html
# PEG grammar rule:
dict:
| '{' [double_starred_kvpairs] '}'
| '{'
New submission from Robert Einhorn :
This is probably not an error and I may misinterpret the PEP 617, but I don't
know what the ~ PEG operator means in the next rule if there is no alternative:
assignment_expression:
| NAME ':=' ~ expression
And similarly with this rule
Robert Einhorn added the comment:
Thanks
--
resolution: not a bug ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue46485>
___
__
New submission from Robert Xiao :
I am building unofficial macOS packages for personal use. My main build machine
is running macOS Monterey 12.1 and Xcode 13.2.1. I recently attempted to build
Python 3.8.12 as a package using build-installer.py. This worked fine after a
bit of dependency
Change by Robert Xiao :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46548>
___
___
Python-bugs-list mailing list
Unsubscrib
Robert Xiao added the comment:
I noticed that the official installer seems to be built using an entirely
different process, as it produces a single-file .pkg in xar format with an
embedded Distribution file, rather than an .mpkg directory.
Is there documentation on how these packages are
New submission from Robert Spralja :
`
>>> def foo(num=1):
... return num
...
>>> foo(*(bool,) is bool else *())
File "", line 1
foo(*(bool,) is bool else *())
^
SyntaxError: invalid syntax
>>> foo(*(bool,) if bool else
Robert Spralja added the comment:
I understand that it's invalid synatax, but not why.
On Sat, 26 Feb 2022 at 10:07, Serhiy Storchaka
wrote:
>
> Serhiy Storchaka added the comment:
>
> It is an invalid syntax. Write foo(*((stri,) if stri else ())).
>
> --
&g
New submission from Robert Ancell:
The Python os.getenv() function accesses an Python dictionary which is
mirroring the process environment. This dictionary is populated when the
interpreter starts and updated when os.environ.__setitem__() or
os.putenv() are called. However if the python program
Robert Ancell added the comment:
draghuram, unfortunately while os.putenv() can be fixed to be
symmetrical any putenv call from a C module cannot, for example:
If you make an extension:
#include
PyObject *putenvC(PyObject *module, PyObject *args)
{
int result;
if (!PyArg_ParseTuple
Robert Ancell added the comment:
I've attached proof-of-concept showing how os.environ would ideally
work. It'll only work in Posix, etc etc.
Reading into it more there are a lot of general issues with environments
and memory allocation which is why I suspect Python doesn't us
New submission from
Robert Brewer
:
While debugging/fixing the logging module's atexit behavior (see
http://www.cherrypy.org/ticket/646 -- it chokes atexit if stdout is
closed), it became difficult to write an auto
New submission from
Robert Collins
:
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license"
Robert Collins added the comment:
> The error message is wrong: it's a TypeError, but the message should say
> something like...
>
> TypeError: slice indices must be integers or have an __index__ method
This would be a false message, as, as my report demonstrated, slice
indi
New submission from Robert Xiao :
Line 4511 of Modules/posixsubprocess.c is missing a semicolon, so it would not
compile successfully if the relevant build flags were enabled (PYOS_OS2).
Trivial patch:
@@ -4508,7 +4508,7 @@
static PyObject *
posix_spawnvpe(PyObject *self, PyObject *args
New submission from Robert Xiao :
Lib/random.py in Python 3.2 contains the line
from __future__ import division
even though it is no longer necessary, as true float division is the default in
Python 3.
Trivial patch:
--- lib/python3.2/random.py 2011-09-03 20:32:05.0 -0400
New submission from Robert Lehmann :
The recently added copybutton.js (r18bbfed9aafa) does not work with the 2.7
docs since they are deployed with JQuery 1.2 (which is shipped with Sphinx 0.6).
Copybutton is an unobtrusive Javascript feature which adds a little button to
all doctests that
New submission from Robert Xiao :
_ssl.c has a memory leak in _get_peer_alt_names.
The `names' object is initialized here:
Modules/_ssl.c:601:
if (method->it)
names = (GENERAL_NAMES*)
(ASN1_item_d2i(NULL,
Robert Xiao added the comment:
Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file23760/ssl.patch
___
Python tracker
<http://bugs.python.org/issue13
Robert Xiao added the comment:
Also applies to Python 2.7.
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue13458>
___
___
Python-bug
New submission from Robert Collins :
This affects the python implementation of RLock only.
If a signal occurs during RLock.acquire() or release() and then operates on the
same lock to acquire() or release() it, process hangs or assertions can be
triggered.
The attached test script
Robert Collins added the comment:
I'm not sure it is sensibly implementable in pure python: the semantics of
signal handling (AIUI) are that the vm is interrupted, sets a flag to say 'when
the GIL is released or the next bytecode interpretation happens, please process
signal X
Robert Collins added the comment:
Normally I advocate very strongly for Python implementation of C accelerated
modules, but when the two implementations are not equivalent, having a simpler
Python one around does not help anyone (not users, other language implementors
etc). True reentrancy
Robert Lehmann added the comment:
I can not reproduce either of your findings. Could you provide us with your
version information? re version 2.2.1, _sre 2.2.2, Python 2.6.6, Debian sid
here. Also tested with Python 2.7.2rc1 (same RE).
>>> import re
>>> re.compile(r&q
Robert Xiao added the comment:
Seconded. #12133 inadvertently closes the response object if the server fails
to indicate "Connection: close". In my case, Amazon S3 (s3.amazonaws.com)
causes this problem:
(Python 3.2)
>>> conn =
>>> urllib.request.urlo
New submission from Robert Xiao :
>From a fresh Python3.2.1 tarball:
nneonneo@nneonneo-mbp:~/devel/Python-3.2.1/Lib/test$ for i in tokenize_tests-*;
do echo $i; xxd $i | head -n 1; done
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
000: efbb bf23 202d 2a2d 2063 6f64 696e 6
Robert Xiao added the comment:
Yes, it seems that way. Then the question is: why does the comment claim that
it doesn't have a BOM?
Also, test_tokenize.py is wrong around line 651:
def test_utf8_coding_cookie_and_no_utf8_bom(self):
f = 'tokenize_tests-utf8-coding-cooki
Robert Xiao added the comment:
Attached is a patch which fixes this. Python 3.2.1 still passes the test after
applying the patch, as expected.
--
keywords: +patch
Added file: http://bugs.python.org/file22701/issue12587.patch
___
Python tracker
Robert Xiao added the comment:
S3 also doesn't send any kind of connection header at all.
x-amz-id-2: WWuo30Fk2inKVcC5dH4GOjvHxnqMa5Q2+AduPm2bMhL1h3GqzOR0EPwUv0biqv2V
x-amz-request-id: 3CCF6B6A000E6446
Date: Sat, 23 Jul 2011 06:42:45 GMT
x-amz-meta-s3fox-filesize: 27692
x-amz-meta-
New submission from Robert Mohr :
The last line of
http://docs.python.org/faq/programming.html#is-there-a-scanf-or-sscanf-equivalent
is not proper English:
For more complicated input parsing, regular expressions more powerful than C’s
sscanf() and better suited for the task.
This also shows
Robert Lehmann added the comment:
Wouldn't constructing the key as a tuple of (class_, mofile) be much cleaner
than making up an artificial key?
--
nosy: +lehmannro
___
Python tracker
<http://bugs.python.org/i
New submission from Robert Rohde :
I attempted to use GZipFile to process a 1.93 GB file that expands to 18.8 GB.
This consistently produces the same corrupted output file that has
approximately, but not exactly, the right output file size.
I bypassed GZipFile by calling the 7-Zip executable
Robert Rohde added the comment:
It's Windows 7 Ultimate (64-bit) on a very high end system.
I don't think it would be very practical to distribute a 2 GB test file.
Though I might be able to get it to a couple people if someone wanted to really
study the issue.
Though if it is
New submission from Robert Lerche :
I have run across several issues (one serious one, showing up only on Windows)
when implementing a scroll bar with a list of custom widgets.
I suspect these may really be Tk issues but I thought I'd try posting here
first. I sent this to the tk
Robert Lerche added the comment:
Hi and thanks for the quick response.
I'm happy to follow up with the Tk folks if it turns out that's where
the problem lies -- it has been a long time since I wrote a Tcl script
so before trying to reproduce the behavior that way I thought I'd t
Robert Lerche added the comment:
Terry, I tried posting to python-list and all I got was "why are you doing
that? Use Tix instead."
Maybe it's good advice but it doesn't address the issue. And Tix is yet one
more component I'd have to build (the Python di
Robert Lerche added the comment:
Thank you, Hirokazu! I see now -- deleting the rows first causes the scroll
bar to shrink. So I take it calling grid with a row/column that is already in
the grid replaces the prior mapped widget.
[or should I say, "domo arigato Yamamot
New submission from Robert Collins :
RUSAGE_THREAD (since Linux 2.6.26)
Return resource usage statistics for the calling thread.
This is very handy for multi threaded apps in determining runtime in a thread,
page faults from the thread etc.
--
messages: 121336
nosy
Changes by Robert Collins :
--
keywords: +patch
Added file: http://bugs.python.org/file19624/rusage-thread.patch
___
Python tracker
<http://bugs.python.org/issue10
Robert Withrow added the comment:
I have to disagree. It seems entirely reasonable to expect that unpack should
return the same value passed to pack. That it doesn't (as of 2.6.5 at least)
is completely unexpected and undocumented. And yes I understand the
limitations of floating
Robert Withrow added the comment:
Martin: in C I have the luxury of using 32 bit floats; not an option in Python.
Simple code doing the moral equivalent of NTOHL(HTONL()) works in this case
for C but wouldn't help for Python.
Mark: I understand about the precision truncation issue an
Robert Withrow added the comment:
> If you agree that Python actually behaves correct, I fail to
> understand what it is that you disagree with in msg131195
I don't agree that Python is behaving correctly as far as the documented
contract for struct is concerned.
I disagr
Robert Withrow added the comment:
> it needs to be worded in a way that doesn't
> imply that the struct implementation is broken or misdesigned.
Agree.
> A better note would focus on the basic (and obvious)
> fact that downgrading from double precision to single
> precisi
Robert Withrow added the comment:
For completeness: msg131234 states that the issue of 64 bit -> 32 bit precision
truncation is covered in the floating point tutorial. I believe that is
incorrect; at least I can't find it explicitly mentioned. Ref:
http://docs.python.org/
New submission from Robert Kern :
The constructor for multiprocessing.RawArray() takes an argument that is either
an integer size or a sequence to initialize the contents. To determine if the
argument is a size, it uses isinstance(x, int). This means that integers that
happen to be Python
Robert Kern added the comment:
The practical case I was thinking of was numpy integer scalar types, which can
crop up without explicitly requesting them, much like the long type.
Although, now that I check, I see that single-element numpy arrays also pass
index(). Ideally, there would be two
Robert Kern added the comment:
numpy.int is just an alias to the builtin int, left for historical reasons. The
integer scalar type that has the same width as Python's int (numpy.int32 or
numpy.int64, depending) will always pass the isinstance() check. Since it's the
default integ
New submission from Robert Burke :
If you create a subclass of set but do not override __or__, __and__, __xor__,
and __sub__, calling these functions will yield a new instance of your
subclass. The new instance will never have __init__ called on it. Depending
on what you expect __init__ to
Changes by Robert Burke :
--
title: __or__, __and__, __sub__, and __xor__ instantiate subclass of set
without calling __init__ -> __or__ et al instantiate subclass of set without
calling __init__
___
Python tracker
<http://bugs.pyth
Robert Burke added the comment:
I've only observed this in 2.6. Does 2.6 not belong in the bug's versions list
if 2.7 is also affected?
--
___
Python tracker
<http://bugs.python.o
New submission from Robert Meerman :
Regular expressions which are written match literal underscores ("_", ASCII
ordinal 95) and specify `re.IGNORECASE` during compilation do not consistently
match underscores: it seems some occurrences are matched, but others are not.
The followi
Robert Meerman added the comment:
Oh, that's embarrassing. :-)
Could a type-check be used to alert the user to their mistake? I suppose that
would require re.IGNORECASE (et al) to be of some new type (presumably
sub-classed from Integer).
(Thanks for the quick response, and sorry to
New submission from Robert Xiao :
On Python 3.2, calling abort() on an ftplib.FTP object will cause an exception:
>>> ftp = ftplib.FTP('localhost')
>>> ftp.abort()
Traceback (most recent call last):
File "", line 1, in
File "/usr/l
Robert Lehmann added the comment:
I have attached a fix and a regression test.
--
keywords: +patch
nosy: +lehmannro
Added file: http://bugs.python.org/file19903/issue10598.patch
___
Python tracker
<http://bugs.python.org/issue10
Robert Lehmann added the comment:
> I wonder whether there are many examples where scientific data is written in
> a form that Python's complex() constructor couldn't currently read, but would
> be able to read if it accepted 'i' in place of 'j'.
I co
Robert Lehmann added the comment:
A few issues I'd like to raise:
(1) Multiple callback chains. Is there any code in your existing use case of
GC callbacks where you don't check for the phase argument and follow different
code paths depending on it? If not, having two callb
Robert Xiao added the comment:
Do you have it in any kind of repository at all? Even a private SVN repo or
something like that?
--
___
Python tracker
<http://bugs.python.org/issue2
New submission from Robert Cheng :
When reporthook is None, size variable is not computed and defaulted to -1.
Thus, without reporthook, ContentTooShortError is not raised even when
Content-Length header is supplied and download size is less than expected
amount, contrary to the documentation
Changes by Robert Siemer :
--
nosy: +siemer
___
Python tracker
<http://bugs.python.org/issue10817>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Robert Schuppenies <[EMAIL PROTECTED]>:
I propose a patch which allows to query the memory footprint of an
object. Calling 'footprint(o)', a python developer can retrieve the
size of any python object. Only the size of the object itself will be
returned,
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
> Can't you write this as a simple Python function using
> type.__basicsize__ and type.__itemsize__?
Yes, it would be possible and has been done, e.g.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530. The
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
I tried to implement a magic method __sizeof__() for the type object
which should be callable for type objects and type itself.
But calling __sizeof__ results in an error message
>>> type.__sizeof__()
Traceback (most r
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
thanks, that did the trick.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2898>
___
_
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
The attached patch implements the sizeof functionality as a sys module
function. __sizeof__ is implemented by object as a instance method, by
type as a class method as well as by types which's size cannot be
computed fro
Changes by Robert Schuppenies <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10463/sizeof.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
Nick Coghlan helped me to clear my 'metaclass confusion' so here is a
patch without an additional __sizeof__ for type objects.
Added file: http://bugs.python.org/file10465/sizeof.patch
__
Robert Schuppenies <[EMAIL PROTECTED]> added the comment:
Applied in r63856.
--
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
1 - 100 of 1080 matches
Mail list logo