[issue36047] socket file handle does not support stream write

2019-02-19 Thread Windson Yang
Windson Yang added the comment: >From the docs >https://docs.python.org/3/library/socket.html#socket.socket.makefile, the >default mode for makefile() is 'r' (only readable). In your example, just use >S = s.makefile(mode='w') instead. -- nosy: +Windson Yang

[issue36045] builtins.help function is not much help with async functions

2019-02-19 Thread Dan Rose
Dan Rose added the comment: Note to future self: whatever solution should also play nice with functools.partial -- ___ Python tracker ___

[issue36045] builtins.help function is not much help with async functions

2019-02-19 Thread Dan Rose
Dan Rose added the comment: Thanks for the suggestion, Raymond. I was toying with the idea of a PR, but wasn’t sure what the resolution should be, and it’s a rather subtle decision for my first contribution. It seems to me that this might be an oversight in PEP-0484, and the purest

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2019-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue33039. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33039] int() and math.trunc don't accept objects that only define __index__

2019-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue33039. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers

2019-02-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +11977 stage: -> patch review ___ Python tracker ___ ___

[issue36030] add internal API function to create tuple without items array initialization

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Zeroing memory is usually not expensive relative to the cost of filling it in. Also, the timing loop is unrealistic. We mostly care about small tuples. For long term maintenance of the project, I recommend filling the code with these unsafe variants

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @eryk, @vstinner and @steve, I think I could not work on this issue today, but will continue to fix it asap (tomorrow or on this evening). -- ___ Python tracker

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers

2019-02-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently, C API functions that convert a Python number to a C integer like PyLong_AsLong() and argument parsing functions like PyArg_ParseTuple() with integer converting format units like 'i' use the __int__() special method for converting objects

[issue36031] add internal API function to effectively convert just created list to tuple

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 This technique has a low payoff (possibly even zero due to memcpy() overhead) but is likely to create future maintenance issues (risk of bugs due to the fragility of assuming a refcnt of one, awkwardness of maintenance if we have to alter the

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-19 Thread Eryk Sun
Eryk Sun added the comment: > os.access(path, os.X_OK) is specific to Unix. It doesn't make sense > on Windows. It doesn't make sense with the current implementation of os.access, and not as Stéphane used it. Even if we completely implemented os.access, the problem is that most files grant

[issue32528] Change base class for futures.CancelledError

2019-02-19 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-02-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: It's okay with me if you want to backport minimum_version (and I suppose maximum_version). -- ___ Python tracker ___

[issue31904] Python should support VxWorks RTOS

2019-02-19 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +11976 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35945] Cannot distinguish between subtask cancellation and running task cancellation

2019-02-19 Thread twisteroid ambassador
twisteroid ambassador added the comment: I wrote a recipe on this idea: https://gist.github.com/twisteroidambassador/f35c7b17d4493d492fe36ab3e5c92202 Untested, feel free to use it at your own risk. -- ___ Python tracker

[issue35885] configparser: indentation

2019-02-19 Thread Emmanuel Arias
Emmanuel Arias added the comment: > I already have some example code for it Do you have a patch? -- nosy: +eamanu ___ Python tracker ___

[issue36045] builtins.help function is not much help with async functions

2019-02-19 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34793] Remove support for "with (await asyncio.lock):"

2019-02-19 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36047] socket file handle does not support stream write

2019-02-19 Thread wang xuancong
New submission from wang xuancong : Python3 programmers have forgotten to convert/implement the socket file descriptor for IO stream operation. Would you please add it? Thanks! import socket s = socket.socket() s.connect('localhost', 5432) S = s.makefile() # on Python2, the following works

[issue35224] PEP 572: Assignment Expressions

2019-02-19 Thread Kubilay Kocak
Change by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2019-02-19 Thread Eryk Sun
Eryk Sun added the comment: > I don't see any value in testing the drive name separately. If the file number is non-zero, then the volume is the only question. I limited the comparison to just the drives in case the volume supports hardlinks. We can change the check to `s1.st_ino and

[issue36046] support dropping privileges when running subprocesses

