[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-24 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +3236 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-24 Thread INADA Naoki
INADA Naoki added the comment: I opened backport PR for 3.6, 2.7 and 3.5. -- versions: +Python 2.7, Python 3.5 ___ Python tracker ___

[issue31267] threading.Timer object is affected by changes to system time

2017-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue31268] Inconsistent socket timeout exception

2017-08-24 Thread desbma
New submission from desbma: When trying to connect a classic TCP socket to a non reachable peer, the exception reported is inconsistent if the socket has a timeout set. See the attached program, on my system (Arch Linux with Linux 4.9 & Python 3.6.2) it outputs: timeout timed out timeout time

[issue26256] Fast decimalisation and conversion to other bases

2017-08-24 Thread Stefan Krah
Stefan Krah added the comment: pypy-5.8.0-beta0 (Python 3.5.3) is using a very nicely written CFFI wrapper for libmpdec, so it also has the fast bignums. -- ___ Python tracker _

[issue26256] Fast decimalisation and conversion to other bases

2017-08-24 Thread Stefan Krah
Stefan Krah added the comment: What needs to be mentioned though is that the context has to be set for unrounded calculations: c = getcontext() c.prec = MAX_PREC c.Emax = MAX_EMAX c.Emin = MIN_EMIN Otherwise some people believe that the bignums are just rounded floating point arithmetic that

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-24 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31269] bug in islink() and is_simlink()

2017-08-24 Thread Karine
New submission from Karine: Hi, I found a problem which can be a bug and want to inform you. it seems os.islink() and PATH(mypath).is_symlink() functions doen't work correct when there is linked folder inside the path: For example I have the following path: a/b/c/test.txt if my c folder is

[issue31268] Inconsistent socket timeout exception

2017-08-24 Thread R. David Murray
R. David Murray added the comment: Have you tried the equivalent C program? I'm guessing this is happening at the OS layer and Python is just reporting it. On my system a timeout of 5 will always report the OS error. -- nosy: +r.david.murray ___ P

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Changes by Karine : -- title: bug in islink() and is_simlink() -> bug in islink() and is_symlink() ___ Python tracker ___ ___ Python-b

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread R. David Murray
R. David Murray added the comment: The docs say, eg: "Return True if the path points to a symbolic link". The path points to a file system object, and it is the object that is being checked, not each component of the path used to get to that object. -- nosy: +r.david.murray resolution

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Karine added the comment: Hi David Thanks for support. one question. I couldn't find a function which will check full path is link or not. Is there any known function> >Четверг, 24 августа 2017, 17:38 +04:00 от "R. David Murray" >: > > >R. David Murray added the comment: > >The docs say, eg:

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-24 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3237 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread R. David Murray
R. David Murray added the comment: I would phrase that as "check if any of the components of the path are links", at which point one "obvious"[*] answer is "any(x.is_symlink() for x in [*mypath.parents, mypath])". If the path is absolute, you could use "not (mypath.resolve() == mypath)". [*]

[issue12067] Doc: remove errors about mixed-type comparisons.

2017-08-24 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +3238 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue12067] Doc: remove errors about mixed-type comparisons.

2017-08-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've created a PR for the changes to test_compare from v16 of the patch. -- ___ Python tracker ___ _

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread Raphael Michel
Changes by Raphael Michel : -- pull_requests: +3239 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread Raphael Michel
New submission from Raphael Michel: The documentation given for itertools.zip_longest contains a "roughly equivalent" pure-python implementation of the function that is intended to help the user understand what zip_longest does on a functional level. However, the given implementation is very c

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: If someone wants to submit a PR, it would help judge the complexity and fragility of adding support for this. I cannot think of any problem upfront myself, but you're right that weak containers have been very difficult to make robust against various condition

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread Raphael Michel
Raphael Michel added the comment: I just noticed that in my post I accidentally pasted MY implementation twice instead of the old one, sorry for that. Here's the old one for quick comparison: class ZipExhausted(Exception): pass def zip_longest(*args, **kwds): # zip_longest('ABCD', 'xy'

[issue23835] configparser does not convert defaults to strings

