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

2018-09-21 Thread thautwarm
thautwarm added the comment: I'm in favor of this idea for prospective extensions that could be implemented through this brand-new ast.Constant. Actually I used to expect a more general ast.Constant when I was manipulating ASTs half a year ago, at that time my job is to make staging

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Ethan Furman added the comment: New changeset 0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3 by Ethan Furman in branch '3.7': [3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486)

[issue32352] `inspect.getfullargspec` doesn't work fine for some builtin callable objects

2018-09-21 Thread thautwarm
thautwarm added the comment: Maybe a few adjustments to this one? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 7529754d26f5e744ae25bee56fdc1937bcf08c7e by Miss Islington (bot) (Christian Heimes) in branch '3.6': [3.6] bpo-34759: Fix error handling in ssl 'unwrap()' (GH-9468) (GH-9492)

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset c00f7037df3607c89323e68db3ab996b7df394de by Miss Islington (bot) in branch '3.7': bpo-34759: Fix error handling in ssl 'unwrap()' (GH-9468) https://github.com/python/cpython/commit/c00f7037df3607c89323e68db3ab996b7df394de --

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

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 5c3d8b2efda1b99abe09ad925f366c5695bd66fb by Miss Islington (bot) in branch '3.7': [3.7] bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) (GH-9488) https://github.com/python/cpython/commit/5c3d8b2efda1b99abe09ad925f366c5695bd66fb

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

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 10be1d3f802b874914b2a13eb41407c7a582d9b3 by Miss Islington (bot) in branch '2.7': [2.7] bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) (GH-9490) https://github.com/python/cpython/commit/10be1d3f802b874914b2a13eb41407c7a582d9b3

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

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset d1b336e530472f316b1d164d04626724c83b16d7 by Miss Islington (bot) in branch '3.6': [3.6] bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) (GH-9489) https://github.com/python/cpython/commit/d1b336e530472f316b1d164d04626724c83b16d7

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +8902 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset c0da582b227f311126e278b5553a7fa89c79b054 by Miss Islington (bot) (Nathaniel J. Smith) in branch 'master': bpo-34759: Fix error handling in ssl 'unwrap()' (GH-9468)

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8901 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8899 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8900 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 026337a7101369297c8083047d2f3c6fc9dd1e2b by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) https://github.com/python/cpython/commit/026337a7101369297c8083047d2f3c6fc9dd1e2b

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

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8898 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

2018-09-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-09-21 Thread Tim Peters
Tim Peters added the comment: Because the behavior of signed integer overflow isn't defined in C. Picture a 3-bit integer type, where the maximum value of the signed integer type is 3. 3+3 has no defined result. Cast them to the unsigned flavor of the integer type, though, and the result

[issue32117] Tuple unpacking in return and yield statements

2018-09-21 Thread Jordan Chapman
Change by Jordan Chapman : -- pull_requests: +8897 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-09-21 Thread Tim Peters
Tim Peters added the comment: >> Why do you claim the original was "too small"? Too small for >> what purpose? > If the multiplier is too small, then the resulting hash values are > small too. This causes collisions to appear for smaller numbers: All right! An actual reason ;-) So there

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-09-21 Thread Windson Yang
Windson Yang added the comment: Hello, Tim Peters. I wonder why we need to add size_t here: assert((size_t)Py_SIZE(a) + (size_t)Py_SIZE(b) <= (size_t)PY_SSIZE_T_MAX); AFAIK, PY_SSIZE_T_MAX = ((Py_ssize_t)(((size_t)-1)>>1)) which is signed, either Py_SIZE(a) or Py_SIZE(b) is a positive

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +8896 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Ethan Furman added the comment: New changeset 5bdab641da0afd8aa581dfbde4f82d88d337c4b5 by Ethan Furman in branch 'master': bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) https://github.com/python/cpython/commit/5bdab641da0afd8aa581dfbde4f82d88d337c4b5

[issue32117] Tuple unpacking in return and yield statements

2018-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed by https://github.com/python/cpython/pull/4509. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32117] Tuple unpacking in return and yield statements

2018-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset fd97d1f1af910a6222ea12aec42c456b64f9aee4 by Guido van Rossum (David Cuthbert) in branch 'master': bpo-32117: Allow tuple unpacking in return and yield statements (gh-4509)

[issue34537] test_gdb fails with LC_ALL=C

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset e5fde1f992e94f166415ab96d874ed1d2e0c8004 by Miss Islington (bot) in branch '3.7': bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483) https://github.com/python/cpython/commit/e5fde1f992e94f166415ab96d874ed1d2e0c8004 -- nosy:

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: I was pointed here after we found some erroneous behavior. We have a script run by the system python that invokes a specific venv's python3 with a -m flag requesting a module that is installed (only) in that venv. A user complained that this failed, with

