[issue32055] Reconsider comparison chaining for containment tests

2017-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: `a in b < c` makes sense if b and c are sets. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue32053] Inconsistent use of tabs and spaces in indentation not always detected

2017-11-17 Thread Stefan Krah
Change by Stefan Krah : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> TabError behavior doesn't match documentation ___ Python tracker

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My model is the same as the Martin's one. I know how to implement this, but the code isn't simple. I'm going to do this after fixing other bugs in the tokenizer. -- nosy: +serhiy.storchaka priority: normal -> low versions: +Python 3.7 -Python 3.4 _

[issue32055] Reconsider comparison chaining for containment tests

2017-11-17 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, there are definitely cases where the answer isn't nonsense. Even for sets though, "a in b < c" isn't an intuitive spelling of "a in b and b < c" the way that "a < b < c" is an intuitive spelling of an ordering relation. Hence filing this as a low priority

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Stefan Krah
Stefan Krah added the comment: I'm now in the camp of forbidding tabs. When I wrote my own parser a couple of years ago, I tested it on a huge body of Python files that were present on my system. Tabs always looked accidental. Is there any *known* code base that deliberately uses tabs?

[issue32055] Reconsider comparison chaining for containment tests

2017-11-17 Thread Nick Coghlan
Nick Coghlan added the comment: Just a note on why I find "a in b < c" unintuitive, even for sets: my brain initially wanted to read it as equivalent to "a in b & c". -- ___ Python tracker __

[issue29185] test_distutils fails on Android API level 24

2017-11-17 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4380 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32056] bug in Lib/wave.py

2017-11-17 Thread 张德岳
New submission from 张德岳 : I found a bug in wave.py because there is no check for self._channel in _read_fmt_chunk function. When I try to open a wav file which channel is zero, it will crash bacause of divided by zero in initfp function. -- components: Library (Lib) files: audio-testca

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Lets not continue a holy war here. I'm in the camp of tab-indenters. -- ___ Python tracker ___ _

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Stefan Krah
Stefan Krah added the comment: python-dev is becoming insufferable. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: The error: generic_x86_64:/data/local/tmp/python $ python -m test test_pydoc Run tests sequentially 0:00:00 [1/1] test_pydoc test test_pydoc failed -- Traceback (most recent call last): File "/sdcard/org.python/lib/python3.7/test/test_pydoc.py", line 459, in

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: The path returned by inspect.getabsfile(xml.etree.ElementTree) is not the canonical path, hence the test failure. -- ___ Python tracker ___ _

[issue32056] bug in Lib/wave.py

2017-11-17 Thread zhangdeyue
Change by zhangdeyue : -- keywords: +patch pull_requests: +4382 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue31867] Duplicated keys in MIME type_map with different values

2017-11-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset f02f5e5c3eb815fff9578dc58de60374c6baaa3d by Andrew Svetlov (Henk-Jaap Wagenaar) in branch 'master': bpo-31867: Remove duplicates in default mimetypes. (#4388) https://github.com/python/cpython/commit/f02f5e5c3eb815fff9578dc58de60374c6baaa3d ---

[issue31867] Duplicated keys in MIME type_map with different values

2017-11-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: Henk-Jaap thanks for contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32057] time.sleep(n) interrupted by signal

2017-11-17 Thread Bogdan Popa
New submission from Bogdan Popa : I ran into this while backporting some code from 3.6 to 3.5 and 3.4. The following piece of code prints one line every second, as expected, on 3.6 and 3.5, but it doesn't on 3.4. It looks like the signal is able to wake up the main thread from sleeping: ``` i

