[issue35928] socket makefile read-write discards received data

2019-02-10 Thread Ammar Askar
Ammar Askar added the comment: Recreatable on master as well, also Martin your suspicion seems correct, reverting https://github.com/python/cpython/commit/23db935bcf258657682e66464bf8512def8af830 fixes it. -- nosy: +ammar2, serhiy.storchaka stage: -> needs patch versions: +Python

Re: The slash "/" as used in the documentation

2019-02-10 Thread Terry Reedy
On 2/10/2019 11:32 PM, Ian Kelly wrote: On Sun, Feb 10, 2019 at 9:34 AM Chris Angelico wrote: Do you ACTUALLY want to call math.sin(x=1.234) or is it purely for the sake of consistency? Aside from questions about the help format, what is actually lost by the inability to pass those arguments

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Mon, Feb 11, 2019 at 12:19 AM Terry Reedy wrote: > The pass-by-position limitation is not in CPython, it is the behavior of > C functions, which is the behavior of function calls in probably every > assembly and machine language. Allowing the flexibility of Python > function calls take extra

Re: The use of type()

2019-02-10 Thread ^Bart
a = 5 print(a.__class__.__name__) int b = 5.0 print(b.__class__.__name__) float Thank you very much! :) ^Bart -- https://mail.python.org/mailman/listinfo/python-list

[issue35928] socket makefile read-write discards received data

2019-02-10 Thread Palle Ravn
Palle Ravn added the comment: >>> f = TextIOWrapper(BufferedRWPair(BytesIO(b"Hello\nYou\n"), BytesIO())) >>> f.readline() 'Hello\n' >>> f.write(_) 6 >>> f.readline() # Returns empty string '' -- ___ Python tracker

Re: The slash "/" as used in the documentation

2019-02-10 Thread Terry Reedy
On 2/10/2019 10:47 AM, Ian Kelly wrote: On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: This is the result of Python being a project of mostly unpaid volunteers. See my response in this thread explaining how '/' appears in help output and IDLE calltips. '/' only appears for CPython

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sun, Feb 10, 2019 at 2:18 PM Avi Gross wrote: > I am not sure how python implements some of the functionality it does as > compared to other languages with similar features. But I note that there are > rules, presumably some for efficiency, such as requiring all keyword > arguments to be

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-10 Thread Davin Potts
Davin Potts added the comment: @giampaolo.rodola: Your patch from 3 days ago in issue35917 included additional tests around the SharedMemoryManager which are now causing test failures in my new PR. This is my fault because I altered SharedMemoryManager to no longer support functionality

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-10 Thread Davin Potts
Davin Potts added the comment: Docs and tests are now available in a new PR. I have stayed focused on getting these docs and tests to everyone without delay but that means I have not yet had an opportunity to respond to the helpful comments, thoughtful questions, and threads that have

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-10 Thread Davin Potts
Change by Davin Potts : -- pull_requests: +11834 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-10 Thread Davin Potts
Change by Davin Potts : -- pull_requests: +11834, 11835, 11836 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-10 Thread Davin Potts
Change by Davin Potts : -- pull_requests: +11834, 11835 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sun, Feb 10, 2019 at 9:34 AM Chris Angelico wrote: > > On Mon, Feb 11, 2019 at 2:49 AM Ian Kelly wrote: > > > > On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > > > > > This is the result of Python being a project of mostly unpaid volunteers. > > > > > > See my response in this thread

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

2019-02-10 Thread Ammar Askar
Ammar Askar added the comment: Aah, I interpreted the combination of the warning and the fact that it says "attempted first" to mean that any failures in the actual renaming will leave the new directory in place. That is, no cleanup is ever performed. A quick glance at the code seems to

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

2019-02-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Lacking permissions seems very different to me from the source directory or file not existing. For example, in the example I provided, I did have the needed permissions. Incidentally (and this is a separate documentation issue), the note seems unclear as

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35961] gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I too saw this a week back but couldn't reproduce it. There is one another test that fails like this and passes on verbose mode issue35809 . Travis doesn't report tests that fail in the complete run and pass during verbose run like buildbots do.

[issue35460] Add PyDict_GetItemStringWithError

2019-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 for expanding this API. As Serhiy pointed-out, PyDict_GetItemString() is an old API kept just for backward compatibility. For your use case, it is easy to call PyUnicode_FromString(key) and then follow-up with PyDict_GetItemWithError(). The latter

[issue35889] sqlite3.Row doesn't have useful repr

