[issue35006] itertools.combinations has wrong type when using the typing package

2018-10-17 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: > This change broke two templating engines: > * Genshi: https://github.com/python/performance/issues/46 upstream issue: https://genshi.edgewall.org/ticket/612 > * Chameleon: https://github.com/python/performance/issues/47 upstream issue:

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-17 Thread Matt Wilber
Matt Wilber added the comment: I agree, a comment can serve the same purpose. But for the same reasons it's useful to express typing hints in Python with real syntax, and the reasons it's useful to have the abc module in the first place, I think it is useful to be able to annotate an

[issue35005] argparse should accept json and yaml argument types

2018-10-17 Thread paul j3
paul j3 added the comment: If I define a 'type' function like: def readdata(astr): if astr.startswith('@'): with open(astr[1:], 'r') as f: d = json.load(f) return d else: return astr I can use it to load a json file, or use the string directly:

[issue34901] Missing isolated (-I) flag in sys.flags table

2018-10-17 Thread Danish Prakash
Change by Danish Prakash : -- pull_requests: +9283 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30670] pprint for dict in sorted order or insert order?

2018-10-17 Thread Jan-Hein Bührman
Jan-Hein Bührman added the comment: @terry.reedy - If I understand correctly, this issue was closed by you awaiting what would happen with the dict insertion order after 3.6. It has been decided that dict insertion will stay for now and in the future. >>> Should this issue now be reopened?

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +9282 stage: -> patch review ___ Python tracker ___ ___

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Cyker Way
Cyker Way added the comment: Previous upload `example.py` was missing `__eq__`. Updated in `example-1.py`. -- Added file: https://bugs.python.org/file47876/example-1.py ___ Python tracker

[issue34814] makesetup: must link C extensions to libpython when compiled in shared mode

2018-10-17 Thread Ned Deily
Ned Deily added the comment: Perhaps you should bring up this proposed change in distutils-sig before committing. It's probably an OK change but it would be good to try to get some feedback from the downstream users who might be affected by it. -- nosy: +ned.deily

[issue34901] Missing isolated (-I) flag in sys.flags table

2018-10-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: In spite of what is said above, PR 9708 was merged before the auto-backport. -- nosy: +terry.reedy ___ Python tracker ___

