[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Larry Hastings
Larry Hastings added the comment: > In setup.py I assume that the target platform of the build is the same as the > current interpreter's platform. If this is included in CPython, it won't be using setup.py, so this isn't a concern. I don't think there's a way to use setup.py to cross-compi

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Jack O'Connor
Jack O'Connor added the comment: > As a first pass I say we merge the reference C implementation. Do you mean portable-only C code, or portable + intrinsics? If the assembly files are out, I'd advocate for the latter. The intrinsics implementations are nearly as fast as the assembly code, an

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Larry Hastings
Larry Hastings added the comment: I assume by "intrinsics" you mean using the GCC SIMD stuff, not like inlining memcpy() or something. My assumption is yes, that's fine, we appear to already be using them for BLAKE2. -- ___ Python tracker

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Jack O'Connor
Jack O'Connor added the comment: Yeah by intrinsics I mean stuff like _mm256_add_epi32(). All of that stuff is in these vendored files: blake3_avx2.c blake3_avx512.c blake3_neon.c blake3_sse2.c blake3_sse41.c Also to Michał's question above, I'm not necessarily opposed to publishing somethin

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
New submission from neonene : 3.11a3+ introduced the C version of abspath(), which shows incompletely normalized absolute path (see msg410068): >>> os.path.abspath(r'\\spam\\eggs. . .') 'spameggs. . .' >>> os.path.abspath('C:\\spam. . .') 'C:\\spam. . .' >>> os.path

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: When I take a look at previous PRs, most of adding test cases were not backported. The backported cases were triggered by bug issues. But let's pass this case as an exceptional case. -- nosy: +corona10 ___ Python trac

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
Change by neonene : -- keywords: +patch pull_requests: +28772 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30571 ___ Python tracker ___

[issue46287] UNC path normalisation issues on Windows

2022-01-12 Thread neonene
neonene added the comment: > PathCchSkipRoot() doesn't recognize forward slash as a path separator, I opened issue46362 and PR30571 about the mentioned abspath() behaviors. -- ___ Python tracker __

[issue46363] Two typos in verions 3.7 document translation of zh_CN

2022-01-12 Thread perlang
New submission from perlang : In this URL, https://docs.python.org/zh-cn/3.7/library/ctypes.html There are two typos of '回掉' , the correct should be '回调'(means callback) I think. Best Regards, perlang -- assignee: docs@python components: Documentation messages: 410459 nosy: docs@pyth

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: def comb64(n, k): 'comb(n, k) in multiplicative group modulo 64-bits' return (F[n] * Finv[k] * Finv[n-k] & (2**64-1)) << (S[n] - S[k] - S[n - k]) def comb_iterative(n, k): 'Straight multiply and divide when k is small.' result = 1 for r

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file50559/comb_pole2.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue46279] [docs] Minor information-ordering issue in __main__ doc

2022-01-12 Thread FeRD (Frank Dana)
FeRD (Frank Dana) added the comment: Readding Tal to the nosy list, since my previous comment was inadvertently accompanied by an eviction! (Sorry about that.) -- nosy: +taleinat ___ Python tracker

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Wasn’t the fix for it also backported? (Weird that the test wasn’t part of the fix.) -- ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: @gvanrossum Ah okay, Looks like bpo-46195 is the root of this issue. In this case, backporting is reasonable. -- ___ Python tracker ___ ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: @sobolevn Do you want to close it? Cleaning up the issue is one of the duties of triage members :) -- ___ Python tracker ___ __

<    1   2