2019-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 from me. We're already made regular expression match objects less opaque and that has been useful. There's no need for a python-ideas discussion for this. If a repr doesn't round-trip, we generally put it angle brackets (see PEP 8): >>>

[issue35796] time.localtime returns error for negative values

2019-02-10 Thread Ammar Askar
Ammar Askar added the comment: Victor is correct, this is a limitation in Windows. As the documentation for time notes: >Although this module is always available, not all functions are available on >all platforms. Most of the functions defined in this module call platform C >library

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch, patch, patch pull_requests: +11831, 11832, 11833 stage: -> patch review ___ Python tracker ___

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch, patch pull_requests: +11831, 11832 stage: -> patch review ___ Python tracker ___

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch pull_requests: +11831 stage: -> patch review ___ Python tracker ___ ___

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2019-02-10 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> never enable lchmod on Linux ___ Python tracker

[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks

2019-02-10 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35956] Sort documentation could be improved for complex sorting

2019-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: It seems to me that the sorting howto covers this topic. If I'm reading the OP's task correctly, it isn't complex at all: points.sort(key=attrgetter('x', 'y')) # x is primary key; y is secondary -- assignee: docs@python -> rhettinger nosy:

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

2019-02-10 Thread Ammar Askar
Ammar Askar added the comment: It seems this behavior is somewhat documented: https://docs.python.org/3/library/os.html#os.renames >Works like rename(), except creation of any intermediate directories needed to >make the new pathname good is attempted first. >This function can fail with the

[issue35961] gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-10 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : I am seeing some failures in travis and some buildbots: 0:02:24 load avg: 3.30 [147/420/1] test_slice crashed (Exit code -6) -- running: test_multiprocessing_spawn (32 sec 523 ms), test_asyncio (45 sec 433 ms), test_multiprocessing_forkserver (47

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
New submission from Christopher Hunt : The metadata argument to dataclasses.field is not preserved in the resulting Field.metadata attribute if the argument is a mapping with length 0. The docs for dataclasses.field state: > metadata: This can be a mapping or None. None is treated as an empty

[issue35808] Let's retire pgen

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -11829, 11830 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35808] Let's retire pgen

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -11830 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35808] Let's retire pgen

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch, patch pull_requests: +11828, 11829, 11830 stage: needs patch -> patch review ___ Python tracker ___

[issue35808] Let's retire pgen

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch pull_requests: +11828, 11829 stage: needs patch -> patch review ___ Python tracker ___

[issue35808] Let's retire pgen

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

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-10 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: What is the status of this issue? I can submit a PR based on Tuomas Suutari's patch. -- nosy: +bdbaraban ___ Python tracker

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

2019-02-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thanks Raymond for the interesting use-case. The original design of mode() was support only the basic form taught in secondary schools, namely a single unique mode for categorical data or discrete numerical data. I think it is time to consider a richer

[issue35904] Add statistics.fmean(seq)

2019-02-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Would you like me to submit a PR with docs and tests? Yes please! I'm happy with the name fmean. -- ___ Python tracker ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Got it, makes sense. Thank you. New contributor here :) -- ___ Python tracker ___

[issue12317] inspect.getabsfile() is not documented

2019-02-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given the absence of agreement among core-devs, a PR is a bit premature. Looking again at the existing docstring, I think it must be revised before copying and *not* copied as is. 0. The existing first sentence mislead me. The 'source or compiled file'

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Ethan Furman
Ethan Furman added the comment: Let's give Maxwell until the 14th (so a week from when I asked him to turn his code into a patch) and if nothing from him by then you are welcome to take it over. -- ___ Python tracker

[issue34652] never enable lchmod on Linux

2019-02-10 Thread Anthony Sottile
Anthony Sottile added the comment: I believe this also closes https://bugs.python.org/issue31940 and https://bugs.python.org/issue28627 -- nosy: +Anthony Sottile ___ Python tracker

RE: The use of type()

2019-02-10 Thread Avi Gross
Follow on to below. I was right and there is a fairly trivial and portable way to just show 'int' for the type of probably many types: No need to call the type() function at all. If "a" is an integer object containing "5" then you can ask for the class of it and then within that for the name

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Brennan
Brennan <3...@holbertonschool.com> added the comment: I'm not sure if Maxwell is still working on this issue, but may I pick it up? I can submit a PR within the day. -- nosy: +bdbaraban ___ Python tracker

RE: The use of type()

