[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, that should have been: if init is MISSING: init = True -- ___ Python tracker ___

[issue29752] Enum._missing_ not called for __getitem__ failures

2018-01-21 Thread Ethan Furman
Ethan Furman added the comment: I'm not convinced this piece needs to be in the stdlib. Unlike other bits that need extensive metaclass support this is trivial to add: class DerivedEnumMeta(EnumMeta): def __getitem__(cls, name): try: return

[issue32617] dict.update does not concat/replace if same key

2018-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: I'm sorry the name is confusing to you, but this behavior is correct, and how dict.update is defined: https://docs.python.org/3.6/library/stdtypes.html#dict.update As such, it cannot be changed. If you want a function that merges values,

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: Only hash has the tri-state True/False/None behavior, defaulting to None. It's this way because None is the "do what's rational, based on eq and frozen" behavior. None of the other parameters work this way. There's a long issue in the

[issue12735] request full Unicode collation support in std python library

2018-01-21 Thread Greg Lindahl
Change by Greg Lindahl : -- nosy: +wumpus ___ Python tracker ___ ___ Python-bugs-list

[issue32618] fix test_codeccallbacks.test_mutatingdecodehandler

2018-01-21 Thread Xiang Zhang
Change by Xiang Zhang : -- keywords: +patch pull_requests: +5112 stage: -> patch review ___ Python tracker ___

[issue32618] fix test_codeccallbacks.test_mutatingdecodehandler

2018-01-21 Thread Xiang Zhang
New submission from Xiang Zhang : test_codeccallbacks.test_mutatingdecodehandler is introduced in e78178e2c05ec2bb628b70a8b5422bb4dae63343. Obviously it should test against both test.replacing and test.mutating but it tests test.replacing twice. -- components: Tests

[issue32617] dict.update does not concat/replace if same key

2018-01-21 Thread Avnish Midha
New submission from Avnish Midha : The dict does not seem to work as one would expect a dictionary or a hashtable to work. dict.update(otherdict) just replaces the entries as per otherdict, removing items which were extra in dict too and just keeping items as per new

[issue4356] Add "key" argument to "bisect" module functions

2018-01-21 Thread Greg Lindahl
Change by Greg Lindahl : -- nosy: +wumpus ___ Python tracker ___ ___ Python-bugs-list

[issue17799] settrace docs are wrong about "c_call" events

2018-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Too bad, it's been like this since the feature was first created. It would most likely break other code that uses the tracing hooks, so you'd have to propose it as a new feature. -- ___ Python

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-21 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-21 Thread Zhiming Wang
New submission from Zhiming Wang : Python 2.7 could be significantly slower (5x in some cases) when compiled with clang 3.x or 4.x, compared to clang 5.x. This is quite a problem on macOS, since the latest clang from Apple (which comes with Xcode 9.2) is based on LLVM 4.x.

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-21 Thread Larry Hastings
Larry Hastings added the comment: Do all the parameters to the decorator take a default value of "None", so that you can differentiate between explicit True, explicit False, and did-not-specify? Is this the complete list of these dunder-method-generation-control

[issue17799] settrace docs are wrong about "c_call" events

2018-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Guido. Looking at the implementation, it seems pdb ignores c_call not by relying on the interpreter, but bdb takes no action when encountering C events. Yeah, even bdb wrongly expects C events will be triggered for settrace. [1] And what if

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: Here is my proposal for making it easier for the user to supply dunder methods that dataclasses would otherwise automatically add to the class. For all of these cases, when I talk about init=, repr=, eq=, order=, hash=, or frozen=, I'm

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 3510334361d6d39aad89e4e0d9bccd0695668583 by Yury Selivanov in branch 'master': bpo-32591: Fix PyExc_WarnFormat call (follow-up commit) (#5263)

[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: The current default is hard to defend -- it's a clear violation of the TLS specs. But I suspect that changing it will be pretty disruptive, because suppress_ragged_eof=True is the de facto standard for HTTP-over-TLS (generally justified on

[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: I converted the patch to a PR. It wouldn't merge which means I did it manually, so please check it for errors. Some issues I ran into: 1. The patch had a change to __slots__, but that line no longer existed and I didn't know if I needed

[issue32615] Inconsistent behavior if globals is a dict subclass

2018-01-21 Thread ppperry
New submission from ppperry : Take the following code: import builtins class K(dict): def __getitem__(self, k): if k not in builtins.__dict__: print("get %s" % k) return dict.__getitem__(self, k)

[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-01-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: Raymond, You approved this PR pending some test cases. Would you have the chance to take another look? Thanks! Oren, it looks like you'll need to rebase before this could be merged. -- nosy: +csabella, rhettinger

[issue32614] Fix documentation examples of using re with escape sequences

2018-01-21 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +5111 stage: -> patch review ___ Python tracker ___

[issue32614] Fix documentation examples of using re with escape sequences

2018-01-21 Thread Cheryl Sabella
New submission from Cheryl Sabella : If a documentation example would produce a DeprecationWarning for an invalid escape sequence, change the example to use a raw string. -- assignee: docs@python components: Documentation messages: 310386 nosy: csabella, docs@python

[issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code

2018-01-21 Thread bbayles
Change by bbayles : -- keywords: +patch pull_requests: +5110 stage: needs patch -> patch review ___ Python tracker ___

[issue32613] Use PEP 397 py launcher in windows faq

2018-01-21 Thread Julien Palard
New submission from Julien Palard : The windows FAQ (https://docs.python.org/3.6/faq/windows.html) uses `python` to launch python, I think it should use the `py` python launcher from pep 397. -- assignee: mdk components: Documentation keywords: easy messages:

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5109 ___ Python tracker ___ ___

[issue32612] pathlib.(Pure)WindowsPaths can compare equal but refer to different files

2018-01-21 Thread benrg
New submission from benrg : (Pure)WindowsPath uses str.lower to fold paths for comparison and hashing. This doesn't match the case folding of actual Windows file systems. There exist WindowsPath objects that compare and hash equal, but refer to different files. For

[issue17799] settrace docs are wrong about "c_call" events

2018-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: The reason not to pass C calls to the tracing function is that tracing exists to support pdb and other debuggers, and pdb only cares about tracing through Python code. So the docs should be updated. -- nosy: +gvanrossum

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5108 stage: -> patch review ___ Python tracker ___

[issue32611] Tkinter taskbar icon (Windows)

2018-01-21 Thread Minion Jim
New submission from Minion Jim : When using Python version 3.6.4, Tkinter shows a blank icon on the taskbar. This means any Tkinter window including IDLE and a blank one. Unfortunately, I don't have a screenshot to show this as I reinstalled version

[issue32314] Implement asyncio.run()

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset a4afcdfa55ddffa4b9ae3b0cf101628c7bff4102 by Yury Selivanov in branch 'master': bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262)

[issue31179] Speed-up dict.copy() up to 5.5 times.

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: I've pushed a new version of the patch that I intend to merge tomorrow. The last version has only one minor change: it uses fast-path for "slightly" non-compact dicts too (dicts don't use *at most* 3 entries). This protects us from

[issue32314] Implement asyncio.run()

2018-01-21 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +5107 ___ Python tracker ___ ___

[issue32610] asyncio.all_tasks() should return only non-finished tasks.

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: I agree, returning done tasks is pretty useless. This is a new function so let's fix its behavour. We need to: 1. Document this difference between new asyncio.all_tasks() and now deprecated Task.all_tasks(). 2. Make sure that

[issue32610] asyncio.all_tasks() should return only non-finished tasks.

2018-01-21 Thread Andrew Svetlov
New submission from Andrew Svetlov : Current behavior has a subtle pitfall. The function returns a list of *existing* tasks (not removed by decref or explicit call). If user's code has a strong reference to some task the task will be in return list for unpredictable

[issue32532] improve sys.settrace and sys.setprofile documentation

2018-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Pablo, it would be nice. But for #17799, I don't know actually which part should be fixed, doc or code? I think it's better to consult gurus on python-dev mail list. -- ___ Python tracker

[issue32583] Crash during decoding using UTF-16/32 and custom error handler

2018-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: I write a draft patch, without tests yet. I'll add them later. Reviews are appreciated. I also check the Windows codepage equivalent and encoders, look to me they don't suffer the problem. -- keywords: +patch stage: needs patch ->

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-21 Thread Yury Selivanov
Yury Selivanov added the comment: Merged! Thank you, Nathaniel! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: -Python 3.8 ___ Python tracker

[issue32609] Add setter and getter for min/max protocol ersion

2018-01-21 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5106 stage: needs patch -> patch review ___ Python tracker ___

[issue32609] Add setter and getter for min/max protocol ersion

2018-01-21 Thread Christian Heimes
New submission from Christian Heimes : OpenSSL 1.1 has introduced a new API to set the minimum and maximum supported protocol version. The API is easier to use than the old OP_NO_TLSv1 option flags, too

[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-01-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: A solution to this issue must deal with the following use case: A developer has made changes to Modules/Setup and is tracking these changes in a VCS, for example with mercurial or with a git submodule through a symlink. By the time he is

[issue32608] Incompatibilities with the socketserver and multiprocessing packages

2018-01-21 Thread Michael Durso
Change by Michael Durso : -- keywords: +patch pull_requests: +5104 stage: -> patch review ___ Python tracker ___

[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-01-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: I fully concur with all points in Victor msg310345. -- ___ Python tracker ___

[issue32608] Incompatibilities with the socketserver and multiprocessing packages

2018-01-21 Thread Michael Durso
New submission from Michael Durso : This is more of an issue with socketserver rather than multiprocessing. I could not find socketserver experts to add to the nosy list, but I've included the multiprocessing experts for completeness. Under specific conditions,

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-21 Thread stein-k
stein-k added the comment: Patch for tests. Added test for calling unquote with bytes input and removed Exception raised in original test. -- Added file: https://bugs.python.org/file47397/urllib_parse_unquote_handle_bytes_test.patch

[issue32607] After Python Installation Error

2018-01-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: This looks like a broken or incorrectly configured Django installation. What happens when you run this from your operating system shell? python3.6 -E -S If you are on Windows, you might need to use this instead: py -E -S

[issue32607] After Python Installation Error

2018-01-21 Thread Shrivatsa Hosabettu
New submission from Shrivatsa Hosabettu : Please let me know the below error is ok to have or how to resolve it? 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] Traceback (most recent call last): Python Shell, prompt 0, line 21 File "", line

[issue32391] Add StreamWriter.wait_closed()

2018-01-21 Thread Nathaniel Smith
Change by Nathaniel Smith : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list