2019-02-19 Thread Patrick McLean
Change by Patrick McLean : -- keywords: +patch pull_requests: +11974 stage: -> patch review ___ Python tracker ___ ___

[issue36046] support dropping privileges when running subprocesses

2019-02-19 Thread Patrick McLean
New submission from Patrick McLean : Currently when using python to automate system administration tasks, it is useful to drop privileges sometimes. Currently the only way to do this is via a preexec_fn, which has well-documented problems. It would be useful to be able to pass a user and

[issue23428] Use the monotonic clock for thread conditions on POSIX platforms

2019-02-19 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 ___ Python tracker ___

[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset 001fee14e0f2ba5f41fb733adc69d5965925a094 by Inada Naoki in branch 'master': bpo-12822: use monotonic clock for condvar if possible (GH-11723) https://github.com/python/cpython/commit/001fee14e0f2ba5f41fb733adc69d5965925a094 --

[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2019-02-19 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue30717] Add unicode grapheme cluster break algorithm

2019-02-19 Thread Bert JW Regeer
Change by Bert JW Regeer : -- nosy: +Bert JW Regeer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36012] Investigate slow writes to class variables

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Neil. The tooling does indeed look nice. I added your PyUnicode_InternInPlace() suggestion to the PR. At this point, the PR looks ready-to-go unless any of you think we've missed some low-hanging fruit. --

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: > I have thought about merging delegator and colorizer into one module, > possibly with percolator included, and adding a module docstring that > explains how they work together. This would still be only a few hundred > lines. (And multiple htests in one

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll work up a PR for this. We can continue to tease-out the best method names. I've has success with "examples" and "from_samples" when developing this code in the classroom. Both names had the virtue of being easily understood and never being

[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Changing the title to reflect a focus on building-out pow() instead of a function in the math module. -- title: Consider adding modular multiplicative inverse to the math module -> Support negative exponents in pow() where a modulus is specified.

[issue36045] builtins.help function is not much help with async functions

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: This would be a reasonable addition to help(). Would you like to make a PR? An "async def" can be detected with inspect.iscoroutinefunction(the_answer2). -- keywords: +easy nosy: +rhettinger stage: -> needs patch type: -> enhancement versions:

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: > CPython only makes these methods class method when a class created. > If you set __class_getitem__ method after the creation it > doesn't work unless you use classmethod decorator manually. Give the intended use case for __class_getitem__ and that it

[issue36045] builtins.help function is not much help with async functions

2019-02-19 Thread Dan Rose
Change by Dan Rose : -- title: Help function is not much help with async functions -> builtins.help function is not much help with async functions ___ Python tracker ___

[issue36045] Help function is not much help with async functions

2019-02-19 Thread Dan Rose
New submission from Dan Rose : It is very important when using a callable to know whether it is async or not. It is expected that `builtins.help` function should provide the information needed to properly use the function, but it omits whether it is an async function or not. ``` import

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2019-02-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'm curious if this _ever_ comes up so i'd like to leave it in at least through some betas. I don't believe it should be possible. If it is, it'd probably be a restricted execution environment that fails all signal() calls. all perror will do is emit

[issue36040] Python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int'

2019-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Fixed with commit https://github.com/python/cpython/commit/46a97920feaf4094436b2cdb32d2bd2fab3b59a5 -- nosy: +pablogsal resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue36040] Python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int'

2019-02-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +11973 stage: -> patch review ___ Python tracker ___ ___

[issue30717] Add unicode grapheme cluster break algorithm

2019-02-19 Thread Jens Troeger
Change by Jens Troeger : -- nosy: +_savage ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35945] Cannot distinguish between subtask cancellation and running task cancellation

2019-02-19 Thread Nic Watson
Nic Watson added the comment: Excellent answer by twisteroid Ambassador. Resolved -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-19 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Is this an issue though? Shouldn't methods be defined in the class definition, we don't expect setting a function as an attribute to a class to transform it automatically to a method. Why would we special case __class_getitem__ and not __init_subclass__?

[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, the test suite exercises a lot of branches (like passing incorrect types to function to check errors) that will hurt the branch prediction that PGO generates. -- nosy: +pablogsal ___ Python tracker

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: To stop the discussion from happening in two places (sorry, Yury), I started a broader discussion on Async-sig with thread starting here: https://mail.python.org/pipermail/async-sig/2019-February/000548.html --

[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-02-19 Thread Neil Schemenauer
New submission from Neil Schemenauer : I was doing some 'perf' profiling runs of Python. I decided to try running PROFILE_TASK to see what the profile looks like. I was surprised that gc_collect dominated runtime: Children Self Symbol + 93.93% 6.00% [.]

[issue36034] Suprise halt caused by -Werror=implicit-function-declaration in ./Modules/posixmodule.c

2019-02-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I don't know what you mean by "in-line" pre-processing output, but you can use -E option to get the normal preprocessor output. Line directives will tell you where those functions come from on a system where there is no compilation error. Of course, if

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 6ee41793d2204c54bdf8f477ae61d016a7eca932 by Raymond Hettinger (Miss Islington (bot)) in branch '2.7': bpo-35584: Clarify role of caret in a class class (GH-11946) (GH-11948)

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset bb9ddee3d4e293f0717f8c167afdf5749ebf843d by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-35584: Clarify role of caret in a class class (GH-11946) (GH-11947)

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: I agree with Yuri. `Task.set_exception()` (let's assume it works) is very dangerous: if cancellation exception doesn't bubble up from coroutine code there is a very high chance to get broken invariants and not-released resources. The same situation is

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Well, if you want to unconditionally end tasks you shouldn't write coroutines > that ignore CancelledErrors. Well, of course. But code can have bugs, and maybe you didn't write the coroutine because it's from a library that you don't control. In that

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-19 Thread Tim Peters
Tim Peters added the comment: Raymond, I doubt we can do better (faster) than straightforward egcd without heroic effort anyway. We can't even know whether a modular inverse exists without checking whether the gcd is 1, and egcd builds on what we have to do for the latter anyway. Even if

[issue35941] ssl.enum_certificates() regression

2019-02-19 Thread nr
nr added the comment: Adjusted the code to conform with PEP 7. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: >> There's no clear reason to complicate the Task<->coroutine relationship by >> allowing to inject arbitrary exceptions into running coroutines. > My comment was more about CancelledError rather than arbitrary exceptions. > You didn't reply to the part of

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-19 Thread R. David Murray
R. David Murray added the comment: Since Address itself renders it correctly (str(address)), the problem is going to take a bit of digging to find. I'm guessing the quoted_string atom is getting transformed incorrectly into something else at some point during the folding. --

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-19 Thread Michael Selik
Michael Selik added the comment: +1, This would be useful for quick analyses, avoiding the overhead of installing scipy and looking through its documentation. Given that it's in the statistics namespace, I think the name can be simply ``Normal`` rather than ``NormalDist``. Also, instead of

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-19 Thread Francis MB
Francis MB added the comment: >> [...] This keeps the signature simple (Iterable -> Scalar). [...] >> >> Categorical, binned, or ordinal data: >> >> mode(data: Iterable, *, first_tie=False) -> object >> multimode(data: Iterable) -> List[object] This seems reasonable to me due legacy

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +11972 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +11971 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread miss-islington
miss-islington added the comment: New changeset 3bacf6126522a9b3bcb6be0c4f3ee6a895dfe772 by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-35584: Clarify role of caret in a class class (GH-11946)

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > There's no clear reason to complicate the Task<->coroutine relationship by > allowing to inject arbitrary exceptions into running coroutines. My comment was more about CancelledError rather than arbitrary exceptions. You didn't reply to the part of my

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @vstinner With the last commit, I don't test if the file is an executable but just if the extension is a .html file. For example, if you rename calc.exe by calc.html and you try to execute it in the default browser (via os.startfile()), you will get the

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +11970 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: A second reason why Task.cancel() seems to be an incomplete replacement: Task.set_exception() and Task.set_result() both give you a way to unconditionally end a task. With cancel() though, the docs say, "Task.cancel() does not guarantee that the Task will

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: > One reason why Task.cancel() is an incomplete replacement for > Task.set_exception() is that you don't have an easy way to communicate why > the task was ended. The result of the Task is bound to the result of the coroutine it wraps. If the coroutine

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Correction: that should have been bpo-31033. -- ___ Python tracker ___ ___ Python-bugs-list

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Use Task.cancel() or use a Queue to communicate with the task. One reason why Task.cancel() is an incomplete replacement for Task.set_exception() is that you don't have an easy way to communicate why the task was ended. With set_exception() and

[issue36033] logging.makeLogRecord should update "rv" using a dict defined with bytes instead of strings

2019-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: If the arguments are retrieved from a byte source, why can't they be converted to strings before passing to logging? This may be an issue for OpenStack. It's not logging's job to convert bytes passed to APIs that expect strings. --

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: in fact, I have published my PR because I have already the tests and I have another approach for this issue. -- stage: patch review -> ___ Python tracker

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-19 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +11969 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @xtreak sorry, but I have already worked on this issue :/ can I publish my PR? -- nosy: +matrixise versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems like a good change to me. GitHub PRs are accepted please see https://devguide.python.org/ . Since this is an enhancement it can only go as part of Python 3.8 if accepted. -- nosy: +xtreak versions: -Python 3.6, Python 3.7

[issue36012] Investigate slow writes to class variables

2019-02-19 Thread Neil Schemenauer
Neil Schemenauer added the comment: BTW, 'perf report [...]' has a really neat annotated assembly view. Scroll to the function you are interested in and press 'a'. Press 't' to toggle the time units (left side numbers). I'm attaching a screenshot of the disassembly of the lookdict

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Louis Michael
Change by Louis Michael : -- keywords: +patch pull_requests: +11968 stage: -> patch review ___ Python tracker ___ ___

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-02-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.8 -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: > +1 for the pow(value, -1, modulus) spelling. It should raise > `ValueError` if `value` and `modulus` are not relatively prime. > It would feel odd to me _not_ to extend this to > `pow(value, n, modulus)` for all negative `n`, again > valid only only if

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-19 Thread Alexander Kapshuna
New submission from Alexander Kapshuna : FileCookieJar and it's subclasses don't accept Paths and DirEntrys. Minimal code to reproduce: === import pathlib from http.cookiejar import FileCookieJar saved_cookies = pathlib.Path('my_cookies.txt') jar = FileCookieJar(saved_cookies) === Results

[issue36012] Investigate slow writes to class variables

2019-02-19 Thread Neil Schemenauer
Neil Schemenauer added the comment: Some profiling using 'perf'. This is for cpython 63fa1cfece4912110ce3a0ff11fb3ade3ff5e756. children self [...] + 97.27% 0.00% run_mod (inlined) + 88.53% 6.33% PyObject_SetAttr + 79.34% 6.80% type_setattro + 43.92%43.92%

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @vstinner I have fixed some URLs but we need to update pythontest.net for some tests. For example: test.test_urllib2.MiscTests.test_issue16464 raises a HTTP 405 and pythontest.net does not support the requested method.

[issue35584] Wrong statement about ^ in howto/regex.rst

2019-02-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35155] Clarify Protocol Handlers in urllib.request Docs

2019-02-19 Thread Denton Liu
Denton Liu added the comment: If there aren't anymore comments, I think this PR is ready for a second round of reviews. Thanks! -- ___ Python tracker ___

[issue36033] logging.makeLogRecord should update "rv" using a dict defined with bytes instead of strings

2019-02-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I don't get the report. Can you please add a short reproducer script with a description of the current behavior and the expected behavior? -- nosy: +xtreak ___ Python tracker

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36037] test_ssl fails on RHEL8 strict OpenSSL configuration

2019-02-19 Thread STINNER Victor
STINNER Victor added the comment: Ok, Python 3.7 and 3.8 (master) have been fixed. See bpo-35925 (and bpo-36005) for discussions on Python 2.7 and 3.6. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7

[issue36037] test_ssl fails on RHEL8 strict OpenSSL configuration

2019-02-19 Thread miss-islington
miss-islington added the comment: New changeset e8bf04de4ba045029aa8964126d8cdd2d7c282a6 by Miss Islington (bot) in branch '3.7': bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940) https://github.com/python/cpython/commit/e8bf04de4ba045029aa8964126d8cdd2d7c282a6 -- nosy:

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-19 Thread BTaskaya
Change by BTaskaya : -- keywords: +patch pull_requests: +11967 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-19 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: > Is there a clear reason for your expectation that the xgcd-based algorithm > should be faster? Yeah, good question. Maybe I'm assuming too much, like assuming that it should be faster;) It may depend a lot on the constants indeed, but ultimately the

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-19 Thread BTaskaya
New submission from BTaskaya : CPython only makes these methods class method when a class created. If you set __class_getitem__ method after the creation it doesn't work unless you use classmethod decorator manually. >>> class B: ... pass ... >>> def y(*a, **k): ... return a, k ...

[issue36011] ssl - tls verify on Windows fails

2019-02-19 Thread Steve Dower
Steve Dower added the comment: Thanks. This is a well-known and long-standing issue between OpenSSL and Windows, and the best workaround right now is to use the Mozilla certs directly. One day when OpenSSL is no longer part of the CPython public API, then we can consider switching to an

[issue35941] ssl.enum_certificates() regression

2019-02-19 Thread Steve Dower
Steve Dower added the comment: The PR requires PEP 7 to be applied thoroughly, but I think the concept is sound enough. -- nosy: +nr ___ Python tracker ___

[issue36028] Integer Division discrepancy with float

2019-02-19 Thread Au Vo
Au Vo added the comment: thanks for the clarification. You have been a great help. Love Python and our supportive community! -- ___ Python tracker ___

[issue36040] Python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int'

2019-02-19 Thread Steve Dower
Steve Dower added the comment: Eh, just needs to change the local variable to Py_ssize_t. This applies to all platforms. Might be worth asserting that it is no bigger than the largest number of child tokens a node may have, but only if we have an arbitrary limit for that somewhere (I

[issue36037] test_ssl fails on RHEL8 strict OpenSSL configuration

2019-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +11966 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36037] test_ssl fails on RHEL8 strict OpenSSL configuration

2019-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ef6344ee53f59ee86831ec36ed2c6f93a56229d by Victor Stinner in branch 'master': bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940) https://github.com/python/cpython/commit/3ef6344ee53f59ee86831ec36ed2c6f93a56229d --

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-19 Thread Steve Dower
Steve Dower added the comment: The most I'd be okay with doing here is filtering for "://" in the webbrowser module, and not limiting "scheme" at all except that it must be a valid scheme. Windows allows apps and programs to extend protocol handling in HKEY_CLASSES_ROOT\PROTOCOLS\Handler

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-19 Thread Steve Dower
Steve Dower added the comment: We don't support older versions of MSVC at this point, so the version check seems unnecessary. If we need to alias these within the CPython sources for non-MSVC compilers, then we should do it in source files. In general, we never want to pollute the user's

[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2019-02-19 Thread Steve Dower
Steve Dower added the comment: Would it make sense to add a parameter to _getfinalpathname that specifies the type of the path? For same[open]file(), we can probably just go to the most unreadable but broadly supported type, whereas the other functions that are actually going to return the

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-19 Thread Mark Dickinson
Mark Dickinson added the comment: > Then, it should be considerably faster Why would you expect that? Both algorithms involve a number of (bigint) operations that's proportional to log(p), so it's going to be down to the constants involved and the running times of the individual operations.

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-19 Thread Aaryn Tonita
New submission from Aaryn Tonita : When using a policy for an EmailMessage that triggers folding (during serialization) of a fairly long display_name in an address field, the folding process removes the quotes from the display name breaking the semantics of the field. In particular, for a

[issue36040] Python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int'

2019-02-19 Thread STINNER Victor
New submission from STINNER Victor : Example on AMD64 Windows8.1 Non-Debug 3.x buildbot: https://buildbot.python.org/all/#/builders/12/builds/2024 2>d:\buildarea\3.x.ware-win81-release\build\python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible

[issue36039] Replace append loops with list comprehensions

2019-02-19 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: In some places, using a lot is also a deliberate choice to improve readability. I think the boy scout rule is more appropriate for such changes. -- nosy: +remi.lapeyre ___ Python tracker

  1   2   3   >