2019-02-10 Thread Avi Gross
Without using regular expressions, if you just want to extract the word "int" or "float" you can substring the results by converting what type says to a string: >>> a = 5 >>> str(type(a))[8:11] 'int' >>> a=5.0 >>> str(type(a))[8:13] 'float' Since the format and length vary, this may not meet

[issue35940] multiprocessing manager tests fail in the Refleaks buildbots

2019-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Pablo thanks a lot for taking care of this. -- ___ Python tracker ___ ___ Python-bugs-list

[issue35278] [security] directory traversal in tempfile prefix

2019-02-10 Thread Cheryl Sabella
Cheryl Sabella added the comment: Adding Łukasz to the nosy list as release manager. -- nosy: +cheryl.sabella, lukasz.langa ___ Python tracker ___

[issue9584] fnmatch, glob: Allow curly brace expansion

2019-02-10 Thread Matúš Valo
Matúš Valo added the comment: Hi All, this is a humble ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: The use of type()

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 8:46 AM ^Bart wrote: > > I need to print something like "this variable is int" or "this variable > is string" > > n1 = 10 > n2 = 23 > > print ("Total of n1+n2 is: ",n1+n2," the type is", type(n1+n2)) > > When I run it I have: > > Total of n1+n2 is: 33 the type is > >>>

The use of type()

2019-02-10 Thread ^Bart
I need to print something like "this variable is int" or "this variable is string" n1 = 10 n2 = 23 print ("Total of n1+n2 is: ",n1+n2," the type is", type(n1+n2)) When I run it I have: Total of n1+n2 is: 33 the type is >>> I'd like to read "the type is int" and NOT "the type is , how

RE: Im trying to replicate the youtube video Creating my own customized celebrities with AI.

2019-02-10 Thread Avi Gross
Bob, >> tenserflow, pygame, scipy, and numby > All of these are probably installable using pip. By the way did you mean numpy? > At a command prompt type pip install packagename. While you are correcting the spelling of downloads as the downloader is quite picky about exact spelling, please

RE: The slash "/" as used in the documentation

2019-02-10 Thread Avi Gross
Chris, I would appreciate another pointer to the documentation explaining what was done and why as I deleted the earlier discussion. You ask: > Aside from questions about the help format, what is actually lost by the inability > to pass those arguments by name? I am not sure how python

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11825, 11826, 11827 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11825 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11825, 11826 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35940] multiprocessing manager tests fail in the Refleaks buildbots

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR11808 fixes the error and add some basic test. Please review the PR instead :) -- ___ Python tracker ___

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch, patch pull_requests: +11822, 11823, 11824 stage: -> patch review ___ Python tracker ___

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch, patch pull_requests: +11822, 11823 stage: -> patch review ___ Python tracker ___

[issue35959] math.prod(range(10)) caues segfault

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

[issue35936] Give modulefinder some much-needed updates.

2019-02-10 Thread Brandt Bucher
Brandt Bucher added the comment: Alright, I've gotten all of the tests passing for the new importlib-only implementation. I broke these modifications out into a new private function, _find_module, to make it clear that this fix is a simple drop-in replacement for imp.find_module. Let me

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Could it be https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L2565 When 0 is in the iterator, i_result get sets to 0 and then on the next iteration x/i_result is 0/0 which is undefined behavior? C99 6.5.5p5 - The result of the / operator is

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem is that the intermediate result (i_result) can be 0 when doing the overflow check: x / i_result != b i am working on a fix. -- ___ Python tracker

[issue35959] math.prod(range(10)) caues segfault

2019-02-10 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : math.prod introduced with issue35606 seems to segfault when zero is present on some cases like start or middle of the iterable. I couldn't find the exact cause of this. This also occurs in optimized builds. # Python information built with

[issue35956] Sort documentation could be improved for complex sorting

2019-02-10 Thread Cheryl Sabella
Cheryl Sabella added the comment: Take a look at issue 35020 which discusses multisort. -- nosy: +cheryl.sabella ___ Python tracker ___

[issue35958] io.IOBase subclasses don't play nice with abc.abstractmethod

2019-02-10 Thread Jon McMahon
New submission from Jon McMahon : Subclasses of io.IOBase can be instantiated with abstractmethod()s, even though ABCs are supposed to prevent this from happening. I'm guessing this has to do with io using the _io C module because the alternative pure-python implementation _pyio doesn't seem

[issue35957] Indentation explanation is unclear

2019-02-10 Thread Jérôme LAURENS
New submission from Jérôme LAURENS : https://docs.python.org/3/reference/lexical_analysis.html#indentation reads Point 1: "Tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight" and in