[issue34537] test_gdb fails with LC_ALL=C

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: I don't think that it's worth it to backport the change to Python 3.6 and older, since "LC_ALL=C ./python -m test test_gdb" already pass on 2.7 and 3.6. -- ___ Python tracker

[issue34537] test_gdb fails with LC_ALL=C

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8895 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34537] test_gdb fails with LC_ALL=C

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7279b5125e7c5d84a473d250b27d353cb7f6628e by Victor Stinner (Elvis Pranskevichus) in branch 'master': bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483) https://github.com/python/cpython/commit/7279b5125e7c5d84a473d250b27d353cb7f6628e

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-09-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: There was some disagreement later on the list about adding this warning. We will fix security issues in SimpleHTTPServer. -- nosy: +benjamin.peterson ___ Python tracker

[issue34768] Add documentation explaining __init__.py in packages

2018-09-21 Thread Benito Kestelman
Change by Benito Kestelman : -- title: Add documentation for the purpose of __init__.py in packages -> Add documentation explaining __init__.py in packages ___ Python tracker

[issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported?

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31007] ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) expected ERROR_INVALID_HANDLE on x86 Windows7 3.x

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-09-21 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: Perhaps SOURCE_DATE_EPOCH should only be consulted to determine the default behavior if invalidation_mode was not passed explicitly to py_compile.compile(). -- ___ Python tracker

[issue31511] test_normalization: test.support.open_urlresource() doesn't handle urllib.error.URLError timeout

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31986] [2.7] test_urllib2net.test_sites_no_connection_close() randomly fails on Python 2.7

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32706] test_check_hostname() of test_ftplib started to fail randomly

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: Christian: It seems like the test now pass on my Fedora 27. Is it time to enable the test again? -- ___ Python tracker ___

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: As I said on the PR, this is because Unicode gives U+4E17 (and other CJK ideographs) a numeric value only in the UniHan database not the normal UCD. makeunicodedata.py only looks at UCD for numeric values. -- nosy: +benjamin.peterson

