[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/593bb30e82eded7f2ec02f7d1aa49742e6962113


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 must be such that the max stack size is at worst logarithmic 
in the number of array elements.  It's also nice if it's obvious that a 
sequence of equal-length runs will lead to perfectly balanced merges, which is 
"obvious enough" with the timsort and 2-merge rules.  It also happens to be 
true of the powersort rules, but harder to see from staring at code because 
it's hard to compute "node powers" in one's head.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 considerations might.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
== encodings: locale=UTF-8, FS=utf-8
Using random seed 1679661
Run tests in parallel using 6 child processes
0:00:00 load avg: 0.35 [1/1/1] test_pkg failed
test_1 (test.test_pkg.TestPkg) ... ok
test_2 (test.test_pkg.TestPkg) ... ok
test_3 (test.test_pkg.TestPkg) ... ok
test_4 (test.test_pkg.TestPkg) ... ERROR
test_5 (test.test_pkg.TestPkg) ... ok
test_6 (test.test_pkg.TestPkg) ... ok
test_7 (test.test_pkg.TestPkg) ... FAIL
test_8 (test.test_pkg.TestPkg) ... ok

==
ERROR: test_4 (test.test_pkg.TestPkg)
--
Traceback (most recent call last):
  File "/home/xxx/xxx/cpython/git/cpython/Lib/test/test_pkg.py", line 180, in 
test_4
self.run_code(s)
  File "/home/xxx/xxx/cpython/git/cpython/Lib/test/test_pkg.py", line 69, in 
run_code
exec(textwrap.dedent(code), globals(), {"self": self})
  File "", line 2, in 
  File "/tmp/tmppheh3y0k/t4.py", line 1, in 
RuntimeError: Shouldnt load t4.py

==
FAIL: test_7 (test.test_pkg.TestPkg)
--
Traceback (most recent call last):
  File "/home/xxx/xxx/cpython/git/cpython/Lib/test/test_pkg.py", line 260, in 
test_7
'__name__', '__package__', '__path__', '__spec__'])
AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', 
'__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', 
'__package__', '__path__', '__spec__']

First differing element 6:
'__spec__'
'__path__'

Second list contains 1 additional elements.
First extra element 7:
'__spec__'

  ['__cached__',
   '__doc__',
   '__file__',
   '__loader__',
   '__name__',
   '__package__',
+  '__path__',
   '__spec__']

--
Ran 8 tests in 0.028s

FAILED (failures=1, errors=1)
test test_pkg failed

== Tests result: FAILURE ==

1 test failed:
test_pkg

--
nosy: +pms.coder

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the repl 
work as expected

- the crashes behave the same when using ActiveQt/PyQt instead of pywin32, 
which suggests it's not a pywin32 issue

--
nosy: +erikjanss

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "hold [the logging module] wrong" 
and wind up with "No handlers could be found for logger" log spam: 
https://www.google.ca/search?q=site:stackoverflow.com+"No+handlers+could+be+found+for+logger;.
 Why should a Logger object need to have .basicConfig() called on it after 
retrieval (where "retrieval" means "getLogger call") and before use anyway? Why 
can't it just be ready for use (at least as ready for use as .basicConfig makes 
it) when passed from the logging module to the logging-using module like nearly 
any other object passed from the standard library to standard-library-using 
code?

(The documentation says "No handlers could be found for logger" spam only 
happens pre-3.2, but some of my users at least think they see it in later 
Pythons.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 affect that notion of cost.  Example:  suppose we have runs of 
lengths 1, 2, and 3.  Merge 1 and 2 first for a cost of 1+2 = 3, and we're left 
with runs of length 3 and 3.  Merge those for a cost of 3+3 = 6, and add to the 
earlier cost of 3 for a total cost of 9.  But if 2 and 3 are merged first that 
has cost 5, then merging runs of length 1 and 5 has a cost of 6, added to the 
earlier 5 gives a total cost of 11.  So it's cheaper to merge 1 and 2 first.

Galloping has nothing to do with this measure, nor does the binary insertion 
sort portion of timsort.  And Java itself doesn't use timsort for sorting 
integers anyway (the overheads are too high when comparisons are dirt cheap).  
They're trying to quantify the effects of their merge-ordering strategies, 
relative to timsort's merge-ordering strategy.

Which could have been done more clearly by ignoring Java's timsort 
implementation entirely and just changing the parts of their code that 
implement _their_ merge-ordering strategy.  timsort's strategy is hard to 
analyze, but is trivially easy to _implement_.  As is, they're inadvertently 
timing all sorts of stuff that's orthogonal to the merge-ordering strategy.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/b03c2c51909e3b5b5966d86a2829b5ddf2d496aa


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Integers), I assume the performance comparisons of the 
code they timed is not really representative of Python equivalents. Probably 
galloping boosts are much larger in the Python case.

