[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2018-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as I understand, the problem is that the value obtained by XORing hashes of elements has nonuniform distribution. Further transformations, either linear or nonlinear, as well as adding length, don't change the fact that

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

2018-01-15 Thread STINNER Victor
STINNER Victor added the comment: Update: I pushed a large change to fix locale encodings in bpo-29240: commit 7ed7aead9503102d2ed316175f198104e0cd674c. -- ___ Python tracker

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7ed7aead9503102d2ed316175f198104e0cd674c by Victor Stinner in branch 'master': bpo-29240: Fix locale encodings in UTF-8 Mode (#5170) https://github.com/python/cpython/commit/7ed7aead9503102d2ed316175f198104e0cd674c

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-15 Thread STINNER Victor
STINNER Victor added the comment: Attached test_all_locales.py is a test suite for locale functions: os.strerror(), locale.localeconv(), time.strftime(). I tested it on Linux Fedora 27, FreeBSD 11.0 and macOS 10.13.2. The test should always pass on Python 2.7. On

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2018-01-15 Thread STINNER Victor
Change by STINNER Victor : -- title: random seed is not consistent when using tuples with a str element -> random.seed(tuple) uses the randomized hash function and so is not reproductible ___ Python tracker

[issue32554] random seed is not consistent when using tuples with a str element

2018-01-15 Thread STINNER Victor
STINNER Victor added the comment: random.seed(str) uses: if version == 2 and isinstance(a, (str, bytes, bytearray)): if isinstance(a, str): a = a.encode() a += _sha512(a).digest() a = int.from_bytes(a, 'big')

[issue32554] random seed is not consistent when using tuples with a str element

2018-01-15 Thread Johnny Dude
New submission from Johnny Dude : When using a tuple that include a string the results are not consistent when invoking a new interpreter or process. For example executing the following on a linux machine will yield different results: python3.6 -c 'import random;

[issue32542] memory not freed, aka memory leak continues...

2018-01-15 Thread STINNER Victor
STINNER Victor added the comment: ctypes test cases tearDown() may always clear _pointer_type_cache. Would it help? -- nosy: +vstinner ___ Python tracker

[issue32542] memory not freed, aka memory leak continues...

2018-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Being curious, is there a way to see what the size of the cache is? len(_pointer_type_cache)? -- ___ Python tracker

[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2018-01-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: -5041 ___ Python tracker ___

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2018-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > As discussed above, starting with msg309074, __deepcopy__() is being added to > the Python implementation because it already exists in the C implementation. Python implementation shouldn't copy all implementation details of

<    1   2