[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-09-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: I dislike that having SOURCE_DATE_EPOCH set magically changes command line tools behavior. In my view, this problem should be fixed by reverting ccbe5818af2. -- nosy: +benjamin.peterson ___ Python tracker

[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-09-21 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: > In particular, if a build system sets SOURCE_DATE_EPOCH without specifying a pyc format for py_compile or compileall, Python 3.7 will give you checked hashes by default Actually, py_compile will _force_ the CHECKED_HASH mode if SOURCE_DATE_EPOCH is

[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-09-21 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- keywords: +patch pull_requests: +8894 stage: -> patch review ___ Python tracker ___ ___

[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-09-21 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, Andrew: Do you know if the executor doesn't wait on purpose? Would it > be possible to change that in Python 3.8? Maybe. At least we need to add a "timeout" argument to asyncio.run() to let it wait for executor jobs. I'm also thinking about making

[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset d64ee1a5ba2007ae5fe085dd3495013d940a51bb by Miss Islington (bot) (Brett Cannon) in branch 'master': bpo-32718: Make Activate.ps1 for venv cross-platform and available on all platforms (GH-9321)

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: Yury, Andrew: Do you know if the executor doesn't wait on purpose? Would it be possible to change that in Python 3.8? -- ___ Python tracker

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +easy title: SimpleHTTPServer: warn users on security -> [EASY doc] http.server, SimpleHTTPServer: warn users on security ___ Python tracker

[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: It seems like the bug has been fixed. Thanks Zachary Ware for the fix, and thanks everybody for helping to fix this cache issue ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue34561] Replace list sorting merge_collapse()?

2018-09-21 Thread Tim Peters
Tim Peters added the comment: Thank you, Vincent! I very much enjoyed - and appreciated - your paper I referenced at the start. Way back when, I thought I had a proof of O(N log N), but never wrote it up because some details weren't convincing - even to me ;-) . Then I had to move on to

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I pushed a minor update to the PR, changing the MULTIPLIER and explaining the chosen constants. -- ___ Python tracker ___

[issue34744] New %(flag)s format specifier for argparse.add_argument help string

2018-09-21 Thread paul j3
paul j3 added the comment: In your proposed change: params = dict(vars(action), prog=self._prog) + if action.option_strings: + params['flag'] = action.option_strings[0] 'params', as I noted earlier already includes the 'dest' and 'option_strings' list.

[issue34537] test_gdb fails with LC_ALL=C

2018-09-21 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- keywords: +patch pull_requests: +8893 stage: -> patch review ___ Python tracker ___ ___

[issue34764] Improve documentation example for using iter() with sentinel value

2018-09-21 Thread ChrisRands
ChrisRands added the comment: Thank you Raymond, I like both your examples, although I think I prefer 1) for the simplicity -- ___ Python tracker ___

[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2018-09-21 Thread Dan Snider
Dan Snider added the comment: It's working as intended. locals() and vars() simply returns the current frame's f_locals. In functions, modifying this usually accomplishes nothing useful because the code object has OPTIMIZED and NEWLOCALS flags set, meaning local variables are looked up or

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

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: > * If the user of NodeVisitor implemented visit_Num(), but not implemented > visit_Constant(), his handler will not be triggered. This can be easily fixed > by implementing visit_Constant(). Constant was introduced in 3.6. IHMO that's an acceptable

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2018-09-21 Thread Mario
Mario added the comment: On 21/09/2018 21:44, Steve Dower wrote: > > Steve Dower added the comment: > > I meant returning the full name of the process is intentional. But you're > right that overriding it should actually override it. > > I found the prior bug at issue33180, but I'm

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

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Can you describe what usages of the old API will continue to work, and what > part will break? Very good question! What will continue to work: * Instantiating. Both `Num(42)` and `Num(n=42)` will continue to work, but they will return an instance of

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

2018-09-21 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +8892 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think there is also a fourth option: add a flag to `get_type_hints()` that will guard evaluation of forward references, as proposed in https://github.com/python/typing/issues/508. If the evaluation of a "forward reference" raises an error, then we keep

[issue21983] segfault in ctypes.cast

2018-09-21 Thread Steve Dower
Steve Dower added the comment: Still needs a backport to 2.7 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33091] ssl.SSLError: Invalid error code (_ssl.c:2217)

2018-09-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> SSLSocket read/write thread-unsafety ___ Python tracker ___

[issue32533] SSLSocket read/write thread-unsafety

2018-09-21 Thread Steve Dower
Steve Dower added the comment: Fixed, with a fix for the regression coming in issue34759 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname

2018-09-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-09-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32282] When using a Windows XP compatible toolset, `socketmodule.c` fails to build

2018-09-21 Thread Steve Dower
Steve Dower added the comment: I'm going to just close this without fixing 3.5. If there's demand, we can consider it, but at this stage it's so easy for people to migrate to 3.6 or later that I'm sure that's already been done. -- resolution: -> fixed stage: backport needed ->

[issue33180] Flag for unusable sys.executable

2018-09-21 Thread Steve Dower
Steve Dower added the comment: Closing in favour of issue34725 -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2018-09-21 Thread Steve Dower
Steve Dower added the comment: I meant returning the full name of the process is intentional. But you're right that overriding it should actually override it. I found the prior bug at issue33180, but I'm closing it in favour of this one. I don't have fully fleshed out semantics in my mind

[issue34763] Python lacks 0x4E17

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: $ ./python Python 3.8.0a0 (heads/master-dirty:06e7608207, Sep 20 2018, 01:52:01) >>> import unicodedata >>> unicodedata.unidata_version '11.0.0' >>> unicodedata.numeric('\u5345') 30.0 >>> unicodedata.numeric('\u4E17') ValueError: not a numeric character

[issue33649] asyncio docs overhaul

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset e45662c28bfc84aa3674463a2995e45da4d63793 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-33649: Fix gather() docs; fix title; few other nits. (GH-9475) (GH-9481)

[issue33782] VSTS Windows-PR: internal error

2018-09-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Concerning the MULTIPLIER: > Why do you claim the original was "too small"? Too small for what purpose? If the multiplier is too small, then the resulting hash values are small too. This causes collisions to appear for smaller numbers: BEFORE: >>> L =

[issue33649] asyncio docs overhaul

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8891 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34267] find_python.bat doesn't find installed Python 3.7

2018-09-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33649] asyncio docs overhaul

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset db1a80e97aa7217c561fb3627f70be1882de9534 by Yury Selivanov in branch 'master': bpo-33649: Fix gather() docs; fix title; few other nits. (GH-9475) https://github.com/python/cpython/commit/db1a80e97aa7217c561fb3627f70be1882de9534 --

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

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: Hum, I'm not sure that I understood correctly: does "isinstance(node, ast.Num)" still work with the patch? If yes, I see no reason to not merge the change ;-) -- ___ Python tracker

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > FWIW, the current algorithm also has some advantages that we don't want to > lose. In particular, the combination of the int hash and tuple hash are good > at producing distinct values for non-negative numbers: >>> from itertools import product

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: Fixed in master and 3.7. Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: PEP update: https://github.com/python/peps/commit/977a94d1a79b71336568119eb689b277d2ffec80 -- ___ Python tracker ___

[issue34751] Hash collisions for tuples

2018-09-21 Thread Tim Peters
Tim Peters added the comment: Oops! """ "j odd implies j^(-2) == -j, so that m*(j^(-2)) == -m" """ The tail end should say "m*(j^(-2)) == -m*j" instead. -- ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 187f2dd256a917c20bf55954d019fd35fb46ab08 by Miss Islington (bot) in branch '3.7': bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) https://github.com/python/cpython/commit/187f2dd256a917c20bf55954d019fd35fb46ab08

