[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-06 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes

2018-09-06 Thread Vladimir Matveev
Vladimir Matveev added the comment: file URI scheme is covered by RFC8089, specifically https://tools.ietf.org/html/rfc8089#appendix-E.3.2. -- nosy: +v2m ___ Python tracker

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 593bb30e82eded7f2ec02f7d1aa49742e6962113 by Benjamin Peterson (Sergey Fedoseev) in branch 'master': closes bpo-34599: Improve performance of _Py_bytes_capitalize(). (GH-9083)

[issue28617] Why isn't "in" called a comparison operation?

2018-09-06 Thread wim glenn
Change by wim glenn : -- pull_requests: +8545 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-06 Thread Ross Burton
Change by Ross Burton : -- pull_requests: +8543 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Tim Peters
Tim Peters added the comment: No, there's no requirement that run lengths on the stack be ordered in any way by magnitude. That's simply one rule timsort uses, as well as 2-merge and various other schemes discussed in papers. powersort has no such rule, and that's fine. Regardless, rules

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: And by "looking at" Timsort, I mean reading your explanation. The motivation for merge ordering and so on was already quite clear from there. But that motivation does not imply that the stack has to be monotonous in run length, although memory

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-09-06 Thread pms.coder
pms.coder added the comment: I have the same issue on Debian 9: == CPython 3.8.0a0 (heads/master:874809e, Sep 6 2018, 23:31:00) [GCC 6.3.0 20170516] == Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 little-endian == cwd: /home/xxx/xxx/cpython/git/cpython/build/test_python_55266 == CPU count: 4 ==

[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-09-06 Thread Erik Janssens
Erik Janssens added the comment: for what's it worth, I've observed similar crashes under these strange circumstances : - the crashes don't appear in python 3.4, but they do in 3.5 (maybe due to switch in msvc runtime) - the crashes do appear when run as script, the exact same commands in

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-09-06 Thread Erik Janssens
Change by Erik Janssens : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: Sorry, I meant that the funny code in the "power" computation in powersort is a logarithmic measure. But I don't know where that came from. I just looked at Timsort and now figuring out how powersort is different. --

[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-06 Thread Nathaniel Manista
Nathaniel Manista added the comment: Something... related, that may perhaps belong in a separate issue, but that I want to at least mention here because it would be solved if logging-in-libraries best practices were authoritatively documented and exemplified: it's just too consarn easy to

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Tim Peters
Tim Peters added the comment: The notion of cost is that merging runs of lengths A and B has "cost" A+B, period. Nothing to do with logarithms. Merge runs of lengths 1 and 1000, and it has cost 1001. They don't care about galloping, only about how the order in which merges are performed

[issue34594] Some tests use hardcoded errno values

2018-09-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset b03c2c51909e3b5b5966d86a2829b5ddf2d496aa by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-34594: Don't hardcode errno values in the tests. (GH-9076)

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: So it looks like we're working with a logarithmic measure of the "cost". I'm operating largely based on your description of Timsort in the link in msg324597, which the paper also refers to. But since the paper is sorting an array of Java ints (not

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2018-09-06 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +8542 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +8541 stage: -> patch review ___ Python tracker ___ ___

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : Currently _Py_bytes_capitalize() checks case before using conversion table, performance can be improved by using conversion table unconditionally. Benchmarks: $ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s "b =

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: The primary Python.org installer supports 10.9 and later by way of being compiled on 10.9, and there is also an installer that supports 10.6. There currently is no promise that building on 10.13 results in code that works on earlier versions of macOS.

[issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero

2018-09-06 Thread Eric Wieser
Eric Wieser added the comment: Pinging again, for lack of a clearer path forward -- ___ Python tracker ___ ___ Python-bugs-list

[issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions

2018-09-06 Thread Eric Wieser
Eric Wieser added the comment: Pinging, as recommended by https://devguide.python.org/pullrequest/#reviewing. -- ___ Python tracker ___

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +8540 stage: -> patch review ___ Python tracker ___ ___

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Ok, I see. Thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34598] How to fix? Error in Kali linux python 2.7 - Collecting pip From cffi callback : Traceback (most recent call last): File "/usr/local/lib/pytho

2018-09-06 Thread andy polandski
New submission from andy polandski : root@kali:~# python get-pip.py Collecting pip >From cffi callback : Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 309, in wrapper _lib.X509_up_ref(x509) AttributeError: 'module' object has no

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: I think we should make the same change on all branches (why would we fix it in maintenance branches just to break it in the next major release?), in which case it's just one PR to master and our backport bot (and/or the merging core dev) will take care of it

[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-06 Thread Tim Lesher
Change by Tim Lesher : -- nosy: +tlesher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Hi @zach.ware, Just to make sure I'm getting this right (first time contributing to cpython...) Now I need to open 4 PRs at GitHub, - 1 PR to master branch, with following changes: raise TypeError when `reason` is not a string. (Include unit test.) - 3 PRs to

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: "Unconditionally" :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: What would be a good default reason? How about the function name? if isinstance(reason, types.FunctionType): reason = reason.__name__ For example, from unittest import TestCase, skip class Test(TestCase): @skip def

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-06 Thread Zorg
New submission from Zorg : If one wants to compile Python and embed it in their applications, or more generally, deploy the framework / libraries to older systems, then Python needs to check the existence of functions at runtime that are unavailable to Python's supported minimum OS. For

[issue26208] decimal C module's exceptions don't match the Python version

2018-09-06 Thread Stefan Krah
Stefan Krah added the comment: pypy3 actually took over the terse exceptions, but without the conditions. They'd also need error codes from libmpdec now. huge = Decimal('9' * 99) huge.quantize(Decimal('0.1')) Traceback (most recent call last): File "", line 1, in File

[issue31371] Remove deprecated tkinter.tix module

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: We missed the boat for 3.7 anyway. With the PEP 4 argument, I won't push any further for ripping Tix out completely before 2020, but if something happens to break building it on Windows before then my fix will be to remove it from the Windows build.

[issue32310] Remove _Py_PyAtExit from Python.h

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: It's unclear if this change is going to break anything. In case of doubt, I chose to reject the change. Note: I'm working on a project to rework and cleanup the C API, see: https://pythoncapi.readthedocs.io/

[issue30985] Set closing variable in asyncore at close

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I reject the issue. It doesn't seem possible to set the closing attribute without breaking backward compatibility. See discussion: https://github.com/python/cpython/pull/2804 -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: It could be interesting to enable uncalled `skip` by setting a default reason of "Unconditional skip" when the argument is a function. Do note that decorating with an uncalled `skip` does actually work to skip the test currently, but the test is marked as

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Well, I personally can not think of any. I think `reason` should normally just be string. If that is ok, I'll be happy to submit a PR that restricts reason to be a string. -- ___ Python tracker

[issue34542] [TLS] Update test certs to future proof settings

2018-09-06 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2d3f2dc9f8376415a31a6de260ccbe6a86f2816d by Christian Heimes (Miss Islington (bot)) in branch '3.7': bpo-34542: Update test certs and keys (GH-8997) (GH-9007) https://github.com/python/cpython/commit/2d3f2dc9f8376415a31a6de260ccbe6a86f2816d

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: Is there a use-case for reason to be anything but a string? -- nosy: +steven.daprano ___ Python tracker ___

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
New submission from Naitree Zhu : When using @skip decorator, `reason` argument is required. But one could easily overlook that and use it like so: class SomeTest(TestCase): @skip def test_method(self): # ... The test actually passes when running with

[issue32055] Reconsider comparison chaining for containment tests

2018-09-06 Thread Tal Einat
Tal Einat added the comment: Has this been discussed on python-dev? If so, what was the result? -- nosy: +taleinat ___ Python tracker ___

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2018-09-06 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Thanks for the discussion. Since I tried to join the efforts here in 2016 two years ago I was (and still am) enthusiastic, and willing to invest quite a bit of energy. Still, we have missed the 3.6 and 3.7 releases to change something about the fact

[issue17239] XML vulnerabilities in Python

2018-09-06 Thread Matej Cepl
Matej Cepl added the comment: > I suggest to: > > * close bpo-17318 as a duplicate of this issue (bpo-17239) > * close bpo-24238 > * close this issue +1 from me. -- ___ Python tracker

[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-06 Thread Pekka Klärck
Pekka Klärck added the comment: You are obviously right with how `__instancecheck__` and `__subclasscheck__` work. We'd either need something like `__rinstancecheck__` and `__rsubclasscheck__` or `isinstance` and `issubclass` needed to handle this using `types.resolve_bases`, `__origin__`,

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: Thanks for the suggestion and the original patch, Wouter! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: New changeset 3e2b29dccc3ca9fbc418bfa312ad655782e250f2 by Tal Einat in branch 'master': bpo-30977: make uuid.UUID use __slots__ (GH-9078) https://github.com/python/cpython/commit/3e2b29dccc3ca9fbc418bfa312ad655782e250f2 --

[issue34586] collections.ChainMap should have a get_where method

2018-09-06 Thread Zahari Dim
Zahari Dim added the comment: I believe an argument for including this functionality in the standard library is that it facilitates writing better error messages and thus better code. Some results that are returned when one searches for *python ChainMap* are: -

[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > but even then types in the typing could themselves implement > `__instancecheck__` and `__subclasscheck__` and retain the old behavior. It doesn't work that way. `__instancecheck__` and `__subclasscheck__` tweaks the behaviour of superclass (i.e. the

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think you have to worry about %T being used by other formatting functions. If (heaven forbid) dates were ever supported by PyUnicode_FromFormat(), there would have to be a way to switch from "normal" argument processing to argument-specific

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: Oh, PyUnicode_FromFormat() has %A to format as ASCII, whereas printf() already has %A but for a different meaning: a, A For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh.p+-;

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I cannot find %T in printf() manual pages on Fedora 28 (Linux). I can find it in the strftime() documentation: %T The time in 24-hour notation (%H:%M:%S). (SU) But I don't think that it's an issue since printf() and strftime() formatters are

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: My previous attempt to fix that issue, 7 years ago: bpo-10833 :-) See also bpo-7330 where I implemented width and precision (ex: "%5.3s") in PyUnicode_FromFormat(). -- ___ Python tracker

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +8539 stage: -> patch review ___ Python tracker ___ ___

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
New submission from STINNER Victor : The PEP 399 requires that C accelerator behaves exactly as Python, but a lot of C code truncates type name to an arbitrary length: 80, 100, 200, up to 500 (not sure if it's a number of bytes or characters). Py_TYPE(obj)->tp_name is a common pattern: it

[issue34587] test_socket: testCongestion() hangs on my Fedora 28

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: Linux RDS manual page says: https://linux.die.net/man/7/rds "The receive queue size limits how much data RDS will put on the receive queue of a socket before marking the socket as congested. When a socket becomes congested, RDS will send a congestion map

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: Oops. I missed the fact that Tal created PR 9078. Sorry, I reopen the issue ;-) -- resolution: out of date -> status: closed -> open ___ Python tracker

[issue26208] decimal C module's exceptions don't match the Python version

2018-09-06 Thread Stefan Krah
Stefan Krah added the comment: The thing is that Python explicitly supports any object as the "message". I was quite pleased when I discovered that because it provides a way to include both signals and the condition list in the "message", which can be used in programs for dispatching on the

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I close the issue because of the pickle issue that hasn't been addressed by the wouter bolsterlee (the author) didn't reply for 1 month 1/2. @wouter bolsterlee: if you still want to work on that issue, you should try to address the pickle issue first, then

[issue31371] Remove deprecated tkinter.tix module in 3.7

2018-09-06 Thread Tal Einat
Tal Einat added the comment: We should decide on this. I agree with Serhiy that in accordance with PEP 4, as long as Tix still works, we should keep it. -- nosy: +taleinat ___ Python tracker

[issue34354] Memory leak on _testCongestion

2018-09-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue34587 Thanks -- nosy: +xtreak ___ Python tracker ___

[issue34587] test_socket: testCongestion() hangs on my Fedora 28

2018-09-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It seems there was a similar report pointing to the same line in the test using Fedora 28. Ref : https://bugs.python.org/issue34354 Thanks -- nosy: +xtreak ___ Python tracker

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems like an extra note is reasonable here. I have created a PR for this. Feedback welcome on the wording. Thanks. -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.8

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +8538 stage: -> patch review ___ Python tracker ___ ___

[issue26208] decimal C module's exceptions don't match the Python version

2018-09-06 Thread Pekka Klärck
Pekka Klärck added the comment: Just noticed this myself when testing with Python 3.5-3.7: >>> from decimal import Decimal >>> d = Decimal('foo') Traceback (most recent call last): File "", line 1, in decimal.InvalidOperation: [] With Python 2.7 I get this error

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

2018-09-06 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +8537 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: See new PR which addresses pickle forward and backward compatibility. -- nosy: +taleinat ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +8536 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34574] OrderedDict iterators are exhausted during pickling

2018-09-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34574] OrderedDict iterators are exhausted during pickling

2018-09-06 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: Other iterators either don't support pickling or aren't mutated during pickling: In [10]: it = iter({1}) In [11]: pickle.dumps(it) Out[11]: b'\x80\x04\x95\x1e\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94]\x94K\x01a\x85\x94R\x94.'

[issue34588] traceback formatting can drop a frame

2018-09-06 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +8535 stage: -> patch review ___ Python tracker ___ ___