I haven't tried running the attached code yet, because I mostly carry a tablet 
with me now. The never-equal assert probably doesn't get any more obvious by 
running the code, though, anyway?-).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
= b'0'*1000" "b.capitalize()"
/home/sergey/tmp/cpython-master-venv/bin/python: . 7.26 ms 
+- 0.03 ms
/home/sergey/tmp/cpython-dev-venv/bin/python: . 7.27 ms +- 
0.04 ms
Mean +- std dev: [/home/sergey/tmp/cpython-master-venv/bin/python] 7.26 ms +- 
0.03 ms -> [/home/sergey/tmp/cpython-dev-venv/bin/python] 7.27 ms +- 0.04 ms: 
1.00x slower (+0%)
Not significant!

$ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s "b 
= b'a'*1000" "b.capitalize()"
/home/sergey/tmp/cpython-master-venv/bin/python: . 7.25 ms 
+- 0.03 ms
/home/sergey/tmp/cpython-dev-venv/bin/python: . 7.26 ms +- 
0.03 ms
Mean +- std dev: [/home/sergey/tmp/cpython-master-venv/bin/python] 7.25 ms +- 
0.03 ms -> [/home/sergey/tmp/cpython-dev-venv/bin/python] 7.26 ms +- 0.03 ms: 
1.00x slower (+0%)

$ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s "b 
= b'A'*1000" "b.capitalize()"
/home/sergey/tmp/cpython-master-venv/bin/python: . 18.1 ms 
+- 0.0 ms
/home/sergey/tmp/cpython-dev-venv/bin/python: . 7.31 ms +- 
0.13 ms
Mean +- std dev: [/home/sergey/tmp/cpython-master-venv/bin/python] 18.1 ms +- 
0.0 ms -> [/home/sergey/tmp/cpython-dev-venv/bin/python] 7.31 ms +- 0.13 ms: 
2.47x faster (-60%)

--
components: Interpreter Core
messages: 324707
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: improve performance of _Py_bytes_capitalize()
type: performance
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

That said, I agree that building on later macOS releases and deploying to older 
ones is useful, and this is something that I used to do in the past (I 
currently have the good fortune to only need to deploy to macOS 10.13). 

It is possible to add runtime checks for APIs, that's something I've done in 
the past to for the same reason, and that code is still present (for example in 
posixmodule.c).

