[issue26415] Excessive peak memory consumption by the Python parser

2019-02-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2019-02-12 Thread Joshua Oreman
Joshua Oreman added the comment: I also ran into this. My workaround was to use gc.get_referents() on the async_generator_asend object, which returns a one-element list containing the async generator object. I don't know if this is guaranteed or just happened to work in the cases I was using

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > As such the cleanup in case of failure should not be expected, Given that the documentation specifically calls out permissions errors as a cause of leaving the new directory in place, it wouldn't be unreasonable for someone to think the function does a cle

[issue35979] Incorrect __text_signature__ for the __get__ slot wrapper

2019-02-12 Thread Dan Snider
New submission from Dan Snider : The current signature: "__get__($self, instance, owner, /)\n--\n\nReturn an attribute of instance, which is of type owner." doens't match how wrap_descr_get actually parses the arguments to __get__ with: PyArg_UnpackTuple(args, "", 1, 2, &obj, &type)

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread shawnberry
New submission from shawnberry : Please see my GitHub page https://github.com/shawnberry/Improved_random.choices/blob/master/Improved_Py3_BIF_random_dot_choices.py for code that reduces Py3 BIF random.choices() from O(N**2) to O(N). This is my first suggestion to improve Python code. Thanks, sh

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-12 Thread Emmanuel Arias
Emmanuel Arias added the comment: > Otherwise I'd say it would be nice to refactor in such a way that avoids the > core dump when the problem is on the Python side I agree with @p-ganssle, If exist some problem on initialize Python interpreter it would be great if it return a non-zero statu

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Ammar Askar
Ammar Askar added the comment: I can't speak to the complexity of the choices function but if you're proposing an alternative implementation for choices, it would be wise to show the benefits empirically. That is, benchmarks and an explanation of why your implementation would be better than

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35962] Slight error in words in [ 2.4.1. String and Bytes literals ]

2019-02-12 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +ncoghlan versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: What's "BIF" mean? You use that term multiple times but I have never heard it before. I'm sorry, I don't understand your code (and don't have time to study it in detail to decipher it). It would help if you factored out your new implementation of choices()

[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-12 Thread Michael Sullivan
Change by Michael Sullivan : -- keywords: +patch pull_requests: +11865 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue35155] Clarify Protocol Handlers in urllib.request Docs

2019-02-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: unittest is another module with half-fixed and half-variable names. The default (glob) pattern for test module names is given as "test*.py". The fixed pattern for test methods is given as "starts with 'test'". This could have been given, I believe, as re

[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed by b9d2e97601847a1845bf96e2895a6214f02b92a6 (GH-11832). -- nosy: +pablogsal resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-12 Thread Guido van Rossum
Change by Guido van Rossum : -- assignee: -> gvanrossum components: +Interpreter Core stage: -> needs patch type: -> behavior versions: +Python 3.8 ___ Python tracker ___ __

[issue35927] Intra-package References Documentation Incomplete

2019-02-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: AData> You log and output show that you problem is as described: package 'sound' is in directory "C:/" and "C:/" is not is sys.path. Possible remedies: 1. Add "C:/" to sys.path at the top of each module that imports sound. This is a nuisance. 2. Move the so

[issue35121] Cookie domain check returns incorrect results

2019-02-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This issue affects 2.7 as well along with 3.4 and 3.5. The initial report was notified to secur...@python.org . 2.7.16 release candidate dates were announced at https://mail.python.org/pipermail/python-dev/2019-February/156266.html. I have prepared

[issue21107] Add pgen.vcxproj to allow regenerating grammar files on Windows

2019-02-12 Thread Zachary Ware
Zachary Ware added the comment: This patch is *way* out of date, and we're in the midst of removing pgen (issue35808) anyway, so I'm closing this issue. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-12 Thread maokk
New submission from maokk : shutil.make_archive("foo...bar..", "zip", os.path.abspath("c:/test")) create zipfile called "foo...bar.zip" not "foo...bar...zip" -- components: Distutils messages: 335388 nosy: dstufft, eric.araujo, highwind priority: normal severity: normal status: open ti

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread shawnberry
shawnberry added the comment: Hi PSF, Upon further review, random.choices() is O(N). I was looping through the values in random.choices() to make it O(N**2) in my code. Next time I will thoroughly check a function on its own before raising any issue. Fyi, BIF is built-in function. Please c

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2019-02-12 Thread Susan Su
Susan Su added the comment: After taking a look at the assert_called_with function, I noticed that the formatting is inconsistent for the following case: from unittest import mock m = mock.Mock() a = [1, 2, 3, 4] m.assert_called_with(*a) Traceback (most recent call last): File "", line 1, i

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as requested by OP. -- nosy: +mark.dickinson stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread SilentGhost
Change by SilentGhost : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue35979] Incorrect __text_signature__ for the __get__ slot wrapper

2019-02-12 Thread SilentGhost
SilentGhost added the comment: Is it not? This seems to be doing exactly what's intended. If you have a reproducible bug trigger, please post it, but I'll close the issue in the meantime. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type:

<    1   2