[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: This change broke two templating engines: * Genshi: https://github.com/python/performance/issues/46 * Chameleon: https://github.com/python/performance/issues/47 -- ___ Python tracker

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: The ``sorted`` docs links to the Sorting HOWTO, the ``list.sort`` docs should do the same. https://docs.python.org/3/library/functions.html#sorted https://docs.python.org/3/library/stdtypes.html#list.sort --

[issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: Victor: > The technical issue here is that the libc has no "stateless" function to > process bytes and text with one specific locale. Andreas Schwab: > That's not true. There is a rich set of *_l functions that take a locale_t > object and operate on that

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-17 Thread Matt Wilber
Matt Wilber added the comment: To add some more context, the existing Python documentation is a little misleading in this situation: https://docs.python.org/3/library/abc.html#abc.abstractmethod It shows that labeling a method with @property @abstractmethod ought to be done in the order

[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-10-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9285 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-10-17 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- pull_requests: +9284 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35006] itertools.combinations has wrong type when using the typing package

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. I agree with Josh. I propose closing this as third-party and raising an issue in typeshed GitHub repo. -- nosy: +xtreak ___ Python tracker

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread miss-islington
miss-islington added the comment: New changeset 35ae99d7b394af0ce01460f7bccd7449a82289ad by Miss Islington (bot) in branch '3.7': [3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940) https://github.com/python/cpython/commit/35ae99d7b394af0ce01460f7bccd7449a82289ad

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

[issue34999] copy.copy and deepcopy do return same logger objects in 3.7

2018-10-17 Thread Vinay Sajip
Vinay Sajip added the comment: Loggers are singletons, so the pickling operation just pickles the name. Unpickling just leads to getting the pickled name and calling getLogger(name), which will return the same object that was pickled (I'd forgotten about issue30520). I suggest as a

[issue30999] statistics module: add "key" keyword argument to median, mode, ...

2018-10-17 Thread Michal Nowikowski
Michal Nowikowski added the comment: What is the progress of this issue? I'm also interested in this feature. I expected that these functions will behave as built-in min and max. They have key argument, see here: https://docs.python.org/3/library/functions.html#max -- nosy: +godfryd

[issue34670] Add set_post_handshake_auth for TLS 1.3

2018-10-17 Thread Nathaniel Smith
Nathaniel Smith added the comment: FYI Christian, your "typical scenario for HTTP" doesn't make sense to me... you can't send HTTP Connection Upgrade in the middle of a regular request/response cycle. I feel like the typical scenario ought to be more like: * client * send ``HTTP GET

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be worth to add a wrapper in functools which revert the sorting order? class reverted_order: def __init__(self, value): self.value = value def __lt__(self, other): if isinstance(other, reverted_order): other =

[issue34370] Tkinter scroll issues on macOS

2018-10-17 Thread Kevin Walzer
Kevin Walzer added the comment: Release of Tk 8.6.9 very soon; includes fixes for Mac scrolling as well as support for 10.14 macOS, with Dark Mode. -- ___ Python tracker ___

[issue34909] StrEnum subclasses cannot be created

2018-10-17 Thread Ethan Furman
Ethan Furman added the comment: Okay, the patch is here: https://github.com/ethanfurman/cpython/tree/enum_news_entry But I managed to screw something up, and my wife just got hit by a car so this is now a really low priority. Ned, if you could grab the relevant pieces from the wreck that

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Benjamin Peterson
Benjamin Peterson added the comment: Sorry for breaking that, and thanks for the fix! I'm curious, though, why are you still using the embedded expat rather than linking everything against the same expat? -- ___ Python tracker

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread miss-islington
miss-islington added the comment: New changeset 4bfecb9298d447d5599ea76f3f68f772c38b8fd0 by Miss Islington (bot) in branch '3.6': [3.6] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9941) https://github.com/python/cpython/commit/4bfecb9298d447d5599ea76f3f68f772c38b8fd0

[issue27405] Ability to trace Tcl commands executed by Tkinter

2018-10-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: Seems like this didn't make 3.7. Would it be good to make a PR targeting 3.8? -- nosy: +cheryl.sabella ___ Python tracker ___

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557 by Victor Stinner (Stéphane Wirtel) in branch 'master': bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) https://github.com/python/cpython/commit/74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +9286 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Not a release blocker as most users probably do not run into this problem, but the pyexpatns.h mechanics should be restored. -- assignee: -> gregory.p.smith components: +Build, Extension Modules nosy: +benjamin.peterson stage: -> needs patch

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: This appears to not have been shipped in a release yet. It is new in 3.6.7. cc'ing ned daily to see if he wants to include the fix (the PR is trivial, coming ASAP). I don't have a good feel for how this impacts the real world or not. We noticed because

[issue35005] argparse should accept json and yaml argument types

2018-10-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Bob, do you prefer the current arrange where the user needs to write their own "type" function to handle JSON and YAML, or would you like to add this as a built-in option? -- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Tim Peters
Tim Peters added the comment: This comes up every few years, but that's about it. Here's the iteration from 2 years ago: https://mail.python.org/pipermail/python-ideas/2016-October/043039.html Follow the thread. It contains easy-to-use wrappers for both "do it in multiple simple passes"

[issue20582] socket.getnameinfo() does not document flags

2018-10-17 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker ___

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Cyker Way
Cyker Way added the comment: As for performance, I think both single-pass and multi-pass sorts have worst-case time complexity `m * n * log(n)`, assuming the number of items is `n` and each item has dimension `m`. Whichever is faster seems to be data-dependent. So I made a more

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9287 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +9292 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry to comment on the closed issue. I think the multisort recipe [0] is pretty neat can be added to the sorting howto page instead of being lost in the mailing list thread. It was suggested for addition later in the thread but never got added.

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: > And you are free to use whatever sorting algorithms in its implementation for > this kind of task. That's very kind of you *wink* At this point, I don't think there's much more point to discussing this further until Tim Peters weighs in and lets us know

[issue24568] Misc/NEWS: "free-after-use" -> "use-after-free"

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9288 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +9290 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 9d4712bc8f26bf1d7e626b53ab092fe030bcd68d by Gregory P. Smith in branch 'master': bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) https://github.com/python/cpython/commit/9d4712bc8f26bf1d7e626b53ab092fe030bcd68d --

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +9291 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi all, Could you test the PR with Windows? I don't have a Windows computer. Thank you, Stéphane -- ___ Python tracker ___

[issue14911] generator.throw() documentation inaccurate

2018-10-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: It seems that this patch was close to being merged. Would it be helpful for me to create a PR for it over 3.8? Thanks! -- nosy: +cheryl.sabella ___ Python tracker

[issue34909] StrEnum subclasses cannot be created

2018-10-17 Thread Ethan Furman
Ethan Furman added the comment: Working on getting that news entry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35005] argparse should accept json and yaml argument types

2018-10-17 Thread paul j3
paul j3 added the comment: The results of reading one of these @-prefix files are just spliced into the `argv` list before it is parsed. This is done early in the parsing method, in the _read_args_from_files method. The documentation illustrates how this file reading can be modified to

[issue35001] ImportFrom level cannot be optional

