[issue33328] pdb error when stepping through generator

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Rick. But I get the same error in 3.6. An AttributeError is raised if the debugger runs at the interpreter shutdown stage (sys.is_finalizing() returns True). sys.path was set to None at the beginning

[issue33328] pdb error when stepping through generator

2018-04-21 Thread Rick Teachey
Change by Rick Teachey : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___

[issue33328] pdb error when stepping through generator

2018-04-21 Thread Rick Teachey
Rick Teachey added the comment: The interactive session result is below: GeneratorExit Exception ignored in: Traceback (most recent call last): File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\types.py", line 27, in _ag File

[issue33328] pdb error when stepping through generator

2018-04-21 Thread Rick Teachey
New submission from Rick Teachey : Hello: The attached python file runs a pdb interactive session for a generator. It produces an error in Python 3.7 Beta 3, but no error in 3.6. I searched for this issue and there do seem to be things that are related to it already, but

[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2018-04-21 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2018-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds like gratuitous breakage to me. __file__ in particular is used quite often. -- nosy: +pitrou ___ Python tracker

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a test that deliberately kills the semaphore tracker, so that warning should be expected (I don't see it myself, but that might be because of differing warning settings). -- ___ Python

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-04-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: It doesn't hang for me anymore, but does print this warning: 0:00:00 load avg: 1.59 [1/2] test_multiprocessing_fork Lib/multiprocessing/semaphore_tracker.py:55: UserWarning: semaphore_tracker: process died unexpectedly, relaunching.

[issue32911] Doc strings no longer stored in body of AST

2018-04-21 Thread Łukasz Langa
Łukasz Langa added the comment: Oh, and Francis, you might actually want to use lib2to3.pytree instead, which will provide you with a Concrete Syntax Tree ("lossless AST"). That tree will keep information like whitespace, comments, and other semantically insignificant

[issue32911] Doc strings no longer stored in body of AST

2018-04-21 Thread Łukasz Langa
Łukasz Langa added the comment: Inadasan, what Francis is referring to is that people often use `ast.parse()` to parse code fragments, not entire modules. For example: >>> some_code = '"just a string"' >>> some_code_ast = ast.parse(some_code) The way `ast.parse()`

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: @Benjamin I can't reproduce here. It's true that test_multiprocessing_fork leaves two processes being itself, but that doesn't seem to disturb test_subprocess. @Miro Could you report the signal number issue separately? Thank you!

[issue28320] Hostname validation is False by default in imaplib

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: See also issue 33327. -- ___ Python tracker ___ ___

[issue33327] Add a method to move messages to IMAPlib

2018-04-21 Thread Matej Cepl
New submission from Matej Cepl : I am in the process of writing script working with IMAP first time using Python 3 for it (unfortunately, most of servers where I run other code is so ancient that even Python 2.7 is a stretch), and it is really nice experience so far. Many

[issue5430] imaplib: must not replace LF or CR by CRLF in literals

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: Oh, this is 2.6 bug. This should be closed. -- ___ Python tracker ___

[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2018-04-21 Thread Kirill Balunov
New submission from Kirill Balunov : The opcode module contains several collections: `cmp_op` `hasconst` `hasname` `hasjrel` ... which are only used for `in` checks. At the same time, they are stored as `list`s and `cmp_op` as tuple. Both these types are not optimal

[issue5430] imaplib: must not replace LF or CR by CRLF in literals

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: > Module imaplib has pretty sparse test code. On that note: would anybody be willing to express in form of (simplified) test case, what's the problem reported here? I am not sure, I follow. -- ___

[issue28320] Hostname validation is False by default in imaplib

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: I do agree with http://legacy.python.org/dev/peps/pep-0476/#other-protocols: This PEP only proposes requiring this level of validation for HTTP clients, not for other protocols such as SMTP. This is because while a high percentage of HTTPS servers

[issue18921] In imaplib, cached capabilities may be out of date after login

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: Well, and would it be too much to refresh capabilities attribute in the end of login method? -- nosy: +mcepl ___ Python tracker

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b9827b762093f2b295934bed755b4de0049b1f15 by Serhiy Storchaka (Andrés Delfino) in branch '2.7': [2.7] bpo-33297: Mention Pillow to work with more image formats. (GH-6505) (GH-6562)

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Python 2.7 and 3.6 I got the following traceback for the second case: Traceback (most recent call last): File "issue33323.py", line 21, in min(bad(i) for i in range(7)) # unhelpful error message ValueError: max() arg is

[issue33144] random._randbelow optimization

2018-04-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue33144] random._randbelow optimization

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 6291 didn't work properly with case 1. Rand2 uses getrandbits() since it is overridden in the parent despites the fact that random() is defined later. PR 6563 fixes this. It walks classes in method resolution order and finds

[issue33144] random._randbelow optimization

2018-04-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6258 ___ Python tracker ___ ___

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +6257 ___ Python tracker ___ ___

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Naris R
Naris R added the comment: This is a little bit contrived but it demonstrates the problem. ``` def good_exception(): raise Exception('something bad happened') def bad_exception(): return next(iter([])) def good(n): return good_exception() + n def bad(n):

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide a sample code? -- nosy: +serhiy.storchaka ___ Python tracker

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread Andrés Delfino
Andrés Delfino added the comment: Currently cherry picking the commit for 2.7. -- ___ Python tracker ___

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread miss-islington
miss-islington added the comment: New changeset 5c0a8bb1c2c8d77c4b2d5002259d08fe6a277b40 by Miss Islington (bot) in branch '3.6': bpo-33297: Mention Pillow to work with more image formats. (GH-6505)

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread miss-islington
miss-islington added the comment: New changeset f9005030fee6af333fada014da3eb0144078779f by Miss Islington (bot) in branch '3.7': bpo-33297: Mention Pillow to work with more image formats. (GH-6505)

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +6256 ___ Python tracker ___

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b81ca28b378c8b29204a37f8bd433a3379f53f7d by Serhiy Storchaka (Andrés Delfino) in branch 'master': bpo-33297: Mention Pillow to work with more image formats. (#6505)

[issue33297] Mention Pillow package on tkinter.rst to work with more image formats

2018-04-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +6255 ___ Python tracker ___

[issue33325] Optimize sequences of constants in the compiler

2018-04-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6254 stage: -> patch review ___ Python tracker ___

[issue33325] Optimize sequences of constants in the compiler

2018-04-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The following PR makes three optimizations in the compiler. 1. A sequence of several LOAD_CONSTs is replaced with a single LOAD_CONST followed by UNPACK_SEQUENCE. For example, "{'a': 1, 'b': 2, 'c': 3}" is currently compiled

[issue33324] Bug in documentation 3.6: string-methods - str.center

2018-04-21 Thread Alfonso Chavez
Change by Alfonso Chavez : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33324] Bug in documentation 3.6: string-methods - str.center

2018-04-21 Thread Alfonso Chavez
New submission from Alfonso Chavez : Hi. In https://docs.python.org/3/library/stdtypes.html#string-methods says: str.center(width[, fillchar]) But, I tried in Windows 10 and Ubuntu Server: >>> var = 'Variable de prueba' >>> str.center(50, var) Traceback (most recent call

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Naris R
New submission from Naris R : if a generator passed to min/max throws an exception, the stack trace is normally shown on the line that caused the exception, but if the exception is a StopIteration, the trace only shows the line where the max/min function was called. I

[issue24027] IMAP library lacks documentation about expected parameter types

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: UTF-7 is tackled in https://bugs.python.org/issue5305 -- nosy: +mcepl ___ Python tracker ___

[issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: ping? -- nosy: +mcepl ___ Python tracker ___ ___

[issue26375] Python 2.7.10 and 3.4.4 hang on imaplib.IMAP4_SSL()

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: Are you able to reproduce it with IMAP4.debug value set to 3 or more? Clean up passwords etc. and paste the log here, please. Thank you. -- nosy: +mcepl ___ Python tracker

[issue18280] Documentation is too personalized

2018-04-21 Thread Matej Cepl
Matej Cepl added the comment: What about WONTFIX here? I completely agree with rhettinger: this is a waste of time with potential for causing damage. -- nosy: +mcepl ___ Python tracker

[issue5305] imaplib should support international mailbox names

2018-04-21 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13940] imaplib: Mailbox names are not quoted

2018-04-21 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32799] returned a result with an error set

2018-04-21 Thread Xiang Zhang
Xiang Zhang added the comment: Our application also runs into this error today and this is an occasional error that we didn't encounter before and can't reproduce currently. Although our application uses the outdated 2.7.5 but the problem looks similar. Our exception

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2018-04-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> needs patch ___ Python tracker ___

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! A color tuple will likely be used in '#%02x%02x%02x' % color, and this will fail because %x works only with integers (in general sense). Therefore returning a tuple of floats is a bug. The downside is that we loss

[issue33322] Overridden __getitem__ not called on use of slice syntax when inheriting from tuple

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Python 2 things are more complex than in Python 3. You have to define __getslice__ for handling the case of literal slices. This was fixed in Python 3. -- nosy: +serhiy.storchaka

[issue33322] Overridden __getitem__ not called on use of slice syntax when inheriting from tuple

2018-04-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: In Python 2, you have to override __getslice__ as well as __getitem__. Try this instead: class MyTuple(tuple): def __getitem__(self, pos): print "get item {}".format(pos) return super(MyTuple,

[issue33318] Move folding tuples of constants into compiler.c from peephole.c

2018-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For clarifying, this issue doesn't have any relations to the AST optimizer. Tuples of constants are already optimized at the AST level, but there are other tuples created in code, which don't correspond any AST node. They are

[issue33322] Overridden __getitem__ not called on use of slice syntax when inheriting from tuple

2018-04-21 Thread Jacob Thalman
New submission from Jacob Thalman : class MyTuple(tuple): def __getitem__(self, item): print "Getting {}".format(item) t = MyTuple((1, 2)) t[0] -> "Getting 0" t[1] -> "Getting 1" t[slice(None)] -> "Getting slice(None, None, None)" t[:] -> (1, 2) t[slice(None,