[issue34751] Hash collisions for tuples

2018-09-21 Thread Tim Peters
Tim Peters added the comment: For me, it's largely because you make raw assertions with extreme confidence that the first thing you think of off the top of your head can't possibly make anything else worse. When it turns out it does make some things worse, you're equally confident that the

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Further, that example specifically exploits that "hash(-1) == hash(-2)" No, it does not. There is no hashing of -1 involved in the example hash((1,0,0)) == hash((1,-2,-2)). -- ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8890 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 2ec872b31e25cee1f983fe07991fb53f3fd1cbac by Yury Selivanov in branch 'master': bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) https://github.com/python/cpython/commit/2ec872b31e25cee1f983fe07991fb53f3fd1cbac

[issue34768] Add documentation for the purpose of __init__.py in packages

2018-09-21 Thread Benito Kestelman
New submission from Benito Kestelman : I just learned how to make my own package in python and upload it to pypi. I mainly used the documentation here: https://packaging.python.org/tutorials/packaging-projects/ Other than the toy example, there is no explanation of __init__.py, its purpose,

[issue34751] Hash collisions for tuples

2018-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM the collision of "hash((1,0,0)) == hash((1,-2,-2))" also stems from integers hashing to themselves and that twos-complement arithmetic relation, -x == ~x+1. Further, that example specifically exploits that "hash(-1) == hash(-2)" due to how error

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

2018-09-21 Thread Christian Heimes
Christian Heimes added the comment: CVE-2018-14647 was assigned to this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue34751] Hash collisions for tuples

2018-09-21 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not one to judge the effectiveness of a new hash algorithm. But my personal concern here is making something else worse: an unintended consequence. IMO the bar for changing this would be very high, and at the least it would need to be addressing a known,

[issue34764] Improve documentation example for using iter() with sentinel value

2018-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that the readline() example is problematic. While it succeeds in showing how iter() works, the example itself is not the best way to solve that particular problem. Here are two possible substitute examples. 1) Simple example that focuses

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I should also make it clear that the collision hash((1,0,0)) == hash((1,-2,-2)) that I reported is due to the algorithm, it's not due to some bad luck that 2 numbers happen to be the same. There are also many more similar hash collisions for tuples (all

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326012 ___ Python tracker ___ ___ Python-bugs-list

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326014 ___ Python tracker ___ ___ Python-bugs-list

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326013 ___ Python tracker ___ ___ Python-bugs-list

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326015 ___ Python tracker ___ ___ Python-bugs-list

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Matthew Barnett added the comment: Unicode 11.0.0 has 卅 (U+5345) as being numeric and having the value 30. What's the difference between that and U+4E17? I notice that they look at lot alike. Are they different variants, perhaps traditional vs simplified? --

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: We use the Unicode database for these methods. Could you please check whether the database marks the character as numeric ? If yes, we may need to check the database generation. Otherwise, there isn't much we can do, since we use the Unicode database as

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Ned Deily
Ned Deily added the comment: Since we've already delayed 3.7.1rc cutoff for a few days, let's get it into 3.7.1 if you have the time, Yury. -- ___ Python tracker ___

[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Eric Snow
Eric Snow added the comment: As Serhiy said, this is the correct behavior. Nearly all builtin operations are made using the appropriate "dunder" method from the object's type (not looked up on the object itself). So the following (based on your example) are equivalent: s = super(Child,

[issue34766] BaseProxy cache should be cleaned when Manager client is reconnected

2018-09-21 Thread Yongnan Wu
Change by Yongnan Wu : -- keywords: +patch pull_requests: +8889 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Stefan Behnel
Stefan Behnel added the comment: > because Py_buffer isn't a PyObject at all :) It owns a PyObject reference to the buffer owner, though. -- nosy: +scoder ___ Python tracker

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

2018-09-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: As someone who does AST manipulation (Quixote PTL template support), I'm interested in this patch. I think what is proposed sounds like a good change. I.e. having the extra node types is not useful and makes the compiler harder to understand. Providing

  1   2   >