[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +Martin Teichmann, Martin.Teichmann stage: -> needs patch ___ Python tracker ___

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe there is a bug in using __set_name__. Usually special methods are looked in class dict. But __set_name__ is looked in instance dict. This causes to invoking __getattr__. -- nosy: +serhiy.storchaka ___

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-20 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: With this change: (tested with OpenSSL git-master) @@ -632,20 +651,22 @@ newPySSLSocket(PySSLContext *sslctx, PyS SSL_set_bio(self->ssl, inbio->bio, outbio->bio); } mode = SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER; #ifdef SSL_MODE_AUTO_RETRY

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread R. David Murray
R. David Murray added the comment: You have to call wait_closed to complete the shutdown. This should probably be mentioned directly in the socket server docs (at least in the examples) (assuming I'm not wrong...but I'm pretty sure I'm right) rather than by implicit reference to Server via

[issue24416] Return a namedtuple from date.isocalendar()

2016-09-20 Thread Tal Einat
Tal Einat added the comment: Regarding the name "IsoCalendarDate", see for example this question on Stack Overflow[1] where both of the leading answers suggest beginning with "Iso" or "iso" rather than "ISO". However, taking a look at the relatively new module urllib.request[2], it uses names

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Константин Волков
Константин Волков added the comment: Thats not a thing I talking about. But thanks for "wait_closed", I will be use it in future ) Im talking about reading tasks.When reader removed from selector, there is reading task for it. Loop do "cancel" for it, but it not really cancelling task. Its only

[issue28215] PyModule_AddIntConstant() wraps >=2^32 values when long is 4 bytes

2016-09-20 Thread Christian Heimes
Christian Heimes added the comment: The constant is an unsigned long but PyModule_AddIntConstant() takes a signed long. You have to write your own function that uses PyLong_FromUnsignedLong() and PyModule_AddObject(). Do you get a compiler warning because 0x8000U is larger than (1<<31)-1?

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-20 Thread Christian Heimes
Christian Heimes added the comment: Yes, I'm planning to use the feature in 3.7. First I have to finish my PEP and get consents that I can drop support for OpenSSL 1.0.1 and earlier. We still support older versions but the feature is only available in 1.0.2+. I also need to come up with a

[issue28215] PyModule_AddIntConstant() wraps >=2^32 values when long is 4 bytes

2016-09-20 Thread Kyle Altendorf
New submission from Kyle Altendorf: I am cross compiling Python 3.5.2 for use on a 32-bit ARM processor with Linux. I use socket.CAN_EFF_FLAG and noticed that it is negative on the target despite being positive on my host (64-bit Intel Linux). Host: altendky@tp:~$ uname -a Linux tp

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-20 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: That's great. OpenSSL plans to drop 1.0.1 branch support after 2016/12/31. [1] I guess it's OK to drop 1.0.1 support in 3.7. Thanks for constantly improving SSL/TLS support in CPython! [1] https://www.openssl.org/source/ --

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-20 Thread Christian Heimes
Christian Heimes added the comment: I'm familiar with the release cycles of OpenSSL. In fact I want to tie support for OpenSSL versions to the release cycle of OpenSSL. Python core dev is a bit ... special. :) I can't just drop support. Some developers are opposing my plans and want to keep

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-20 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: > I'm familiar with the release cycles of OpenSSL. Oh I shouldn't say something trivial :) I know that thread. Hope I can help something on persuading others. -- ___ Python tracker

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes class creation code not looking up the __set_name__ attribute in instance dict. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44757/lookup___set_name__.patch

[issue1602] windows console doesn't print or input Unicode

2016-09-20 Thread Dāvis
Dāvis added the comment: Steve Dower (steve.dower) > [...] > Anything else requires a real console with a real person with a real keyboard. FYI, not really, it is possible to fully automatically test console's output/input using WinAPI functions like WriteConsoleInput,

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Константин Волков
Константин Волков added the comment: Yes? may be a in a hour, 2016-09-20 18:12 GMT+03:00 Guido van Rossum : > > Guido van Rossum added the comment: > > Can you please supply a complete example? > > --Guido (mobile) > > -- > >