Is this something you can and want to work on?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 attribute 'X509_up_ref'
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError(SSLError("bad handshake: 
Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify 
failed')],)",),)': /simple/pip/

--
messages: 324702
nosy: andy polandski
priority: normal
severity: normal
status: open
title: How to fix? Error in Kali linux python 2.7 - 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
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 from there.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 3.7, 3.6, and 2.7, with following changes: Setting `reason` to 
"Unconditionally" when `reason` is a function. (Include unit test.)

Looking good?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 test_bad_skip(self):
self.assertFalse(1.0)

@skip('always skipped')
def test_good_skip(self):
self.assertFalse(1.0)

$ python -m unittest -v test.py 
test_bad_skip (test.Test) ... skipped 'test_bad_skip'
test_good_skip (test.Test) ... skipped 'always skipped'

--
Ran 2 tests in 0.000s

OK (skipped=2)


But this wouldn't be very helpful if test method is a lambda (just saying...)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 example, Python makes use of:
clock_gettime
getentropy

These functions are only available on macOS 10.12. Python currently states it 
supports 10.9. Checking for their existence at compile time isn't good enough; 
compiling Python on 10.13 and deploying back to 10.9 or 10.11 for example will 
not work, and cause a crash at runtime. One can make sure the functions are 
weakly linked and check they aren't NULL to get around this.

There may be more such functions Python is using; I haven't extensively 
searched for all usages.

Alternatively, Python could state that it does not properly support embedding 
(probably not desirable), or Python could bump the minimum supported OS 
requirements in its documentation.

Else one might be able to compile Python by turning off such features? But the 
user needs to know what those are, Python gives no warnings when 
MACOSX_DEPLOYMENT_TARGET/--mmacosx-version-min are low enough, and Python 
wouldn't be able to use those functions when they are actually available on 
newer systems.

--
components: macOS
messages: 324698
nosy: Zorg, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python needs to check existence of functions at runtime for targeting 
older macOS platforms
type: crash
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "/home/stefan/tmp/pypy3-v6.0.0-linux64/lib_pypy/_decimal.py", line 842, 
in quantize
workctx._ctx, status_ptr)
  File "/home/stefan/tmp/pypy3-v6.0.0-linux64/lib_pypy/_decimal.py", line 1631, 
in __exit__
self.context._add_status(status)
  File "/home/stefan/tmp/pypy3-v6.0.0-linux64/lib_pypy/_decimal.py", line 1263, 
in _add_status
raise exception
decimal.InvalidOperation

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
resolution:  -> later
stage: needs patch -> resolved
status: open -> closed
title: Remove deprecated tkinter.tix module in 3.7 -> Remove deprecated 
tkinter.tix module
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/
https://pythoncapi.readthedocs.io/split_include.html

--
nosy: +vstinner
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 success rather than skipped (see 
example pasted below).  For this reason, I don't think we should turn it into 
an error in maintenance releases, as anyone using this accidentally will 
suddenly have many failing tests.

$ cat test.py
from unittest import TestCase, skip


class Test(TestCase):

def test_good(self):
self.assertTrue(1.0)

def test_bad(self):
self.assertFalse(1.0)

@skip
def test_bad_skip(self):
self.assertFalse(1.0)

@skip('always skipped')
def test_good_skip(self):
self.assertFalse(1.0)

$ ./python.exe -m unittest test.py -v
test_bad (test.Test) ... FAIL
test_bad_skip (test.Test) ... ok
test_good (test.Test) ... ok
test_good_skip (test.Test) ... skipped 'always skipped'

==
FAIL: test_bad (test.Test)
--
Traceback (most recent call last):
  File "/.../test.py", line 10, in test_bad
self.assertFalse(1.0)
AssertionError: 1.0 is not false

--
Ran 4 tests in 0.002s

FAILED (failures=1, skipped=1)

--
nosy: +zach.ware
versions:  -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 unittest, because it's equivalent to

class SomeTest(TestCase):

def test_method(self):
# ...
test_method = skip(test_method)

This gives the illusion that @skip decorator worked as expected.

I propose we should check the passed in `reason`, and raise error if it looks 
like a function/method, therefore prevent this erroneous usage.

In practice, this behavior has misled people using the decorator in the 
unintended way. For example: In this chapter of Test-Driven Development with 
Python 
(http://www.obeythetestinggoat.com/book/chapter_organising_test_files.html), 
the author used @skip decorator without `reason` argument.

--
components: Library (Lib), Tests
messages: 324688
nosy: Naitree Zhu
priority: normal
severity: normal
status: open
title: [unittest] raise error if @skip is used with an argument that looks like 
a test method
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that there 
is no simple way to load certificate data from memory rather than files.

I really appreciate the work that as been done on 
https://www.python.org/dev/peps/pep-0543/. It's a truly great effort. But I 
think the fact that we did not land a solution since 2012 is somewhat an 
indicator showing that building smaller chunks and showing the willingness to 
iterate on a solution would have led to a more tangible outcome, something that 
I could use right now when building Python applications (how great would that 
be?). Honestly, the small API changes that were discussed here for years and 
that I think I implemented do not seem problematic to me from a maintenance and 
deprecation perspective. Yes, PEP 543 proposes a more idealistic way of doing 
things. But I do not see how implementing PEP 543 would have been slowed down 
or negatively affected in any way by the last patch I proposed.

https://github.com/python/cpython/pull/5162 looks very big, and C is not as 
much my comfort zone as is Python. Still, please let me know if you would like 
me to contribute!

By the way, I would have _really_ liked to see the following feedback around 
the first time I submitted the patch:

> For example it's missing several GIL releases calls. The password callback 
> doesn't look correct in some places.

I remember that this aspect of writing the patch consumed quite a bit of my 
time and I operated with care, knowing the risks. I very much would have 
appreciated specific feedback on this. To learn, and to actually address 
problems.

Jan-Philip

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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__`, or something else.

It's unfortunate that `__origin__` cannot be considered to be part of the 
stable API and that no other suitable API exists. I don't want to add an 
external dependency only to handle this situation, so I guess I'll just use 
`__origin__` with Python 3.7+. Hopefully it isn't changed in 3.7 minor versions 
and hopefully a public API exists in 3.8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

  - 

  - 

  - 

All of these mention prominently a layered configuration of some kind. I would
argue that all of the examples would benefit from error checking done along the
lines of the snippet above.

An additional consideration is that the method is best implemented by copying
the `__getitem__` method, which, while short, contains a couple of non trivial
details.

One analog could be `re.search`, which returns an object with information of
both the value that is found and its location, though the `span` attribute of
the Match object. Maybe the method could be called ChainMap.search?
On Thu, Sep 6, 2018 at 6:07 AM Raymond Hettinger  wrote:
>
>
> Raymond Hettinger  added the comment:
>
> I haven't run across this requirement before but it does seem plausible that 
> a person might want to know which underlying mapping found a match (compare 
> with the "which" utility in Bash). On the other hand, we haven't had requests 
> for anything like this for other lookup chains such as determining where a 
> variable appears in the sequence 
> locals-to-nested-scopes-to-globals-to-builtins.
>
> Also, I'm not sure I like the proposed API (the method name and signature).  
> Perhaps, this should be a docs recipe for a ChainMap subclass or be an 
> example of a standalone search function that the takes the *maps* attribute 
> as one of its arguments.  Will discuss this with the other core devs to get 
> their thoughts.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 right argument) in `isinstance()` and 
`issubclass()`. This is how `isinstance([], typing.Iterable)` works, you can't 
use the same to tweak `isinstance(typing.Iterable, type)`.

> Hopefully someone with more insight on this can comment my worries. Perhaps 
> the attribute should also be documented as discussed earlier: 
> https://github.com/python/typing/issues/335

No, it is not safe to use it and will not be documented. You missed the point 
of my previous post, the idea is to add public wrappers in typing that will 
hide `__origin__` (or whatever else) as an implementation detail. Using 
`__origin__` is OK however as a *temporary* measure, if you don't want to use 
`typing_inspect` in the meantime.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 formatting specifiers, anyway.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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+-; for A 
conversion the prefix  0X,  the  letters  ABCDEF, and the exponent separator P 
is used. (...)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 exclusive, no? For example, strftime() %s means "number of seconds since 
the Epoch" whereas printf() %s means a "const char*" byte string.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 would be nice to have a new "%T" 
format in PyUnicode_FromFormat(), so it can be used directly in PyErr_Format(), 
to format an object type name.

Attached PR implements the proposed %T format and modify unicodeobject.c to use 
it.

I propose to then write a second PR to modify all C code of CPython using 
Py_TYPE(obj)->tp_name to use the new %T type.

--
components: Interpreter Core
messages: 324675
nosy: vstinner
priority: normal
severity: normal
status: open
title: PyUnicode_FromFormat(): add %T format for an object type name
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 update to the other participating 
hosts, who are then expected to stop sending more messages to this port."

=> "other participating hosts (...) are (...) expected to stop sending"

By design, it seems like the Python unit test is going to fail, so I suggest to 
remove the test.

I don't think that the role of Python is to check how the kernel handles 
congestion on local RDS sockets.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 condition, not only
on the signal.

Signals directly map to the exceptions, but there can be more than one
condition that caused the signal.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 reopen this issue or maybe create a new 
issue pointing to this one.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 instead:

decimal.InvalidOperation: Invalid literal for Decimal: 'foo'


I'm writing type conversion code and was planning to include the error message 
by Python along with some higher level explanation when reporting errors. 
`[]` would be such a strange message that I 
need to make a special case with decimal.

--
nosy: +pekka.klarck

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.'

In [12]: list(it)
Out[12]: [1]

In [13]: it = (x for x in {1})

In [14]: pickle.dumps(it)
---
TypeError Traceback (most recent call last)
 in ()
> 1 pickle.dumps(it)

TypeError: can't pickle generator objects

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com