[issue10930] dict.setdefault: Bug: default argument is ALWAYS evaluated, i.e. no short-circuit eval

2011-01-18 Thread Albert
New submission from Albert : Hello! Is it intentional, that the default argument is ALWAYS evaluated, even if it is not needed??? Is it not a bug, that this method has no short-circuit eval (http://en.wikipedia.org/wiki/Short-circuit_evaluation) ?? Example1: = infinite = 1e100

[issue13423] Ranges cannot be meaningfully compared for equality or hashed

2011-11-18 Thread Chase Albert
New submission from Chase Albert : My expectation was that range(2,5) == range(2,5), and that they should hash the same. This is not the case. -- messages: 147838 nosy: rob.anyone priority: normal severity: normal status: open title: Ranges cannot be meaningfully compared for equality

[issue12311] memory leak with self-referencing dict

2011-06-10 Thread Albert Zeyer
New submission from Albert Zeyer : The attached Python script leaks memory. It is clear that there is a reference circle (`__dict__` references `self`) but `gc.collect()` should find this. -- components: Interpreter Core files: py_dict_refcount_test.py messages: 138062 nosy

[issue12311] memory leak with self-referencing dict

2011-06-10 Thread Albert Zeyer
Albert Zeyer added the comment: Whoops, looks like a duplicate of #1469629. -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12608] crash in PyAST_Compile when running Python code

2011-07-22 Thread Albert Zeyer
New submission from Albert Zeyer : Code: ``` import ast globalsDict = {} fAst = ast.FunctionDef( name="foo", args=ast.arguments( args=[], vararg=None, kwarg=None, defaults=[], kwonlyargs=[], kw_defaults=[]), body=[], deco

[issue12608] crash in PyAST_Compile when running Python code

2011-07-22 Thread Albert Zeyer
Albert Zeyer added the comment: PyPy bug report: https://bugs.pypy.org/issue806 -- ___ Python tracker <http://bugs.python.org/issue12608> ___ ___ Python-bug

[issue12609] SystemError: Objects/codeobject.c:64: bad argument to internal function

2011-07-22 Thread Albert Zeyer
New submission from Albert Zeyer : Code: ``` from ast import * globalsDict = {} exprAst = Interactive(body=[FunctionDef(name=u'Py_Main', args=arguments(args=[Name(id=u'argc', ctx=Param()), Name(id=u'argv', ctx=Param())], vararg=None, kwarg=None, defaults=[]),

[issue12610] Fatal Python error: non-string found in code slot

2011-07-22 Thread Albert Zeyer
New submission from Albert Zeyer : Code: ``` from ast import * globalsDict = {} body = [ Assign(targets=[Name(id=u'argc', ctx=Store())], value=Name(id=u'None', ctx=Load())), ] exprAst = Interactive(body=[ FunctionDef(

[issue12609] SystemError: Objects/codeobject.c:64: bad argument to internal function

2011-07-22 Thread Albert Zeyer
Albert Zeyer added the comment: Simplified code: ``` from ast import * globalsDict = {} exprAst = Interactive(body=[ FunctionDef( name=u'foo', args=arguments(args=[], vararg=None, kwarg=None, defaults=[]),

[issue12854] PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout

2011-08-29 Thread Albert Zeyer
New submission from Albert Zeyer : In Parser/tokenizer.c, there is `PyOS_Readline(stdin, stdout, tok->prompt)`. This ignores any `sys.stdin` / `sys.stdout` overwrites. The usage should be like in Python/bltinmodule.c in builtin_raw_input. -- messages: 143168 nosy: Albert.Ze

[issue12859] readline implementation doesn't release the GIL

2011-08-30 Thread Albert Zeyer
New submission from Albert Zeyer : Modules/readline.c 's `call_readline` doesn't release the GIL while reading. -- messages: 143226 nosy: Albert.Zeyer priority: normal severity: normal status: open title: readline implementation doesn't release the GIL versi

[issue12859] readline implementation doesn't release the GIL

2011-08-30 Thread Albert Zeyer
Albert Zeyer added the comment: Whoops, sorry, invalid. It doesn't need to. It is handled in PyOS_Readline. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.

[issue12861] PyOS_Readline uses single lock

2011-08-30 Thread Albert Zeyer
New submission from Albert Zeyer : In Parser/myreadline.c PyOS_Readline uses a single lock (`_PyOS_ReadlineLock`). I guess it is so that we don't have messed up stdin reads. Or are there other technical reasons? However, it should work to call this function from multiple threads

[issue12861] PyOS_Readline uses single lock

2011-08-30 Thread Albert Zeyer
Albert Zeyer added the comment: Ok, it seems that the Modules/readline.c implementation is also not really threadsafe... (Whereby, I think it should be.) -- ___ Python tracker <http://bugs.python.org/issue12

[issue12869] PyOS_StdioReadline is printing the prompt on stderr

2011-08-31 Thread Albert Zeyer
New submission from Albert Zeyer : PyOS_StdioReadline from Parser/myreadline.c is printing the prompt on stderr. I think it should print it on the given parameter sys_stdout. Other readline implementations (like from the readline module) also behave this way. Even if it really is supposed to

[issue12861] PyOS_Readline uses single lock

2011-08-31 Thread Albert Zeyer
Albert Zeyer added the comment: Even more problematic: The readline lib itself is absolutely not designed in a way to be used from multi threads at once. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12861] PyOS_Readline uses single lock

2011-09-02 Thread Albert Zeyer
Albert Zeyer added the comment: You might have opened several via `openpty`. I am doing that here: https://github.com/albertz/PyTerminal -- ___ Python tracker <http://bugs.python.org/issue12

[issue9655] urllib2 fails to retrieve a url which is handled correctly by urllib

2010-08-21 Thread Albert Weichselbraun
New submission from Albert Weichselbraun : urllib2 fails to retrieve the content of http://www.mfsa.com.mt/insguide/english/glossarysearch.jsp?letter=all >>> urllib2.urlopen("http://www.mfsa.com.mt/insguide/english/glossarysearch.jsp?letter=all";).read() ''

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-08-24 Thread Albert Strasheim
Changes by Albert Strasheim : -- nosy: +Albert.Strasheim ___ Python tracker <http://bugs.python.org/issue8296> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-08-24 Thread Albert Strasheim
Albert Strasheim added the comment: Any chance of getting this patch applied? Thanks. -- ___ Python tracker <http://bugs.python.org/issue8296> ___ ___ Python-bug

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-08-26 Thread Albert Strasheim
Changes by Albert Strasheim : -- nosy: +Albert.Strasheim ___ Python tracker <http://bugs.python.org/issue9205> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-08-26 Thread Albert Strasheim
Changes by Albert Strasheim : -- nosy: +Albert.Strasheim ___ Python tracker <http://bugs.python.org/issue9207> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4608] urllib.request.urlopen does not return an iterable object

2011-04-20 Thread Albert Hopkins
Albert Hopkins added the comment: This issue appears to persist when the protocol used is FTP: root@tp-db $ cat test.py from urllib.request import urlopen for line in urlopen('ftp://gentoo.osuosl.org/pub/gentoo/releases/'): print(line) break root@tp-db $ python3

[issue4608] urllib.request.urlopen does not return an iterable object

2011-04-20 Thread Albert Hopkins
Albert Hopkins added the comment: Oops, previous example was a directory, but it's the same if the url points to a ftp file. -- ___ Python tracker <http://bugs.python.org/i

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-05-29 Thread albert hofkamp
New submission from albert hofkamp <[EMAIL PROTECTED]>: shutil.copytree() uses shutil.copyfile() to copy files recursively. shutil.copyfile() opens the source file for reading, and the destination file for writing, followed by a call to shutil.copyfileobj(). If the file happens to be a

[issue5380] pty.read raises IOError when slave pty device is closed

2010-03-02 Thread Albert Hopkins
Changes by Albert Hopkins : -- nosy: +marduk ___ Python tracker <http://bugs.python.org/issue5380> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1774] Reference to New style classes documentation is incorrect

2008-01-09 Thread albert hofkamp
New submission from albert hofkamp: In the Python reference manual (the online current documentation), in Section 3.3 "New-style and classic classes", there is a reference to external documentation about new style classes. The reference is however incorrect, it should be http://www.

[issue1773] Reference to Python issue tracker incorrect

2008-01-09 Thread albert hofkamp
New submission from albert hofkamp: In the Python reference manual (the online current documentation), in the "About this document" section, there is a reference to the Sourceforge bug tracker for reporting errors in the document. This tracker however has been closed, and has been r

[issue4565] io write() performance very slow

2008-12-06 Thread Istvan Albert
New submission from Istvan Albert <[EMAIL PROTECTED]>: The write performance into text files is substantially slower (5x-8x) than that of python 2.5. This makes python 3.0 unsuited to any application that needs to write larger amounts of data. test code f

[issue4565] io write() performance very slow

2008-12-06 Thread Istvan Albert
Istvan Albert <[EMAIL PROTECTED]> added the comment: Well I would strongly dispute that anyone other than the developers expected this. The release documentation states: "The net result of the 3.0 generalizations is that Python 3.0 runs the pystone benchmark around 10% slower than

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Albert Hopkins
New submission from Albert Hopkins <[EMAIL PROTECTED]>: Say I have module foo.py: def a(x): def b(): x del x If I run foo.py under Python 2.4.4 I get: File "foo.py", line 4 del x SyntaxError

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Albert Hopkins
Albert Hopkins <[EMAIL PROTECTED]> added the comment: Thanks for looking into this. Ok... I applied your patch (actually it does not apply against Python 3.0 so I had to change it manually). Now I'm not sure if this is still an error in the compiler or if it's truly a proble

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2021-10-07 Thread Albert Zeyer
Albert Zeyer added the comment: > How is CoW copy supposed to be done by using copy_file_range() exactly? I think copy_file_range() will just always use copy-on-write and/or server-side-copy when available. You cannot even turn that

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-13 Thread Albert Zeyer
Albert Zeyer added the comment: Instead of `except:` and `except BaseException:`, I think better use `except Exception:`. For further discussion and reference, also see the discussion here: https://news.ycombinator.com/item?id=22028581 -- nosy: +Albert.Zeyer

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-14 Thread Albert Zeyer
Albert Zeyer added the comment: Why is `except BaseException` better than `except Exception` here? With `except Exception`, you will never run into the problem of possibly closing the fd twice. This is the main important thing which we want to fix here. This is more important than missing

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-15 Thread Albert Zeyer
Albert Zeyer added the comment: If you anyway accept that KeyboardInterrupt can potentially leak, by just using `except Exception`, it would also be solved here. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-15 Thread Albert Zeyer
Albert Zeyer added the comment: > I think it is worth pointing out that the semantics of > > f = ``open(fd, closefd=True)`` > > are broken (IMHO) because an exception can result in an unreferenced file > object that has taken over reponsibility for closing the fd, but

[issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy)

2020-12-29 Thread Albert Zeyer
Albert Zeyer added the comment: According to the man page of copy_file_range (https://man7.org/linux/man-pages/man2/copy_file_range.2.html), copy_file_range also should support copy-on-write: > copy_file_range() gives filesystems an opportunity to implement > "copy a

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2020-12-29 Thread Albert Zeyer
Albert Zeyer added the comment: Is FICLONE really needed? Doesn't copy_file_range already supports the same? I posted the same question here: https://stackoverflow.com/questions/65492932/ficlone-vs-ficlonerange-vs-copy-file-range-for-copy-on-write-support -- nosy: +Albert.

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2020-12-31 Thread Albert Zeyer
Albert Zeyer added the comment: I did some further research (with all details here: https://stackoverflow.com/a/65518879/133374). See vfs_copy_file_range in the Linux kernel. This first tries to call remap_file_range if possible. FICLONE calls ioctl_file_clone. ioctl_file_clone calls

[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2020-05-19 Thread Albert Christianto
Albert Christianto added the comment: Hi admins, I need help for compiling and building Python-3.7.7. My system is Ubuntu 16.04 LTS, gcc 5.4.0 20160609 this is the configuration cmd for compling python ./configure --enable-optimizations --enable-shared when i compiled it, i get these

[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2020-05-24 Thread Albert Christianto
Albert Christianto added the comment: Sorry for my late response. Well, thank you very much for your fast response to help me. Actually, I have solved the problem in 3 hours after I posted my question. hehehe. I found this tip about uncleaned files after executing "make clean&quo

[issue41468] Unrecoverable server exiting

2020-08-03 Thread Albert Francis
New submission from Albert Francis : How to solve unrecoverable server exiting in IDLE -- assignee: terry.reedy components: IDLE messages: 374766 nosy: albertpython, terry.reedy priority: normal severity: normal status: open title: Unrecoverable server exiting type: behavior versions

[issue41468] Unrecoverable server exiting

2020-08-04 Thread Albert Francis
Albert Francis added the comment: Dear Sir, I got the solution. Thanks On Tue, 4 Aug 2020, 16:55 Terry J. Reedy, wrote: > > Terry J. Reedy added the comment: > > One should never see this message. As far as I remember, I have seen it > only once in the last several years.

[issue41468] Unrecoverable server exiting

2020-08-10 Thread Albert Francis
Albert Francis added the comment: Got it, thanks! On Mon, 10 Aug 2020, 19:26 Terry J. Reedy, wrote: > > Terry J. Reedy added the comment: > > Test error fixed on issue 41514. > > -- > > ___ > Python tracker > <h

[issue41538] Allow customizing python interpreter in venv.EnvBuilder

2020-08-13 Thread Albert Cervin
New submission from Albert Cervin : When creating a virtualenv using venv.EnvBuilder, it always uses sys._base_executable. However, in some embedded cases (Blender being one example), it is not set to a valid Python executable. The proposal is to add a keyword parameter to the EnvBuilder

[issue41538] Allow customizing python interpreter in venv.EnvBuilder

2020-08-13 Thread Albert Cervin
Change by Albert Cervin : -- keywords: +patch pull_requests: +20981 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21854 ___ Python tracker <https://bugs.python.org/issu

[issue30250] StreamIO truncate behavior of current position

2017-05-03 Thread Albert Zeyer
New submission from Albert Zeyer: The doc says that StringIO.truncate should not change the current position. Consider this code: try: import StringIO except ImportError: import io as StringIO buf = StringIO.StringIO() assert_equal(buf.getvalue(), "") prin

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-18 Thread Albert Zeyer
New submission from Albert Zeyer : subprocess_fork_exec currently calls fork(). I propose to use vfork() or posix_spawn() or syscall(SYS_clone, SIGCHLD, 0) instead if possible and if there is no preexec_fn. The difference would be that fork() will call any atfork handlers (registered via

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-19 Thread Albert Zeyer
Albert Zeyer added the comment: This is a related issue, although with different argumentation: https://bugs.python.org/issue20104 -- ___ Python tracker <https://bugs.python.org/issue31

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-20 Thread Albert Zeyer
Albert Zeyer added the comment: Here is some more background for a case where this occurs: https://stackoverflow.com/questions/46849566/multi-threaded-openblas-and-spawning-subprocesses My proposal here would fix this. -- ___ Python tracker <ht

[issue24564] shutil.copytree fails when copying NFS to NFS

2017-10-25 Thread Albert Zeyer
Albert Zeyer added the comment: I'm also affected by this, with Python 3.6. My home directory is on a ZFS-backed NFS share. See here for details: https://github.com/Linuxbrew/homebrew-core/issues/4799 Basically: Copying setuptools.egg-info to /u/zeyer/.linuxbrew/lib/python3.6/site-pac

[issue10049] Add a "no-op" (null) context manager to contextlib (Rejected: use contextlib.ExitStack())

2017-11-09 Thread Albert Zeyer
Albert Zeyer added the comment: Note that this indeed seems confusing. I just found this thread by search for a null context manager. Because I found that in TensorFlow they introduced _NullContextmanager in their code and I wondered that this is not provided by the Python stdlib

[issue33827] Generators with lru_cache can be non-intuituve

2018-06-11 Thread Michel Albert
New submission from Michel Albert : Consider the following code: # filename: foo.py from functools import lru_cache @lru_cache(10) def bar(): yield 10 yield 20 yield 30 # This loop will work as expected for row in bar(): print(row

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-23 Thread Albert Zeyer
New submission from Albert Zeyer : ``` class Foo1(dict): def __getattr__(self, key): return self[key] def __setattr__(self, key, value): self[key] = value class Foo2(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ o1 = Foo1() o1.x = 42 print(o1, o1.x) o2

[issue15885] @staticmethod __getattr__ doesn't work

2012-09-08 Thread Albert Zeyer
New submission from Albert Zeyer: Code: ``` class Wrapper: @staticmethod def __getattr__(item): return repr(item) # dummy a = Wrapper() print(a.foo) ``` Expected output: 'foo' Actual output with Python 2.7: Traceback (most recent call las

[issue15885] @staticmethod __getattr__ doesn't work

2012-09-09 Thread Albert Zeyer
Albert Zeyer added the comment: I don't quite understand. Shouldn't __getattr__ also work in old-style classes? And the error itself ('staticmethod' object is not callable), shouldn't that be impossible? --

[issue20062] Remove emacs page from devguide

2014-03-18 Thread Albert Looney
Albert Looney added the comment: removing emacs from the devguide Im am certainly new at this, so if this is incorrect please provide feedback. -- keywords: +patch nosy: +alooney Added file: http://bugs.python.org/file34503/index.patch ___ Python

[issue20062] Remove emacs page from devguide

2014-03-20 Thread Albert Looney
Albert Looney added the comment: Patch should be fixed now and remove emacs.rst file. It seems to me that the Emacs information that is being deleted is already in the wiki. https://wiki.python.org/moin/EmacsEditor -- Added file: http://bugs.python.org/file34542/devguide.patch

[issue20815] ipaddress unit tests PEP8

2014-03-23 Thread Michel Albert
Michel Albert added the comment: It seems the contributor agreement form has been processed. As I understand it, the asterisk on my name confirms this. I also verified that this patch cleanly applies to the most recent revision. -- ___ Python

[issue20825] containment test for "ip_network in ip_network"

2014-03-23 Thread Michel Albert
Michel Albert added the comment: Hi again, The contribution agreement has been processed, and the patch still cleanly applies to the latest revision of branch `default`. -- ___ Python tracker <http://bugs.python.org/issue20

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-03-23 Thread Michel Albert
Michel Albert added the comment: Sorry for the late reply. I wanted to take some time and give a more detailed explanation. At least to the best of my abilities :) I attached a zip-file with my quick-and-dirty test-rig. The zip contains: * gendata.py -- The script I used to generate test

[issue20825] containment test for "ip_network in ip_network"

2014-03-23 Thread Michel Albert
Michel Albert added the comment: I made the changes mentioned by r.david.murray I am not sure if the modifications in ``Doc/whatsnew/3.5.rst`` are correct. I tried to follow the notes at the top of the file, but it's not clear to me if it should have gone into ``News/Misc`` or into

[issue20062] Remove emacs page from devguide

2014-03-26 Thread Albert Looney
Changes by Albert Looney : Removed file: http://bugs.python.org/file34503/index.patch ___ Python tracker <http://bugs.python.org/issue20062> ___ ___ Python-bugs-list m

[issue16385] evaluating dict with repeated keys gives no error/warnings

2012-11-02 Thread Albert Ferras
New submission from Albert Ferras: I normally use dictionaries for configuration purposes in python, but there's a problem where I have a dictionary with many key<->values and one of the keys is repeated. For example: lives_in = { 'lion': ['Africa', 'Ameri

[issue16385] evaluating dict with repeated keys gives no warnings/errors

2012-11-02 Thread Albert Ferras
Albert Ferras added the comment: I would use json, but it allows me to set list/strings, etc.. not python objects like I'd want -- ___ Python tracker <http://bugs.python.org/is

[issue16385] evaluating dict with repeated keys gives no warnings/errors

2012-11-02 Thread Albert Ferras
Albert Ferras added the comment: sorry: *it only allows me -- ___ Python tracker <http://bugs.python.org/issue16385> ___ ___ Python-bugs-list mailing list Unsub

[issue16385] evaluating dict with repeated keys gives no warnings/errors

2012-11-02 Thread Albert Ferras
Albert Ferras added the comment: also, it creates confusion when this happens -- ___ Python tracker <http://bugs.python.org/issue16385> ___ ___ Python-bugs-list m

[issue17294] compile-flag for single-execution to return value instead of printing it

2013-10-14 Thread Albert Zeyer
Albert Zeyer added the comment: I don't know that I have an expression and I want it also to work if it is not an expression. Basically I really want the 'single' behavior. (My not-so-uncommon use case: Have an interactive shell where the output on stdout does not make sens

[issue17294] compile-flag for single-execution to return value instead of printing it

2013-10-22 Thread Albert Zeyer
Albert Zeyer added the comment: Thanks a lot for the long and detailed response! I didn't meant to start a header war; I thought that my request was misunderstood and thus the header changes were by mistake. But I guess it is a good suggestion to leave that decision to a core dev. I

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2014-06-26 Thread Albert Hopkins
Albert Hopkins added the comment: You can close this one out. I don't even remember the use case anymore. -- ___ Python tracker <http://bugs.python.org/i

[issue22020] tutorial 9.10. Generators statement error

2014-07-20 Thread Albert Ho
New submission from Albert Ho: https://docs.python.org/3/tutorial/classes.html >>> for char in reverse('golf'): I found that reverse didnt work and i check the doc https://docs.python.org/3.4/library/functions.html#reversed >>> reversed(seq)ΒΆ I guess it just fo

[issue20276] ctypes._dlopen should not force RTLD_NOW

2014-01-15 Thread Albert Zeyer
New submission from Albert Zeyer: On MacOSX, when you build an ARC-enabled Dylib with backward compatibility for e.g. MacOSX 10.6, some unresolved functions like `_objc_retainAutoreleaseReturnValue` might end up in your Dylib. Some reference about the issue: 1. http://stackoverflow.com/q

[issue20815] ipaddress unit tests PEP8

2014-03-01 Thread Michel Albert
New submission from Michel Albert: While I was looking at the source of the ipaddress unit-tests, I noticed a couple of PEP8 violations. This patch fixes these (verified using the ``pep8`` tool). There are no behavioural changes. Only white-space. Test-cases ran successfully before, and

[issue20815] ipaddress unit tests PEP8

2014-03-01 Thread Michel Albert
Michel Albert added the comment: Thanks for the quick reply! I did not know the pep8 tool added it's own rules :( I have read PEP8 a long while ago and have since relied on the tool to do "the right thing". Many of it's idiosyncrasies have probably made their way into my

[issue20815] ipaddress unit tests PEP8

2014-03-02 Thread Michel Albert
Michel Albert added the comment: Here's a new patch which addresses white-space issues without touching the old tests. -- Added file: http://bugs.python.org/file34265/test_ipaddress_pep8-r3.patch ___ Python tracker <http://bugs.py

[issue20825] containment test for "ip_network in ip_network"

2014-03-02 Thread Michel Albert
New submission from Michel Albert: The ipaddress module always returns ``False`` when testing if a network is contained in another network. However, I feel this should be a valid test. No? Is there any reason why this is fixed to ``False``? In case not, here's a patch which implements

[issue20825] containment test for "ip_network in ip_network"

2014-03-02 Thread Michel Albert
Michel Albert added the comment: Hmm... after thinking about this, I kind of agree. I was about to state something about the fact that you could consider networks like an "ordered set". And use that to justify my addition :) But the more I think about it, the more I am okay with

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-03-02 Thread Michel Albert
New submission from Michel Albert: This alternative implementation runs over the ``addresses`` collection only once, and "backtracks" only if necessary. Inspired by a "shift-reduce" approach. Technically both are O(n), so the best case is always the same. But the old impl

[issue20815] ipaddress unit tests PEP8

2014-03-03 Thread Michel Albert
Michel Albert added the comment: I strongly agree with Raymond's points! They are all valid. I should note, that I submitted this patch to - as mentioned by Nick - familiarise myself with the patch submission process. I decided to make harmless changes which won't risk brakin

[issue20825] containment test for "ip_network in ip_network"

2014-03-04 Thread Michel Albert
Michel Albert added the comment: I second "supernet_of" and "subnet_of". I'll implement it as soon as I get around it. I have been thinking about using ``in`` and ``<=`` and, while I initially liked the idea for tests, I find both operators too ambiguous. Wit

[issue20825] containment test for "ip_network in ip_network"

2014-03-06 Thread Michel Albert
Michel Albert added the comment: Here's a new patch implementing both ``subnet_of`` and ``supernet_of``. It also contains the relevant docs and unit-tests. -- Added file: http://bugs.python.org/file34292/net-in-net-r2.patch ___ Python tracker

[issue20825] containment test for "ip_network in ip_network"

2014-03-11 Thread Michel Albert
Michel Albert added the comment: Yes. I signed it last Friday if I recall correctly. As I understood it, the way for you to tell if it's done, is that my username will be followed by an asterisk. But I'm not in a hurry. Once I get the confirmation, I can just ping you again via

[issue20815] ipaddress unit tests PEP8

2014-03-12 Thread Michel Albert
Michel Albert added the comment: Did so already last weekend. I suppose it will take some time to be processed. I can ping you via a message here once I receive the confirmation. -- ___ Python tracker <http://bugs.python.org/issue20

[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2009-08-03 Thread albert Mietus
New submission from albert Mietus : The functions urlparse.url{,un}split() and urllib{,2}.open() do not work together for relative, local files, due a bug in urlunsplit. Given a file f='./rel/path/to/file.html' it can be open directly by urllib.open(f), but not in urllib2! as the l

[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2009-08-07 Thread albert Mietus
albert Mietus added the comment: There was a bug in the workaround: if not ( scheme == 'file' and not netloc and url[0] != '/'): -=--- The {{{and url[0] != '/'}}} was missing (above is corrected)

[issue7113] ConfigParser load speedup

2009-10-12 Thread albert hofkamp
New submission from albert hofkamp : Current implementation (r71564) uses "'%s\n%s' % (old_val, new_line)" to merge multi-line options into one string. For options with many lines, this wastes a lot of CPU power. Attached patch against r71564 fixes this problem by first buil

[issue20825] containment test for "ip_network in ip_network"

2016-06-25 Thread Michel Albert
Michel Albert added the comment: I just realised that the latest patch on this no longer applies properly. I have fixed the issue and I am currently in the process of running the unit-tests which takes a while. Once those pass, I'll update some metadata and res

[issue20825] containment test for "ip_network in ip_network"

2016-06-25 Thread Michel Albert
Michel Albert added the comment: Test pass properly. Is there anything else left to do? Here's the fixed patch (net-in-net-r4.patch) -- Added file: http://bugs.python.org/file43534/net-in-net-r4.patch ___ Python tracker <http://bugs.py

[issue20825] containment test for "ip_network in ip_network"

2016-06-25 Thread Michel Albert
Michel Albert added the comment: Updated patch, taking into account notes from the previous patch-reviews -- Added file: http://bugs.python.org/file43535/net-in-net-r5.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20825] containment test for "ip_network in ip_network"

2016-06-25 Thread Michel Albert
Michel Albert added the comment: I don't quite see how the operator module could help. I don't have much experience with it though, so I might be missing something... I don't see how I can relate one check to the other. The example I gave in the patch review was the follo

[issue20825] containment test for "ip_network in ip_network"

2016-06-25 Thread Michel Albert
Michel Albert added the comment: New patch with proposed changes. -- Added file: http://bugs.python.org/file43537/net-in-net-r6.patch ___ Python tracker <http://bugs.python.org/issue20

[issue17263] crash when tp_dealloc allows other threads

2013-02-20 Thread Albert Zeyer
New submission from Albert Zeyer: If you have some Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS in some tp_dealloc and you use such objects in thread local storage, you might get crashes, depending on which thread at what time is trying to cleanup such object. I haven't fully figured ou

[issue17263] crash when tp_dealloc allows other threads

2013-02-22 Thread Albert Zeyer
Albert Zeyer added the comment: The latest 2.7 hg still crashes. -- ___ Python tracker <http://bugs.python.org/issue17263> ___ ___ Python-bugs-list mailin

[issue17263] crash when tp_dealloc allows other threads

2013-02-22 Thread Albert Zeyer
Albert Zeyer added the comment: The backtrace: Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x7fff8a54e386 __semwait_signal + 10 1 libsystem_c.dylib 0x7fff85e30800 nanosleep + 163 2 libsystem_c.dylib

[issue17263] crash when tp_dealloc allows other threads

2013-02-23 Thread Albert Zeyer
Albert Zeyer added the comment: Note that in my original application where I encountered this (with sqlite), the backtrace looks slightly different. It is at shutdown, but not at interpreter shutdown - the main thread is still running. https://github.com/albertz/music-player/issues/23 I was

[issue17263] crash when tp_dealloc allows other threads

2013-02-23 Thread Albert Zeyer
Albert Zeyer added the comment: Here is one. Others are in the issue report on GitHub. In Thread 5, the PyObject_SetAttr is where some attribute containing a threading.local object is set to None. This threading.local object had a reference to a sqlite connection object (in some TLS contextes

[issue17263] crash when tp_dealloc allows other threads

2013-02-23 Thread Albert Zeyer
Albert Zeyer added the comment: Sadly, that is quite complicated or almost impossible. It needs the MacOSX system Python and that one lacks debugging information. I just tried with the CPython vom hg-2.7. But it seems the official Python doesn't have objc bindings (and I also need

[issue17294] compile-flag for single-execution to return value instead of printing it

2013-02-25 Thread Albert Zeyer
New submission from Albert Zeyer: `compile(s, "", "single")` would generate a code object which prints the value of the evaluated string if that is an expression. This is what you would normally want in a REPL. Instead of printing the value, it might make more sense to ret

[issue17263] crash when tp_dealloc allows other threads

2013-02-25 Thread Albert Zeyer
Albert Zeyer added the comment: The symbols are there because it is a library which exports all the symbols. Other debugging information are not there and I don't know any place where I can get them. It currently cannot work on Linux in the same way because the GUI is Cocoa only righ

  1   2   >