[issue28201] dict: perturb shift should be done when first conflict

2016-09-20 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file44759/dict-perturb-shift.patch ___ Python tracker

[issue28216] micro optimization for import_all_from

2016-09-20 Thread Xiang Zhang
New submission from Xiang Zhang: Since PyMapping_Keys always return a list or tuple and most __all__s are list (all in stdlib), I think we can avoid calling PySequence_GetItem for every key and use PySequence_Fast* APIs instead. This doesn't help much since other operations involved are

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: The information we want to include in the chained exception: 1. The name of the offending attribute (since the traceback will point to the class header, not to the assignment) 2. The repr of the offending attribute (since the innner exception will refer to the

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In any case I suggest to raise an AttributeError for dunder names in __getattr__ implementation. Otherwise you will encounter similar issue with pickling. -- ___ Python tracker

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: Can you please supply a complete example? --Guido (mobile) -- ___ Python tracker ___

[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread

2016-09-20 Thread Xavion
Xavion added the comment: haypo: So, what is the result when you run "Test-2.py" and monitor the memory usage with "Test.sh"? ztane: The code you've provided is the same as "Test-1.py". You need to run "Test-2.py" in order to see the bug! -- ___

[issue24416] Return a namedtuple from date.isocalendar()

2016-09-20 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I updated the patch based on Raymond's feedback. I don't know C at all and I tried to mimic the namedtuple usage of timemodule.c as much as I could (until the code compiled and the test suite passed). I still have two questions: * It seems that the Python

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-20 Thread Xiang Zhang
New submission from Xiang Zhang: PyMapping_Keys/Values/Items can only return a list or tuple. Even in the case of a dict, it returns a list. But the doc tells a dictionary view will be returned in case of dict, which is wrong. -- assignee: docs@python components: Documentation files:

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Константин Волков
New submission from Константин Волков: When you close asyncio socket server it closes all connection sockets, remove its readers and do "cancel" for readers. Problem is that, that after this reader tasks are leaved alone in "cancelling" state. They wouldn`t be really cancelled, because they

[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: Test-2.py has issues: * it doesn't call Timer.join() * it uses a weak synchronization between the main thread and the Timer thread: see msg276990 for an example using Event If you use a better synchronization code, call timer.join() and call gc.collect(),

[issue28210] argparse with subcommands difference in python 2.7 / 3.5

2016-09-20 Thread stephan
New submission from stephan: In python 2.7.12 I get an error if I do not pass arguments, while in python 3.5.2 I do not get the error (it fails silently). Stumbled on this during my migration of my python 2.7 code to python 3.5 for django. Here is the console output: D:\util\python\test>py -3

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: Thank you! I look forward to the new patch. -- ___ Python tracker ___ ___

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-20 Thread Jack Liu
Jack Liu added the comment: I know there is a workaround to set the global variables to None at last in Python scripts. But my app just provide a framework for my customers to run python scripts. That means the workaround requires my customers to update their python scripts. That may make

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, the documentation was changed in issue25909, but seems I was wrong. Since PyDict_Items() returns a list, but not a dict view, PyMapping_Items() can return only a list or a tuple. -- nosy: +martin.panter, mine0901, orsenthil, python-dev,

[issue28213] asyncio SSLProtocol _app_transport is private

2016-09-20 Thread Константин Волков
New submission from Константин Волков: Seems that this field must not be private(or must have read-only property) as it is supposed to use outside of class. I catched that, when implemented STARTTLS smtp process, when you must start SSL connection over existing socket connection. Currently it

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Changes by Soumya Sharma : Removed file: http://bugs.python.org/file44753/Issue28203#2.patch ___ Python tracker ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Apologies. This is the correct file. -- Added file: http://bugs.python.org/file44754/Issue28203#3.patch ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. We can't fix this in 3.4 because it's in security-fix-only mode: https://docs.python.org/devguide/index.html#status-of-python-branches -- versions: -Python 3.4 ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Squashed the commits for better readability. Also, change required in Python 3.4 as well -- versions: +Python 3.4 Added file: http://bugs.python.org/file44755/Issue28203#4.patch ___ Python tracker

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Tim Graham
New submission from Tim Graham: As requested by Nick [0], this is a usability issue against CPython 3.6 to provide a better chained TypeError in this case: class _TokenType(tuple): parent = None def __getattr__(self, name): new = _TokenType(self + (name,))

[issue1043134] Add preferred extensions for MIME types

2016-09-20 Thread Tom Christie
Tom Christie added the comment: Confirming that I've also bumped into this for Python 3.5. A docs update would seem to be the lowest-cost option to start with. Right now `mimetypes.guess_extension()` isn't terribly useful, and it'd be better to at least know that upfront. -- nosy:

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Changed error message to: >>> complex({1:2},1) Traceback (most recent call last): File "", line 1, in TypeError: complex() first arg must be a string or a number, not 'dict' >>> complex(1j, {1: 2}) Traceback (most recent call last): File "", line 1, in

[issue28217] Add interactive console tests

2016-09-20 Thread Steve Dower
New submission from Steve Dower: We can test the interactive console by opening new console buffers (CONIN$ and CONOUT$) in the test process, then creating a subprocess with those set as the standard handles. Now we can use WriteConsoleInput from the test process to simulate the user typing

[issue28216] micro optimization for import_all_from

2016-09-20 Thread Xiang Zhang
Xiang Zhang added the comment: As pointed out by Serhiy, PyObject_GetAttr may change __all__ so my proposal is not going to work. Close this and sorry for noise. :-( -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue28215] PyModule_AddIntConstant() wraps >=2^32 values when long is 4 bytes

2016-09-20 Thread Christian Heimes
Christian Heimes added the comment: Oh sorry, I missed the point that you are talking about an existing constant in the socket module. At first I thought that you were referring to a constant that you have added. It sounds like a bug for constants >= 2**31. -- nosy: +haypo

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Константин Волков
Константин Волков added the comment: Attached file with test example. There in "ping" task "except" and "finally" sections never called as expected (but code inside "try" will work). Server is closed while client connection is active, and it just removes reading task from loop. You can still

[issue1602] windows console doesn't print or input Unicode

2016-09-20 Thread Steve Dower
Steve Dower added the comment: Oh nice, I like that. We should definitely add some tests using that (though it seems like quite a big task... maybe I'll open a new issue for it). -- ___ Python tracker

[issue1602] windows console doesn't print or input Unicode

2016-09-20 Thread Steve Dower
Steve Dower added the comment: Created issue28217 for adding these tests. -- superseder: -> Add interactive console tests ___ Python tracker ___

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-20 Thread Eric Snow
Eric Snow added the comment: I agree with Serhiy that __set_name__ should be looked up on the class like all other special methods. Pickle is a great example why lookup (of __reduce__) on the instance is a pain. -- nosy: +eric.snow ___ Python

[issue22542] Use arc4random under OpenBSD for os.urandom() if /dev/urandom is not present

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: "Trying to run the python interpreter in a chroot fails if /dev/urandom is not present." The workaround is simple: fix your chroot to correctly expose /dev/urandom in the chroot. It's a common and known issue, no? Since the issue is almost dead since 2 years

[issue28217] Add interactive console tests

2016-09-20 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file44765/conout.py ___ Python tracker ___

[issue27282] Raise BlockingIOError in os.urandom if kernel is not ready

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: This idea is the PEP 522 which was superseded by the PEP 524 (accepted in Python 3.6) which proposed to make os.urandom() blocking. -- nosy: +haypo resolution: -> rejected status: open -> closed ___ Python tracker

[issue25470] Random Malloc error raised

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 got a builtin debugging tool to detect buffer under- and overflow: PYTHONMALLOC=debug https://docs.python.org/dev/whatsnew/3.6.html#pythonmalloc-environment-variable In most cases, an error in PyObject_Free() is a hint of a buffer overflow. So I

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Xavion added the comment: Firstly, you've misquoted me. The quote you attributed to me in your latest post was actually made by 'ztane'. Secondly, your extra thread/event code makes no difference here. I will attach the memory usage logs in subsequent posts. For consistency, I have removed

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44763/Test-3a-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44762/Test-3a-no-gc.log ___ Python tracker ___

[issue28217] Add interactive console tests

2016-09-20 Thread Eryk Sun
Eryk Sun added the comment: Here's the ctypes code (mentioned on issue 1602) for writing to the input buffer and reading from the screen buffer. For output testing I also have a context manager to create and temporarily activate a new screen buffer with a given number of columns and rows and

[issue28220] argparse's add_mutually_exclusive_group() should accept title and description

2016-09-20 Thread Berker Peksag
Berker Peksag added the comment: Unless I'm missing something, this is a duplicate of issue 17218 :) -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> support title and description in argparse add_mutually_exclusive_group

[issue28213] asyncio SSLProtocol _app_transport is private

2016-09-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: -1, agree with Yury. As an option it's possible to wrap `sslproto.SSLProtocol` by custom derived class which overrides `connection_made()` for storing a transport somewhere. The solution looks like sub-optimal but it's backward-compatible. The other problem is:

[issue28215] PyModule_AddIntConstant() wraps >=2^31 values when long is 4 bytes

2016-09-20 Thread Kyle Altendorf
Kyle Altendorf added the comment: I do not seem to be getting a compiler warning. arm-fsl-linux-gnueabi-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-statement -I. -IInclude -I./Include

[issue28215] PyModule_AddIntConstant() wraps >=2^31 values when long is 4 bytes

2016-09-20 Thread Kyle Altendorf
Kyle Altendorf added the comment: A little macro funny business gets a function the ability to know if the type passed to its wrapping macro is signed or not. http://ideone.com/NZYs7u // http://stackoverflow.com/questions/7469915 #define IS_UNSIGNED(v) (v >= 0 && ~v >= 0) #define F(v)

[issue27955] getrandom() syscall returning EPERM make the system unusable.

2016-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41e9e711b9b5 by Victor Stinner in branch '3.5': Cleanup random.c https://hg.python.org/cpython/rev/41e9e711b9b5 New changeset ddc54f08bdfa by Victor Stinner in branch '3.5': Catch EPERM error in py_getrandom()

[issue28220] argparse's add_mutually_exclusive_group() should accept title and description

2016-09-20 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: I'd love to sneak this into 3.6, but I can accept being too late. In any case, _MutuallyExclusiveGroup.__init__() should accept title and description arguments and pass them to the super class. Otherwise, you can't great a mutually exclusive group that

[issue27778] PEP 524: Add os.getrandom()

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: I pushed the fix for the issue #27955, os.urandom() now handles getrandom() failing with EPERM. @Christian: Thanks for your review, I pushed a change fixing the two issues that you reported (memory leak and inefficient temporarily buffer). I attached

[issue27955] getrandom() syscall returning EPERM make the system unusable.

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: I modified Python 3.5, 3.6 and 3.7 to fall back on reading /dev/urandom when getrandom() syscall fails with EPERM. Thanks for the bug report iwings! Note: Python 2.7 does not use getrandom() and so is not impacted. Christian: > Did you open a bug with your

[issue27778] PEP 524: Add os.getrandom()

2016-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset d31b4de433b7 by Victor Stinner in branch '3.6': Fix memleak in os.getrandom() https://hg.python.org/cpython/rev/d31b4de433b7 -- ___ Python tracker

[issue28220] argparse's add_mutually_exclusive_group() should accept title and description

2016-09-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Hmm, it might be more complicated than that, so let's ignore 3.6 -- versions: -Python 3.6 ___ Python tracker ___

[issue28220] argparse's add_mutually_exclusive_group() should accept title and description

2016-09-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: The workaround is to do something like: group = parser.add_argument_group(title, description) me_group = group.add_mutually_exclusive_group() me_group.add_argument(...blah blah blah...) -- ___ Python tracker

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue28207] SQLite headers are not searched in custom locations

2016-09-20 Thread Santiago Castro
Santiago Castro added the comment: I tried with pyenv (https://github.com/yyuu/pyenv): pyenv install 3.5.2. Maybe the error is from their side, but basically it downloads Python and compiles it: https://github.com/yyuu/pyenv/blob/master/plugins/python-build/install.sh#L24 --

[issue28213] asyncio SSLProtocol _app_transport is private

2016-09-20 Thread Yury Selivanov
Yury Selivanov added the comment: -1 on exposing app_protocol. It's an implementation detail, starttls should be implemented in asyncio (and while it's not, it's ok to use '_app_protocol'. -- ___ Python tracker

[issue27990] Provide a way to enable getrandom on Linux even when build system runs an older kernel

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: I'm not excited by the idea of using hardcoded constants for getrandom(). There is a risk of using wrong constants depending on the architecture or the Linux kernel version. The code is already very low-level: it calls directly the syscall using syscall()

[issue27292] Warn users that os.urandom() prior to 3.6 can return insecure values

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: > Please ensure that the documentation properly warns users about these edge > cases. I disagree. I don't think that the Python documentation is the right place to document the security level of system urandom. It's just a mess, there are so many corner

[issue15797] bdist_msi does not pass -install/remove flags to install_script

2016-09-20 Thread Petri Savolainen
Petri Savolainen added the comment: Any chance the patch could be processed? -- nosy: +petri versions: +Python 3.4, Python 3.5 ___ Python tracker ___

[issue28218] Windows docs have wrong versionadded description

2016-09-20 Thread Steve Dower
New submission from Steve Dower: At https://docs.python.org/3.6/using/windows.html#finding-modules the versionadded description needs the reference to `sys.path file` removed. -- assignee: steve.dower messages: 277058 nosy: steve.dower priority: normal severity: normal stage: needs

[issue15797] bdist_msi does not pass -install/remove flags to install_script

2016-09-20 Thread Petri Savolainen
Petri Savolainen added the comment: If I understood the patch correctly, while adding the '-install' and '-remove' arguments, the patch also removes sys.argv[0], ie. the (install) script name. Why? That also changes the the documented behavior. The patch also appears to add an uninstall

[issue28213] asyncio SSLProtocol _app_transport is private

2016-09-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +asvetlov ___ Python tracker ___ ___

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-20 Thread Elias Zamaria
Elias Zamaria added the comment: Ethan, by "Ned", I am guessing that you are referring to Ned Batchelder. Is that right? If so, do we need to put him on the nosy list or do anything else to bring this to his attention? -- ___ Python tracker

[issue28219] Is order of argparse --help output officially defined?

2016-09-20 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: Sometimes we want to control the order of arguments printed by an argparse defined cli. In practice, arguments are printed in the order in which they are added via add_argument(), but I don't think this is documented and thus should be considered an

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: It's a known annoying issue. Honestly I don't know how to fix it properly. `transport.close()` is affected also because `protocol.connection_lost()` is called on next loop iteration only. Adding a small `asyncio.sleep()` between finishing all worn and loop

[issue28212] Closing server in asyncio is not efficient

2016-09-20 Thread Константин Волков
Константин Волков added the comment: Seems that its not so hard - in loop.remove_reader add self._ready.append(reader) after reader.cancel() May be its needed to check that its not already there, but I cant imagine how it can be. 2016-09-20 23:16 GMT+03:00 Andrew Svetlov

[issue22431] Change format of test runner output

2016-09-20 Thread Tim Graham
Tim Graham added the comment: Is there opposition to changing the default output as outlined in the first comment? If so, then I think this ticket should be closed or retitled to reflect the intent. -- nosy: +Tim.Graham ___ Python tracker

[issue22431] Change format of test runner output

2016-09-20 Thread R. David Murray
R. David Murray added the comment: My understanding of the comments is that the change to the default is OK (in a feature release, at least). -- versions: +Python 3.7 -Python 3.5 ___ Python tracker

[issue28221] Unused indata in test_ssl.ThreadedTests.test_asyncore_server

2016-09-20 Thread Martin Panter
New submission from Martin Panter: In r62273 (Apr 2008), method testAsyncoreServer() was added to the py3k branch with indata="FOO\n". In r64578 (Jun 2008), this test method was added to the Py 2 branch, but with indata = "TEST MESSAGE of mixed case\n". Later, r80598 added the mixed case line

[issue17218] support title and description in argparse add_mutually_exclusive_group

2016-09-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue22431] Change format of test runner output

2016-09-20 Thread Tim Graham
Tim Graham added the comment: Here's the patch if we make the change in Django instead: https://github.com/cjerdonek/django/commit/9c8d162f3f616e9d9768659a06fcf27bb389214b -- ___ Python tracker

[issue22431] Change format of test runner output

2016-09-20 Thread Robert Collins
Robert Collins added the comment: +1 to changing the UI for 3.7 - just noting that if you're machine processing the output, the TUI isn't an appropriate channel. -- ___ Python tracker

[issue28201] dict: perturb shift should be done when first conflict

2016-09-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: General comment on the patch: I believe per PEP7, we're still sticking to ANSI C (aka C89), and specifically, "all declarations must be at the top of a block (not necessarily at the top of function". The patch assumes lax standards compliance (or C99+

[issue28201] dict: perturb shift should be done when first conflict

2016-09-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Removing those unrelated changes looks like it would dramatically reduce the churn too, making review easier. -- ___ Python tracker

[issue28222] test_distutils fails

2016-09-20 Thread Xiang Zhang
New submission from Xiang Zhang: test_distutils consistently fails now: ./python -m test test_distutils Run tests sequentially 0:00:00 [1/1] test_distutils test test_distutils failed -- Traceback (most recent call last): File "/home/angwer/cpython/Lib/distutils/tests/test_check.py", line 122,

[issue13276] bdist_wininst-created installer does not run the postinstallation script when uninstalling

2016-09-20 Thread Petri Savolainen
Changes by Petri Savolainen : -- nosy: +petri ___ Python tracker ___ ___ Python-bugs-list

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-20 Thread Jack Liu
Jack Liu added the comment: The problem is resolved if call PyGC_Collect() after PyDict_DelItemString(). Is it expected to call PyGC_Collect() here? -- ___ Python tracker

[issue28221] Unused indata in test_ssl.ThreadedTests.test_asyncore_server

2016-09-20 Thread Martin Panter
Martin Panter added the comment: Actually in the Py 3 branch, I found an earlier revision that added indata="FOO\n": r59506 (Dec 2007). Anyway, the server in the test case just does a simple lower() call on the data, so I think the simpler FOO line may be fine on its own. -- stage:

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: The fact that it's resolved by PyGC_Collect indicates there is a reference cycle somewhere. PyGC_Collect is just looking for cyclic garbage and breaking the cycles so it can be cleaned; it would happen eventually unless GC was explicitly disabled or the

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-20 Thread Jack Liu
Jack Liu added the comment: Looks to me, there is NO reference cycle on the Simple object in the python test code. Why needs to call PyGC_Collect() here? -- ___ Python tracker

[issue28210] argparse with subcommands difference in python 2.7 / 3.5

2016-09-20 Thread Tim Graham
Tim Graham added the comment: The behavior change is from #10424. Do you believe the new behavior is incorrect? -- nosy: +Tim.Graham ___ Python tracker

[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-09-20 Thread Eryk Sun
Eryk Sun added the comment: For breaking out of the readall while loop, you only need to check if the current read is empty: /* when the read is empty we break */ if (n == 0) break; Also, the logic is wrong here: if (len == 0 || buf[0] == '\x1a' &&

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please output Py_REFCNT(py_module) and Py_REFCNT(py_dict) before deleting the module from sys.modules. Is there a difference between 3.5 and 3.6? -- nosy: +serhiy.storchaka ___ Python tracker

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree with Raymond regarding the performance implications if this isn't handled carefully, I think we're also getting to a point where better accounting for signal handling latency in inner loops is something that could be considered for 3.7 - the