[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-17 Thread Xavier de Gaye
Change by Xavier de Gaye : -- keywords: +patch pull_requests: +4383 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyt

[issue32057] time.sleep(n) interrupted by signal

2017-11-17 Thread Bogdan Popa
Bogdan Popa added the comment: I forgot to mention that I am on macOS Sierra (10.12.6) and I ran the code on Python 3.4.6, 3.5.3 and 3.6.3, respectively. -- ___ Python tracker ___

[issue32057] time.sleep(n) interrupted by signal

2017-11-17 Thread STINNER Victor
STINNER Victor added the comment: I'm sorry but Python 3.4 doesn't accept bugfixes anymore. Same for Python 3.5. https://devguide.python.org/#status-of-python-branches > The following piece of code prints one line every second, as expected, on 3.6 > and 3.5 Good, at least Python behaves as yo

[issue32057] time.sleep(n) interrupted by signal

2017-11-17 Thread Bogdan Popa
Bogdan Popa added the comment: Fair enough. From reading PEP 475, it does look like that's what fixed it. Thanks Victor! -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue32058] Faulty behaviour in email.utils.parseaddr if square brackets in subject

2017-11-17 Thread tom de wulf
New submission from tom de wulf : Probably a parsing bug in email.utils.parseaddr. How to recreate: >>> import email.utils >>> test = 'Subject: I am a bug [Random]\r\nFrom: someone >>> \r\n\r\n' >>> email.utils.parseaddr(test) ('', 'I') >>> email.utils.parseaddr(test.replace('[', '').replace('

[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-17 Thread Xavier de Gaye
New submission from Xavier de Gaye : When cross-compiling, the gcc and clang `--sysroot=` compiler option may be used to change the logical path of the system headers and libraries to a path located within the install path of the cross-compiler tool chain. Android is a special case: --

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread Alex Corcoles
New submission from Alex Corcoles : Hi, $ python3 Python 3.5.3 (default, Jan 19 2017, 14:11:04) >>> import abc >>> class Foo(abc.ABC): ... pass ... >>> Foo() <__main__.Foo object at 0x7f253e6dcb38> I think declaring a class as ABC without declaring any abstract method is an error. I've

[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2017-11-17 Thread Antti Haapala
Antti Haapala added the comment: "Antti, is there a place in the ctypes documentation that explicitly says ctypes is not meant to be used cross-platform? If not, shouldn't that be mentioned?" I don't know about that, but the thing is nowhere does it say that it is meant to be used cross-plat

[issue32058] Faulty behaviour in email.utils.parseaddr if square brackets in subject

2017-11-17 Thread R. David Murray
R. David Murray added the comment: parseaddr is for parsing the contents of an address header, not for parsing any additional text. So the correct way to call it is parseaddress('someone '). In any case, please look in to the new email policies, which provide a much more convenient API:

[issue32058] Faulty behaviour in email.utils.parseaddr if square brackets in subject

2017-11-17 Thread tom de wulf
tom de wulf added the comment: I do get this data from an IMAP fetch statement, see my code below: rv, data = imap.fetch(num, "(BODY[HEADER.FIELDS (FROM SUBJECT)])") if rv != 'OK': logging.error("Error getting message sender and subject (" + num.decode("ascii") + ")") r

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread R. David Murray
R. David Murray added the comment: No, you could create an ABC whose only purpose was to be a target of register calls. As with the issue you reference, this is something better implemented in a linter. I'll leave this open for at least one other dev to concur and close, though. --

[issue32058] Faulty behaviour in email.utils.parseaddr if square brackets in subject

2017-11-17 Thread R. David Murray
R. David Murray added the comment: Unfortunately the imap module in the stdlib doesn't provide a whole lot in the way of tools for parsing the imap data, just for sending it back and forth to the server. -- ___ Python tracker

[issue30004] in regex-howto, improve example on grouping

2017-11-17 Thread Cristian Barbarosie
Cristian Barbarosie added the comment: I'm sorry, I have no experience at all with Git. Could you please do it for me ? The bug appears in two places, see my first two messages. Thank you -- ___ Python tracker __

[issue24260] TabError behavior doesn't match documentation

2017-11-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue30004] in regex-howto, improve example on grouping

2017-11-17 Thread Mandeep Bhutani
Mandeep Bhutani added the comment: Serhiy, Christian: I'll submit a PR for this later today. -- ___ Python tracker ___ ___ Python-bu

[issue32061] test_httpservers.test_undecodable_filename() fails with [Errno 92] Illegal byte sequence on macOS Sierra

2017-11-17 Thread STINNER Victor
New submission from STINNER Victor : x86-64 Sierra 3.6 failure: http://buildbot.python.org/all/#/builders/20/builds/81 == ERROR: test_undecodable_filename (test.test_httpservers.SimpleHTTPServerTestCase) ---

[issue32062] test_venv fails if zlib is not available

2017-11-17 Thread STINNER Victor
New submission from STINNER Victor : test_venv should skip test_with_pip() test when the zlib module is missing. x86-64 Sierra 3.6 failure: http://buildbot.python.org/all/#/builders/20/builds/62 test_with_pip (test.test_venv.EnsurePipTest) ... FAIL =

[issue32063] test_multiprocessing_forkserver failed with OSError: [Errno 48] Address already in use

2017-11-17 Thread STINNER Victor
New submission from STINNER Victor : x86-64 Sierra 3.6: http://buildbot.python.org/all/#/builders/20/builds/62 0:06:16 load avg: 3.45 [ 87/405/1] test_multiprocessing_forkserver failed -- running: test_tokenize (77 sec) Process QueueManager-260: Traceback (most recent call last): File "/User

[issue32062] test_venv fails if zlib is not available

2017-11-17 Thread STINNER Victor
STINNER Victor added the comment: Oh, Serhiy already fixed it: bpo-31999. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_venv failed when the zlib module is not available ___ Python tracker

[issue32061] test_httpservers.test_undecodable_filename() fails with [Errno 92] Illegal byte sequence on macOS Sierra

2017-11-17 Thread STINNER Victor
STINNER Victor added the comment: Oh, it's a duplicate of bpo-31380. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS ___ Python tracke

[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-11-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue30004] in regex-howto, improve example on grouping

2017-11-17 Thread Mandeep Bhutani
Change by Mandeep Bhutani : -- keywords: +patch pull_requests: +4384 stage: needs patch -> patch review ___ Python tracker ___ ___ Py

[issue30004] in regex-howto, improve example on grouping

2017-11-17 Thread Mandeep Bhutani
Mandeep Bhutani added the comment: Cristian, Serhiy: I've submitted a PR for this bug. Cristian: I apologize for misspelling your name in a prior post. -- ___ Python tracker

[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: > while on a standard platform where the root path of usr/include and usr/lib > is common, one would only need to set sysroot to this root path in CFLAGS s/CFLAGS/CC/ -- ___ Python tracker

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28414] SSL match_hostname fails for internationalized domain names

2017-11-17 Thread Nick Lamb
Nick Lamb added the comment: As much for myself when I next run into this on my checklist as for any other readers: Despite the appearance of nothing happening PR 3010 (linked) actually has a little bit of momentum and seems likely to eventually land in Python. -- ___

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread Alex Corcoles
Alex Corcoles added the comment: Are you referring to something akin to Java's marker interfaces? That is, a class with no methods which you inherit from just for semantic meaning (e.g. Java's serializable interface that you implement to indicate that the class is designed for pickling). In

[issue32016] Python 3.6.3 venv FAILURE

2017-11-17 Thread Éric Araujo
Éric Araujo added the comment: Can you find out the full error message from pip? -- nosy: +eric.araujo ___ Python tracker ___ ___ Py

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread R. David Murray
R. David Murray added the comment: The docs start out with "as outlined in PEP 3119; see the PEP for why this was added to Python". I think it would be a good doc enhancement request to extract the motivation and other description out of that pep and put it in the main docs in a suitable for

[issue32046] 2to3 fix for operator.isCallable()

2017-11-17 Thread Guido van Rossum
Guido van Rossum added the comment: I would convert this to `callable()` -- the conversion to collections.abc.Callable is more verbose and requires an extra import (that can be slow). -- nosy: +gvanrossum ___ Python tracker

[issue32060] Should an ABC fail if no abstract methods are defined?

2017-11-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I should have add a bit more explanation. The logic for ABCs instantiation is roughly: if any(method.is_abstract() for method in dir(cls)): raise TypeError('I refuse to instantiate') inst = instantiate(cls) The edge case for any() is

[issue32064] python msilib view.fetch is not returning none

2017-11-17 Thread uday kiran
New submission from uday kiran : Please see my script attached. Once the records are completed, the View.Fetch() function should give a none value but intsead giving runtime error: _msi.MSIError: unknown error 103 It is already mentioned in the bugs. https://bugs.python.org/issue29364 https://

[issue32064] python msilib view.fetch is not returning none

2017-11-17 Thread uday kiran
uday kiran added the comment: It seems you have added some patches as .c files, but how do we apply those on windows machines? No documentation related to it. https://bugs.python.org/file24795/_msi_fetch.patch.txt https://bugs.python.org/file11840/_msi.patch.txt Could you please help me how t

[issue31691] Include missing info on required build steps and how to build installer

2017-11-17 Thread Ivan Pozdeev
Change by Ivan Pozdeev : Removed file: https://bugs.python.org/file47260/0001-Add-missing-but-required-build-steps-and-how-to-buil.patch ___ Python tracker ___

[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread yegle
New submission from yegle : This also affects xrange in Python2, so I chose the affected version as python27. range object (and xrange in Python2) has __len__(), but the range_iterator object created from __reversed__() doesn't have __len__. Python2: >>> x = xrange(10) >>> len(x) 10 >>> rever

[issue32066] asyncio: Support pathlib.Path in create_unix_connection; sock arg should be optional

2017-11-17 Thread Yury Selivanov
Change by Yury Selivanov : -- components: asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio: Support pathlib.Path in create_unix_connection; sock arg should be optional versions: Python 3.6, Python 3.7 _

[issue32066] asyncio: Support pathlib.Path in create_unix_connection; sock arg should be optional

2017-11-17 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4386 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Steve Dower
Steve Dower added the comment: SetUnhandledExceptionFilter could be a good option. I suspect the difference between that and AddVectorContinueHandler are because of the weird prioritization of the two types of handler, and are probably not significant enough to worry about here. --

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread STINNER Victor
STINNER Victor added the comment: > I suspect the difference between that and AddVectorContinueHandler are > because of the weird prioritization of the two types of handler, and are > probably not significant enough to worry about here. Ok, thanks. I close the issue since the initial bug has

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Steve, the difficulty with SetUnhandledExceptionFilter is that it can replace filter installed by the user (e.g. one of loaded libraries). The information about AddVectoredContinueHandler is scarce, but according to what I found at [1]: If the exception is sti

[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread yegle
yegle added the comment: Hmm I think this also applies to list_listiterator. In general I'd expect these to be true: l = [1,2,3] r = range(3) assert len(l) == len(reversed(l)) assert len(r) == len(reversed(r)) -- ___ Python tracker

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Please ignore everything I said about AddVectoredContinueHandler. I finally got a chance to test the code on Windows and the way it's called is not suitable for faulthandler. -- ___ Python tracker

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread STINNER Victor
STINNER Victor added the comment: > Please ignore everything I said about AddVectoredContinueHandler. I finally > got a chance to test the code on Windows and the way it's called is not > suitable for faulthandler. Oh, good to know. Thank you for having tested that ;-) At least, it seems lik

[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread R. David Murray
R. David Murray added the comment: By design, iterators do not have a length (see msg248496). -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker _

[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2017-11-17 Thread Charles Machalow
Charles Machalow added the comment: All of Python is implicitly cross platform. If something isn't actually cross platform, it should be mentioned explicitly in the documentation. For example see the mmap documentation, it explicitly say on Unix it does X, on Windows it does Y. We should be a

[issue31643] test_uuid: test_getnode and test_windll_getnode fail if connected to the Internet via an Android phone

2017-11-17 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- pull_requests: +4387 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Victor, it's very helpful to analyze which Python stack caused exceptions in native code on user's machines. -- ___ Python tracker ___

[issue32064] python msilib view.fetch is not returning none

2017-11-17 Thread uday kiran
uday kiran added the comment: I tried adding the bugs to the python source code and compile it by using the steps in https://docs.python.org/devguide/ and the fix in https://bugs.python.org/file24795/_msi_fetch.patch.txt, but ended up with many compilation errors --

[issue32022] Python crashes with mutually recursive code

2017-11-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The RESTART line means that you ran this in IDLE and that your program crashed the separate (sub)process that was running your code. When IDLE notices this, it starts a new subprocess. To test whether this is an IDLE-only problem, I ran your code without IDL

[issue32022] Python crashes with mutually recursive code

2017-11-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is possible that this is a duplicate of an existing crash report, but I am not familiar with such at all. With only the standard, non-specific error message, it is hard to search ;-). What OS are you using? -- __

[issue32022] Python crashes with mutually recursive code

2017-11-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe I used the 2nd version of kakuru.py. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue32050] Deprecated python3 -x option

2017-11-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: So the hack is not specific to DOS but is still needed for Windows .bat files. They run in Command Prompt, which was once called the DOS box. (I don't know if they work unaltered in PowerShell.) It seems that the doc should be updated. -- nosy: +ter

[issue32022] Python crashes with mutually recursive code

2017-11-17 Thread Shimon Malachi Cohen
Shimon Malachi Cohen added the comment: Cool, thanks! On Nov 18, 2017 5:29 AM, "Terry J. Reedy" wrote: > > Terry J. Reedy added the comment: > > I believe I used the 2nd version of kakuru.py. > > -- > > ___ > Python tracker >

[issue32022] Python crashes with mutually recursive code

2017-11-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: PS. When you respond by EMail, please delete the quoted message, as it is redundant, on the web page, with the original copy above. -- ___ Python tracker __

[issue32050] Deprecated python3 -x option

2017-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The current short line of the description was enough to me for understanding what is the purpose of this option and how it can be used (I didn't use Windows for more than 10 years). But I was surprised not founding more detailed information about this featu