[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-07-10 Thread Robert
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

[issue39231] Mistaken notion in tutorial

2020-01-06 Thread Robert
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

[issue43032] Size of pie chart in matplotlib (frame affects it)

2021-01-26 Thread Robert
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

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-02-22 Thread Robert
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)

[issue43247] How to search for a __main__ module using pyclbr in Python3?

2021-02-22 Thread Robert
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

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-02-22 Thread Robert
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

[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-25 Thread Robert
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

[issue39727] cgi.parse() fatally attempts str.decode when handling multipart/form-data

2020-09-03 Thread Robert
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'

[issue14290] Importing script as module causes ImportError with pickle.load

2012-03-13 Thread Robert
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

[issue33591] ctypes does not support fspath protocol

2019-06-10 Thread Robert
Robert added the comment: Can anyone do a review? -- ___ Python tracker <https://bugs.python.org/issue33591> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30927] re.sub() does not work correctly on '.' pattern and \n

2017-07-13 Thread Robert
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) =>

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-07-31 Thread Robert
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

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-07-31 Thread Robert
Changes by Robert : -- components: +email nosy: +barry, r.david.murray type: -> behavior ___ Python tracker <http://bugs.python.org/issue31089> ___ ___ Python-

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-08-01 Thread Robert
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

[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-03 Thread Robert
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

[issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__()

2018-04-06 Thread Robert
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

[issue31879] Launcher fails on custom command starting with "python"

2017-10-26 Thread Robert
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

[issue31879] Launcher fails on custom command starting with "python"

2017-11-08 Thread Robert
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

[issue31879] Launcher fails on custom command starting with "python"

2017-11-08 Thread Robert
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

[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert
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

[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert
Change by Robert : -- keywords: +patch pull_requests: +6678 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33591> ___ ___ Python-

[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert
Change by Robert : -- versions: +Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue33591> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33922] Enforce 64bit Python by Launcher

2018-06-20 Thread Robert
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

[issue33923] py.ini cannot set 32/64bits for specific version

2018-06-20 Thread Robert
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

[issue33922] Enforce 64bit Python by Launcher

2018-06-21 Thread Robert
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

[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2018-06-21 Thread Robert
Change by Robert : -- pull_requests: +7460 ___ Python tracker <https://bugs.python.org/issue30291> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33922] Enforce 64bit Python by Launcher

2018-06-21 Thread Robert
Change by Robert : -- pull_requests: +7459 ___ Python tracker <https://bugs.python.org/issue33922> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33922] Enforce 64bit Python by Launcher

2018-06-21 Thread Robert
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

[issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__()

2018-09-20 Thread Robert
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__

[issue34932] Add macOS TCP_KEEPALIVE to available socket options

2018-10-08 Thread Robert
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

[issue34932] Add macOS TCP_KEEPALIVE to available socket options

2018-10-09 Thread Robert
Robert added the comment: Acknowledging the test failure and message pointing to #32394: == FAIL: test_new_tcp_flags (test.test_socket.TestMSWindowsTCPFlags

[issue21929] Rounding properly

2014-09-08 Thread Robert
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 ___

[issue46230] NEWLINE* is missing in 'file' rule in PEG grammar

2022-01-02 Thread Robert Einhorn
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

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-02 Thread Robert Einhorn
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] '}' | '{'

[issue46485] ~ PEG operator in the grammar

2022-01-23 Thread Robert Einhorn
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

[issue46485] ~ PEG operator in the grammar

2022-01-23 Thread Robert Einhorn
Robert Einhorn added the comment: Thanks -- resolution: not a bug -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue46485> ___ __

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
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

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
Change by Robert Xiao : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46548> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
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

[issue46865] *() Invalid Syntax: iterable unpacking of empty tuple

2022-02-26 Thread Robert Spralja
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

[issue46865] *() Invalid Syntax: iterable unpacking of empty tuple

2022-02-26 Thread Robert Spralja
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

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
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

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
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

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
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

[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Robert Brewer
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

[issue1259] string find and rfind methods give a TypeError that is misleading

2007-10-10 Thread Robert Collins
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"

[issue1259] string find and rfind methods give a TypeError that is misleading

2007-10-15 Thread Robert Collins
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

[issue13339] Missing semicolon at Modules/posixsubprocess.c:4511

2011-11-03 Thread Robert Xiao
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

[issue13384] Unnecessary __future__ import in random module

2011-11-11 Thread Robert Xiao
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

[issue13435] Copybutton does not hide tracebacks

2011-11-19 Thread Robert Lehmann
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

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
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,

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
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

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
Robert Xiao added the comment: Also applies to Python 2.7. -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue13458> ___ ___ Python-bug

[issue13697] python RLock implementation unsafe with signals

2012-01-02 Thread Robert Collins
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

[issue13697] python RLock implementation unsafe with signals

2012-01-02 Thread Robert Collins
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&#x

[issue13697] python RLock implementation unsafe with signals

2012-01-03 Thread Robert Collins
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

[issue12325] regex matches incorrectly on literal dot (99.9% confirmed)

2011-06-13 Thread Robert Lehmann
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

[issue12576] urlib.request fails to open some sites

2011-07-19 Thread Robert Xiao
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

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
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

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
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

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
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

[issue12576] urlib.request fails to open some sites

2011-07-22 Thread Robert Xiao
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-

[issue9582] documentation line needs rewording

2010-08-12 Thread Robert Mohr
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

[issue9042] Gettext cache and classes

2010-09-02 Thread Robert Lehmann
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

[issue10040] GZipFile failure on large files

2010-10-07 Thread Robert Rohde
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

[issue10040] GZipFile failure on large files

2010-10-08 Thread Robert Rohde
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

[issue10232] Tkinter issues with Scrollbar and custom widget list

2010-10-29 Thread Robert Lerche
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

[issue10232] Tkinter issues with Scrollbar and custom widget list

2010-10-29 Thread Robert Lerche
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

[issue10232] Tkinter issues with Scrollbar and custom widget list

2010-11-01 Thread Robert Lerche
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

[issue10232] Tkinter issues with Scrollbar and custom widget list

2010-11-05 Thread Robert Lerche
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

[issue10440] support RUSAGE_THREAD as a constant in the resource module

2010-11-16 Thread Robert Collins
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

[issue10440] support RUSAGE_THREAD as a constant in the resource module

2010-11-17 Thread Robert Collins
Changes by Robert Collins : -- keywords: +patch Added file: http://bugs.python.org/file19624/rusage-thread.patch ___ Python tracker <http://bugs.python.org/issue10

[issue4114] struct returns incorrect 4 byte float

2011-03-16 Thread Robert Withrow
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

[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow
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

[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow
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

[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow
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

[issue4114] struct returns incorrect 4 byte float

2011-03-18 Thread Robert Withrow
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/

[issue11673] RawArray does not accept long

2011-03-25 Thread Robert Kern
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

[issue11673] RawArray does not accept long

2011-03-25 Thread Robert Kern
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

[issue11673] RawArray does not accept long

2011-03-25 Thread Robert Kern
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

[issue11854] __or__, __and__, __sub__, and __xor__ instantiate subclass of set without calling __init__

2011-04-15 Thread Robert Burke
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

[issue11854] __or__ et al instantiate subclass of set without calling __init__

2011-04-15 Thread Robert Burke
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

[issue11854] __or__ et al instantiate subclass of set without calling __init__

2011-04-16 Thread Robert Burke
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

[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Robert Meerman
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

[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-29 Thread Robert Meerman
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

[issue12002] ftplib.FTP.abort fails with TypeError on Python 3.x

2011-05-04 Thread Robert Xiao
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

[issue10598] curses fails to import on Solaris

2010-12-02 Thread Robert Lehmann
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

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Robert Lehmann
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

[issue10576] Add a progress callback to gcmodule

2010-12-03 Thread Robert Lehmann
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

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Robert Xiao
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

[issue10817] urllib.request.urlretrieve never raises ContentTooShortError if no reporthook

2011-01-03 Thread Robert Cheng
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

[issue10817] urllib.request.urlretrieve never raises ContentTooShortError if no reporthook

2011-01-14 Thread Robert Siemer
Changes by Robert Siemer : -- nosy: +siemer ___ Python tracker <http://bugs.python.org/issue10817> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2898] Add memory footprint query

2008-05-17 Thread Robert Schuppenies
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,

[issue2898] Add memory footprint query

2008-05-17 Thread Robert Schuppenies
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

[issue2898] Add memory footprint query

2008-05-28 Thread Robert Schuppenies
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

[issue2898] Add memory footprint query

2008-05-28 Thread Robert Schuppenies
Robert Schuppenies <[EMAIL PROTECTED]> added the comment: thanks, that did the trick. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2898> ___ _

[issue2898] Add memory footprint query

2008-05-29 Thread Robert Schuppenies
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

[issue2898] Add memory footprint query

2008-05-29 Thread Robert Schuppenies
Changes by Robert Schuppenies <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10463/sizeof.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2898] Add memory footprint query

2008-05-29 Thread Robert Schuppenies
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 __

[issue2898] Add memory footprint query

2008-06-01 Thread Robert Schuppenies
Robert Schuppenies <[EMAIL PROTECTED]> added the comment: Applied in r63856. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

  1   2   3   4   5   6   7   8   9   10   >