Re: Im trying to replicate the youtube video Creating my own customized celebrities with AI.

2019-02-10 Thread Bob Gailer
On Feb 10, 2019 11:40 AM, wrote: > > The video I don't see any video here. If you attached one the attachment did not come through. > gives the source code and the necessary things to download with it. But I'm new to python and don't understand how to install any of the files. The files

Re: where is math_sin defined?

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 3:37 AM Barry Scott wrote: > > On Sunday, 10 February 2019 15:15:32 GMT Jon Ribbens wrote: > > As an aside, how is 'math.sin' actually implemented? mathmodule.c > > refers to the function 'math_sin' but that name is not defined > > anywhere in the Python source code. I'm a

Im trying to replicate the youtube video Creating my own customized celebrities with AI.

2019-02-10 Thread jadenfigger
The video gives the source code and the necessary things to download with it. But I'm new to python and don't understand how to install any of the files. The files include: Python 3, pip, tenserflow, pygame, scipy, and numby. Could anyone help me install all of this to run the AI. Thank you --

[issue35956] Sort documentation could be improved for complex sorting

2019-02-10 Thread SilentGhost
SilentGhost added the comment: Is this not equivalent to the following? sorted(points, key=lambda p: (p.y, p.x)) -- nosy: +SilentGhost ___ Python tracker ___

Re: where is math_sin defined?

2019-02-10 Thread Barry Scott
On Sunday, 10 February 2019 15:15:32 GMT Jon Ribbens wrote: > As an aside, how is 'math.sin' actually implemented? mathmodule.c > refers to the function 'math_sin' but that name is not defined > anywhere in the Python source code. I'm a bit mystified as to how > CPython manages to compile! I used

Re: The slash "/" as used in the documentation

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 2:49 AM Ian Kelly wrote: > > On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > > > This is the result of Python being a project of mostly unpaid volunteers. > > > > See my response in this thread explaining how '/' appears in help output > > and IDLE calltips. '/'

[issue35956] Sort documentation could be improved for complex sorting

2019-02-10 Thread fabrice salvaire
New submission from fabrice salvaire : I just implemented Graham Scan algorithm in Python 3 and have to read carefully the sort documentation. Notice this is a good algorithm for a large audience language like Python. Since Python 3, the old order function cmp is depicted as an old way to

[issue21269] Provide args and kwargs attributes on mock call objects

2019-02-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This feels safer to me with respect to backwards compatibility and also that it might be easier to backport this to mock on GitHub which works with Python 2.7. I have less knowledge on difference between tuple and namedtuple internals so I might

Re: C API PyObject_GetAttrString returns not the object I expected

2019-02-10 Thread Barry Scott
On Sunday, 10 February 2019 13:58:57 GMT Stefan Behnel wrote: > Barry Scott schrieb am 10.02.19 um 13:08: > > After calling PyObject_GetAttrString() I expected to get a PyObject string > > back but I found that I had been given a instead. > > > > (gdb) p *args_o > > $4 = > > > > What is going

Re: [solved] C API version of str(exception) is not the same as pure python version

2019-02-10 Thread Barry Scott
On Sunday, 10 February 2019 11:59:16 GMT Barry Scott wrote: > When I use the C API to get the str() of an execption I see this text: > > > > But python reports the following for the same exception: > > TypeError: unsupported operand type(s) for +: 'int' and 'str' > > What do I

[issue21269] Provide args and kwargs attributes on mock call objects

2019-02-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @xtreak, couldn't we have made `_Call` inherit from namedtuple to achieve a similar result (albeit the handling of name would be weird)? -- ___ Python tracker

Re: print console out to a txt or csv file

2019-02-10 Thread Peter Otten
GISDude wrote: > Hi all, > I have been working on some code to list the files of a folder that has > .pdf extension. I have the basic code to create a list, but it prints that > list to the console. I'd like my code to write a txt file that contains > that list (to later import into excel). > >

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-10, Chris Angelico wrote: > On Mon, Feb 11, 2019 at 2:21 AM Jon Ribbens wrote: >> On 2019-02-09, Terry Reedy wrote: >> > '/' is no uglier than, and directly analogous to, and as easy to produce >> > and comprehend, as '*'. It was selected after considerable discussion >> > of how to

Fwd: improve TypeError for AsyncIterables when attempting to sync iterate