2018-10-17 Thread thautwarm
thautwarm added the comment: @Anthony > I don't think mypy has an annotation for "sometimes has an attribute" Yes.. The annotation for an attribute that **maybe exist** cannot be expressed by mypy.. -- ___ Python tracker

[issue34973] Crash in bytes constructor with mutating list

2018-10-17 Thread Xiang Zhang
Xiang Zhang added the comment: I carefully read both the two PRs. The first one, easy to understand. The second one, I spend some time to figure out why the test doesn't crash, why we need to have reference count checks in two places and make some experiments to test in different cases, how

[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : When call the __setstate__() method of xml.etree.ElementTree.Element in the C implementation for already initialized element it leaks old children. -- assignee: serhiy.storchaka components: Extension Modules messages: 327873 nosy:

[issue34998] Logging formatter validation breaks backward ducktyping

2018-10-17 Thread P.C. Kroon
P.C. Kroon added the comment: Hi Vinay, thanks for the feedback. I agree with your arguments and find an alternative solution. Peter -- ___ Python tracker ___

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, Just used the content of the patch and apply it on master, Add a unittest and the blurb entry. -- nosy: +matrixise ___ Python tracker

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a part of more general issue25643. I'll try to revive that issue. -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The comment can serve the same purpose. The caching affects the behavior at run time. Abstract methods should not be executed. The cached_property decorator is not inherited by overriding properties. I don't think that combining the cached_property and

[issue35001] ImportFrom level cannot be optional

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The level argument of ast.ImportFrom is optional. If it is not specified or None is passes, the corresponding attribute is set to the default value 0. Type hints are not used in the stdlib. If this is a bug in mypy, this is not the proper tracker for

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset fcd5e84a515e19409840c570730f0728e9fcfc83 by Victor Stinner (Stéphane Wirtel) in branch 'master': bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925)

[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: pip is not part of Python 2, so I suggest to close this issue as "third party". I dislike changing optparse just for pip. For me, the bug should be fixed in pip, not in optparse. I see a high risk of breaking applications which currently work as expected.

[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: @Victor I think this is an issue with optparse where it can't handle non-ASCII strings for %default that is exposed by pip. I can see similar places where non-ASCII strings can cause issue in argparse for unicode choices (issue35009). I think this

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9278 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Cyker Way
New submission from Cyker Way : The current `sorted` function is somewhat limited and doesn't cover a use case that frequently occurs in real applications: sort by a tuple of keys where each key can be in asc or desc order. For example, you may have a list of site configs where each of

[issue34876] Python3.8 changes how decorators are traced

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ned, please look at PR 9731. Does it fixes the issue to you? Georg, you had added the original code for patching the lineno of decorated function. Are your good to remove this patch and to move updating the first line number at the code generation stage?

[issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices

2018-10-17 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : argparse module uses str() in a few places where passing unicode strings will throw UnicodeDecodeError. In Python 3 these scripts run fine since Python 3 has unicode strings by default. I am working on this along with finding more places where

[issue34814] makesetup: must link C extensions to libpython when compiled in shared mode

2018-10-17 Thread Xavier de Gaye
Change by Xavier de Gaye : -- Removed message: https://bugs.python.org/msg326509 ___ Python tracker ___ ___ Python-bugs-list

[issue34814] makesetup: must link C extensions to libpython when compiled in shared mode

2018-10-17 Thread Xavier de Gaye
Change by Xavier de Gaye : -- nosy: -xdegaye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24307] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose there is a similar issue in Python 3 with bytes default. Using unicode() in Python 2 will make the help string an Unicode string, and this can cause an issue with translated help string. And this will cause an issue with non-ASCII 8-bit strings.

[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread STINNER Victor
Change by STINNER Victor : -- title: pip error on windows whose current user name contains non-ascii characters -> [Python 2] pip error on windows whose current user name contains non-ascii characters ___ Python tracker

[issue35001] ImportFrom level cannot be optional

2018-10-17 Thread thautwarm
thautwarm added the comment: Firstly, allowing to construct ImportFrom without `level` specified could be the result of referring Python-asdl. Secondly, in C level, `level` is always an integer. Last but not the least, when you can access `level` from an ImportFrom AST, it must be an

[issue34999] copy.copy and deepcopy do return same logger objects in 3.7

2018-10-17 Thread sebix
sebix added the comment: Oh, that's something different than I initially thought. Using copy.deepcopy gives the same result as with copy.copy. -- title: Different behavior of copied loggers in 3.7 -> copy.copy and deepcopy do return same logger objects in 3.7 type: -> behavior

[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34996] Add name to process and thread pool

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. I think using current_thread().name gives thread name with number that is useful. I don't know the exact use case or maybe I am misunderstanding the use case and perhaps adding a script where your PR applies with the output

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-17 Thread susaki
Change by susaki : -- keywords: +patch pull_requests: +9276 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +9277 stage: -> patch review ___ Python tracker ___ ___

[issue35001] ImportFrom level cannot be optional

2018-10-17 Thread thautwarm
thautwarm added the comment: Hi, Serhiy, for Python-asdl has made `level` able to optional, certainly we could construct an ImportFrom AST without giving `level`. Moreover, this might evidence that `level` cannot be optional in fact:

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, I thought a partial object was supposed to "look" like a function. I'm okay with closing this. -- resolution: -> rejected ___ Python tracker

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2018-10-17 Thread thautwarm
thautwarm added the comment: How about: with_stmt: 'with' (with_items | '(' with_items ')') ':' suite ignored: INDENT | NEWLINE | DEDENT with_items: with_item (ignored* ',' ignored* with_item)* -- nosy: +thautwarm ___ Python tracker

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset a5ebc205beea2bf1501e4ac33ed6e81732dd0604 by Victor Stinner (Stéphane Wirtel) in branch '3.6': [3.6] bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) (GH-9937)

[issue35011] Update to expat removed the pyexpatns.h, causing link time symbol conflicts vs other versions in an application

2018-10-17 Thread Gregory P. Smith
New submission from Gregory P. Smith : These lines used to exist in Modules/expat/expat_external.h: /* Namespace external symbols to allow multiple libexpat version to co-exist. */ #include "pyexpatns.h"

[issue24658] open().write() fails on 2 GB+ data (OS X)

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9289 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Cyker, thank you for the suggestion, but we're going to decline. The sorting HOWTO docs show how to exploit sort stability with multiple passes to handle a mix of ascending and descending steps. It would complicate the API to have an array of key

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9280 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread miss-islington
miss-islington added the comment: New changeset 6e57382464101d2669a425622e19fff57586b2ff by Miss Islington (bot) (Stéphane Wirtel) in branch '2.7': [2.7] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9928)

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There was some discussion about it : https://lists.gt.net/python/python/539896#539896 . As suggested by Raymond in the thread the below can be used to get the desired output items.sort(key=lambda r: r['user'], reverse=True) items.sort(key=lambda

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 669fa8b6376ee8703ae4383536dfcc0e96e51b78 by Victor Stinner (Stéphane Wirtel) in branch '3.6': [3.6] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9927)

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread miss-islington
miss-islington added the comment: New changeset 657e3f9a2c0d620807dd81882d566ad8f1ae423e by Miss Islington (bot) (Stéphane Wirtel) in branch '3.7': [3.7] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9926)

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9279 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: Since sort is guaranteed to be stable, can't you sort in two runs? py> values = ['bc', 'da', 'ba', 'abx', 'ac', 'ce', 'dc', 'ca', 'aby'] py> values.sort(key=itemgetter(1), reverse=True) py> values.sort(key=itemgetter(0)) py> values ['ac', 'abx', 'aby',

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to add an example in the documentation. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +9281 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Cyker Way
Cyker Way added the comment: Multi-pass stable sorts should produce the correct result. But as the number of columns grow the code gets messy. For brevity this example only has 2 columns but it may be 10 or more in a real application. Furthermore, in some cases the application may need to

[issue35005] argparse should accept json and yaml argument types

2018-10-17 Thread Robert Benson
Robert Benson added the comment: What I'm talking about is reading a single arg (of a dictionary or collection type) that can be split across multiple lines, rather than a single line containing multiple args My motivation was that reading args from a file should behave in a manner similar

[issue34035] Several AttributeError in zipfile seek() methods

2018-10-17 Thread Dariush Azimi
Dariush Azimi added the comment: Had the same issue with python 3.7 and went back to python 3.6. There are no issues with python 3.6.4 -- nosy: +Dariush Azimi ___ Python tracker

[issue24564] shutil.copytree fails when copying NFS to NFS

2018-10-17 Thread Charlie Dyson
Change by Charlie Dyson : -- nosy: +cdyson37 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Robert Kuska for the bug report and the initial patch, thanks Stéphane Wirtel for the PR (with the NEWS entry and the new test ;-)) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python

[issue23420] python -m cProfile -s fails with non informative message

2018-10-17 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: welcome -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35010] sort by partially reversed key tuple

2018-10-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: @Serhiy I just checked the docs to add an example and it's explained with an example at [0] :) ``` Sorts are guaranteed to be stable. That means that when multiple records have the same key, their original order is preserved. This wonderful

[issue34996] Add name to process and thread pool

2018-10-17 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Raz, 1. Please could you sign the CLA? 2. About the name, why did you use these names? Is there a discussion somewhere about the names? Thank you -- nosy: +matrixise ___ Python tracker