2017-08-24 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset a5fab17fc11433b2418f626dc51e8a3d07b198ca by Łukasz Langa in branch 'master': bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191) https://github.com/python/cpython/commit/a5fab17fc11433b2418f626dc51e8a3d07b198ca -- ___

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 13614e375cc3637cf1311733d453df6107e964ea by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples (leftovers) (#3198) https://github.com/python/cpython/commit/13614e375c

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: The main refactoring of ConfigDialog into multiple classes is done. Since you kept this patch up to date with the changes, I will review it next, before making further changing to individual tab pages. On problem with implementing some features as extensions

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: We should still ask about use cases though. Without a motivating use case, why churn the code, complexify the API (possibly making it more tricky to use), and risk introducing bugs? AFAICT, the OP's sole motivation was "still, it would seem preferable ..."

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
New submission from Oren Milman: currently, the following causes an assertion in Modules/_io/textio.c in _io_TextIOWrapper_write_impl() to fail: import codecs import io class BadEncoder(): def encode(self, dummy): return 42 def _get_bad_encoder(dummy): return BadEncoder() quopri

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-08-24 Thread Steve Dower
Steve Dower added the comment: New changeset de50360ac2fec81dbf733f6c3c739b39a8822a39 by Steve Dower (Oren Milman) in branch 'master': bpo-29741: Update some methods in the _pyio module to also accept integer types. Patch by Oren Milman. (#560) https://github.com/python/cpython/commit/de50360a

[issue31272] typing module conflicts with __slots__-classes

2017-08-24 Thread Ilia Korvigo
New submission from Ilia Korvigo: I've got conflicts between Python's typing system and `__slots__`. Here is a small reproducible example. from typing import TypeVar, Generic, Sequence T = TypeVar("T") class TestGeneric(Sequence, Generic[T]): __slots__ = ("test",)

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Charles Wohlganger
Charles Wohlganger added the comment: I am not sure I understand your concern. As part of mainlining the extensions, all of their keybindings were moved to config-keys.def . There is nothing to prevent users from changing the keybindings or preventing us from making the defaults different acro

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3240 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31270] Simplify documentation of itertools.zip_longest

2017-08-24 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve the documentation. Raymond will address this definitively, but unless I'm mistaken part of the purpose of the examples is to show how the various itertools can be used. If that is true, then in the context of the overall itertoo

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Antony Lee
Antony Lee added the comment: The use case is to generate a mapping of weakly-held objects to unique ids, with something like id_map = WeakKeyDictionaryWithMissing(lambda *, _counter=itertools.count(): next(_counter)) Of course, as always when using defaultdict, it is easy enough to instead

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Vedran Čačić
Vedran Čačić added the comment: I can't reproduce this on 3.6.0. Is this on 3.7 only? -- nosy: +veky ___ Python tracker ___ ___ Python

[issue31273] Unicode support in TestCase.skip

2017-08-24 Thread Nathan Buckner
New submission from Nathan Buckner: Unicode support for TestCase.skip is broken because the caught SkipTest exception is passed through a str call. except SkipTest as e: self._addSkip(result, str(e)) Could be fixed with by changing to unicode(e) -- components: Tests, Unicode files:

[issue31268] Inconsistent socket timeout exception

2017-08-24 Thread desbma
desbma added the comment: Yes, you are right: I tried with a small C program, and compared with strace log of the Python program. In both cases poll sometimes returns -1 (error), or sometimes 0 (timeout). This is a weird behavior (at least for me) of the TCP stack, but clearly Python is not th

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Before reading the patch, more thoughts on the features, options, and behavior: nothing is Shell only; codecontext, rstrip, and runscript are properly limited to editors; the others are enabled for both. I think paragraph could have been editor only, but I wo

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
Oren Milman added the comment: Just checked on current 3.6 on my Windows 10. The assertion failes, and it is in line 1337. oh my. -- ___ Python tracker ___ __

[issue31268] Inconsistent socket timeout exception

2017-08-24 Thread R. David Murray
R. David Murray added the comment: I'm not a networking expert at this level, but I believe what is happening here is that the network stack does an arp, and has a timeout waiting for the arp response that is longer than your socket timeout. So at some point its arp timeout expires while the

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: My 'concern' was in relation to the old situation and why I have become more willing to change default behavior. -- ___ Python tracker ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 8621bb5d93239316f97281826461b85072ff6db7 by Gregory P. Smith in branch 'master': bpo-22536: Set the filename in FileNotFoundError. (#3194) https://github.com/python/cpython/commit/8621bb5d93239316f97281826461b85072ff6db7 -- __

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Charles Wohlganger
Charles Wohlganger added the comment: ZoomHeight has been put back into being an extension. This was because configdialog assumes autoexpand was an extension, and the idleconf tests all need at least one extension to exist to be useful. Zoomheight is pointless in almost any modern desktop envi

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Of course, as always when using defaultdict, it is easy enough to instead > implement this by manually checking if the key is present and store a new id > in this case Or, better, use setdefault(), since manually checking suffers from a race condition in t

[issue31268] Inconsistent socket timeout exception

2017-08-24 Thread desbma
desbma added the comment: Thanks for the insight. Well the most logical thing for me for the OS to do, would have been: 1. Send an ARP request 2. At the first poll call, report a timeout if no response was received 3. Repeat to 2. until the destination is considered unreachable 4. At the next c

[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-08-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: I rebased my PR and updated the tests so that they would pass. I knew 'bg' on the frame would be changed, but I was surprised by the 'state' changes. 'normal' only exists for compatibility and isn't one of the states to check in the tests; instead, 'disabled

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: zoomheight is OK on Ubuntu. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread STINNER Victor
STINNER Victor added the comment: Your change makes test_subprocess f1iling on Windows. Example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/891/steps/test/logs/stdio -- ___ Python tracker

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: right, the test needs to be excluded there. fixing... (bummer windows wasn't in the CI) -- ___ Python tracker ___ __

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3241 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Anthony Lee] > The use case is to generate a mapping of weakly-held objects > to unique ids, with something like > > id_map = WeakKeyDictionaryWithMissing(lambda *, _counter=itertools.count(): > > next(_counter)) Where are you keeping hard references to t

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Antony Lee
Antony Lee added the comment: The original example did not cover the use case and was only there to show the current behavior. The real use case is more something like obj = (get obj as argument to function, caller has a hard reference to it) uid = d[obj] -- _

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Just for comparison, what is your best solution without the proposed API change?It is helpful to see user code before-and-after to know whether there is an improvement that makes the change worth it. -- ___ P

[issue31274] Support building against homebrew on macOS

2017-08-24 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: The devguide does touch on how to build Python from source using homebrew installed libraries on macOS, although I found it to be 1) a bit incomplete; 2) not so easy to discover. It might make sense to modify configure to autodetect homebrew, or to have a

[issue31274] Support building against homebrew on macOS

2017-08-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: If you're proposing changes to the devguide, then please file the issue at https://github.com/python/devguide :) -- nosy: +Mariatta ___ Python tracker ___

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: One way to do it: - diff --git a/Lib/weakref.py b/Lib/weakref.py index 1802f32a20..18f26ea8b2 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -136,6 +136,8 @@ class WeakValueDictionary(collections.abc.MutableMapping): self._co

[issue27099] IDLE: turn builting extensions into regular modules

2017-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: The transferred options belong on the General tab. I have already planned to condense what is there as part of #31051. I held off because I did not know if it would conflict with your patch. Since, as far as I can tell, your patch currently does not touch G

[issue30188] test_nntplib: random EOFError in setUpClass()

2017-08-24 Thread Kubilay Kocak
Kubilay Kocak added the comment: bpo-30188 (and bpo-30188 ?) need merging to 3.6/3.5, 3.6 just failed with: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:748) Full build log attached -- nosy: +koobs resolution: fixed -> stage: resolved -> backport needed status: close

[issue30188] test_nntplib: random EOFError in setUpClass()

2017-08-24 Thread Kubilay Kocak
Kubilay Kocak added the comment: Apologies I meant 5b4feb7e86 by haypo and 067931dd95d (also needs merge?) by inada.naoki -- ___ Python tracker ___

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Antoine Pitrou] > So perhaps we need C code after all. This matches my experience with functools.lru_cache() where I used an RLock() to handle reentrancy. That by itself was insufficient. I also had to make otherwise unnecessary variable assignments to h

[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-24 Thread Antony Lee
Antony Lee added the comment: For my use case, it was easy enough to wrap the `uid = d[obj]` in a try... catch... plus locking. Using setdefault would cause the counter to be incremented every time. In truth, here I did not care about having consecutive uids, so that would have worked just a

[issue30809] IDLE parenmatch - highlighting options

2017-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I said on #27099, please do not include new options with the transfer patch. -- ___ Python tracker ___ __

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Karine added the comment: Thanks a lot David >Четверг, 24 августа 2017, 18:42 +04:00 от "R. David Murray" >: > > >R. David Murray added the comment: > >I would phrase that as "check if any of the components of the path are links", >at which point one "obvious"[*] answer is "any(x.is_symlink()