2019-02-10 Thread Thomas Grainger
Currently when attempting to sync iterate an async iterable you get a TypeError: TypeError: 'SomeType' object is not iterable When attempting to iterate an async iterable (eg an object with a __aiter__ method the error could be something like: TypeError: 'SomeType' object is not iterable, it is

[issue21269] Provide args and kwargs attributes on mock call objects

2019-02-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I like this patch, working with calls often feels weird and this change simplify attribute access. -- nosy: +remi.lapeyre ___ Python tracker

[issue35460] Add PyDict_GetItemStringWithError

2019-02-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: There are more reasons to implement in C than just speed ;-). In my code I have two usecases for using PyDict_GetItemString, both not in performance critical code 1) Look up a hardcoded name in a dictionary. These could be switched to the Id API if that

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > This is the result of Python being a project of mostly unpaid volunteers. > > See my response in this thread explaining how '/' appears in help output > and IDLE calltips. '/' only appears for CPython C-coded functions that > have been

[issue35878] ast.c: end_col_offset may be used uninitialized in this function

2019-02-10 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: The slash "/" as used in the documentation

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 2:21 AM Jon Ribbens wrote: > > On 2019-02-09, Terry Reedy wrote: > > '/' is no uglier than, and directly analogous to, and as easy to produce > > and comprehend, as '*'. It was selected after considerable discussion > > of how to indicate that certain parameters are, at

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-09, Terry Reedy wrote: > '/' is no uglier than, and directly analogous to, and as easy to produce > and comprehend, as '*'. It was selected after considerable discussion > of how to indicate that certain parameters are, at least in CPython, > positional only. The discussion of

print console out to a txt or csv file

2019-02-10 Thread GISDude
Hi all, I have been working on some code to list the files of a folder that has .pdf extension. I have the basic code to create a list, but it prints that list to the console. I'd like my code to write a txt file that contains that list (to later import into excel). ###A script to list pdf

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry to comment on a closed issue. I see the following behavior with difflib.ndiff which is used under the hood by unittest. The strings that differ by '-' and 'w' generate different output compared to 'a' and 'w'. I find the output for diff

[issue35460] Add PyDict_GetItemStringWithError

2019-02-10 Thread Stefan Behnel
Stefan Behnel added the comment: The overhead of calling PyErr_Occurred() is definitely negligible in something as involved as PyDict_GetItemStringWithError(), where a mere key lookup first has to fire up the string decoder on a C character buffer to create a new string object and then

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I was able to replicate the issue using pytest and not unittest, so I've [reported the issue with that project](https://github.com/pytest-dev/pytest/issues/4765). -- ___ Python tracker

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I should acknowledge that I'm using pytest here also... and pytest may be the engine that's performing the reporting of the failed assertion. In fact, switching to simple assertions, I see the same behavior, so I now suspect the issue may lie with pytest

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
New submission from Jason R. Coombs : In [this job](https://travis-ci.org/jaraco/cmdix/jobs/491246158), a project is using assertEqual to compare two directory listings that don't match in the group. But the hint markers pointing to the mismatch are pointing at positions that match: E

Re: C API PyObject_GetAttrString returns not the object I expected

2019-02-10 Thread Stefan Behnel
Barry Scott schrieb am 10.02.19 um 13:08: > After calling PyObject_GetAttrString() I expected to get a PyObject string > back but I found that I had been given a instead. > > (gdb) p *args_o > $4 = > > What is going on and how do I get from the to the object > I > want? Phil is right

Re: C API PyObject_GetAttrString returns not the object I expected

2019-02-10 Thread Phil Thompson
On 10 Feb 2019, at 12:08 pm, Barry Scott wrote: > > After calling PyObject_GetAttrString() I expected to get a PyObject string > back but I found that I had been given a instead. > > (gdb) p *args_o > $4 = > > What is going on and how do I get from the to the object > I > want? The

[issue35953] crosscompilation fails with clang on android

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

[issue35460] Add PyDict_GetItemStringWithError

2019-02-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Adding PyDict_GetItemStringWithError makes is possible to migrate existing code to a design that does not ignore errors. I have a significant number of calls to PyDict_GetItemString that cannot be switch toed PyDict_GetItem without increasing the number

[issue12317] inspect.getabsfile() is not documented

2019-02-10 Thread Dong-hee Na
Dong-hee Na added the comment: @terry.reedy I submited the PR 11786 for this issue. If you are okay can you take a look please? Thanks! -- ___ Python tracker ___

[issue35954] Incoherent type conversion in configparser

2019-02-10 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >