Re: Format list of list sub elements keeping structure.

2018-07-24 Thread Sayth Renshaw
> > Well, your code was close. All you needed was a little tweak > to make it work like you requested. So keep working at it, > and if you have a specific question, feel free to ask on the > list. > > Here's a tip. Try to simplify the problem. Instead of > looping over a list of lists, and then

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
STINNER Victor added the comment: I added many fields to _PyCoreConfig which duplicate global configuration varibles: _PyConfigCore.isolated duplicates Py_IsolatedFlag. I started to modify Python to read the core configuration rather than global configuration flags. The problem is that

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7980 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1dc6e3906acb81163725e98378bf4d1bd1ce771a by Victor Stinner in branch 'master': bpo-34170: Add _Py_InitializeFromConfig() (GH-8454) https://github.com/python/cpython/commit/1dc6e3906acb81163725e98378bf4d1bd1ce771a --

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 6cf8255912c36fec6f87f62513034d0818f61390 by INADA Naoki (erikjanss) in branch 'master': bpo-34217: Use lowercase header for Windows (GH-8453) https://github.com/python/cpython/commit/6cf8255912c36fec6f87f62513034d0818f61390 -- nosy:

[issue34209] racecondition

2018-07-24 Thread INADA Naoki
INADA Naoki added the comment: https://docs.python.org/3/library/os.html#os.access It is already documented. What's point of this issue? -- nosy: +inada.naoki ___ Python tracker

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7979 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread Erik Janssens
Change by Erik Janssens : -- keywords: +patch pull_requests: +7978 stage: -> patch review ___ Python tracker ___ ___

Re: Format list of list sub elements keeping structure.

2018-07-24 Thread Sayth Renshaw
> > Then using this cool answer on SO [...] > > Oh. I thought you wanted to learn how to solve problems. I had no idea you > were auditioning for the James Dean part. My bad. Awesome response burn lol. I am trying to solve problems. Getting tired of dealing with JSON and having to figure

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread Erik Janssens
New submission from Erik Janssens : When cross compiling python on a linux host with a case sensitive file system for a windows target. The compilation will fail due to header files which contain uppercases. -- components: Cross-Build, Windows messages: 322333 nosy: Alex.Willmer,

Re: Checking whether type is None

2018-07-24 Thread Chris Angelico
On Wed, Jul 25, 2018 at 9:18 AM, Rob Gaddi wrote: > On 07/24/2018 01:07 PM, Chris Angelico wrote: >> >> On Wed, Jul 25, 2018 at 5:33 AM, Tobiah wrote: >>> >>> Consider: >>> >>> >>> type({}) is dict >>> True >>> >>> type(3) is int >>> True >>> >>>

Re: Checking whether type is None

2018-07-24 Thread Rob Gaddi
On 07/24/2018 01:07 PM, Chris Angelico wrote: On Wed, Jul 25, 2018 at 5:33 AM, Tobiah wrote: Consider: >>> type({}) is dict True >>> type(3) is int True >>> type(None) is None False Obvious I guess, since the type object is not None. So

Re: Checking whether type is None

2018-07-24 Thread Steven D'Aprano
On Tue, 24 Jul 2018 12:33:27 -0700, Tobiah wrote: [...] > So what would I compare type(None) to? Why would you need to? The fastest, easiest, most reliable way to check if something is None is: if something is None > >>> type(None) > > >>> type(None) is NoneType >

[issue34213] Frozen dataclass __init__ fails for "object" property"

2018-07-24 Thread Vadim Pushtaev
Vadim Pushtaev added the comment: Hello. This is my solution for this problem - https://github.com/python/cpython/pull/8452 Sorry if I'm not supposed to do anything about the already assigned issue, feel free to ignore my PR. -- ___ Python

[issue34213] Frozen dataclass __init__ fails for "object" property"

2018-07-24 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +7976 stage: -> patch review ___ Python tracker ___ ___

[issue34216] python platform no child error

2018-07-24 Thread sachin
New submission from sachin : We are trying to utilize librosa library for some processing. When we try to load the librosa library, python platform library is triggered via the Numba library. Numba is trying to find the underlying OS which is installed. Function "_syscmd_uname" is triggered

[issue34215] streams.py:readuntil IncompleteReadError is message is incorrect

2018-07-24 Thread Tyler Bell
New submission from Tyler Bell : This may have already been cleared as I opened the PR months ago But the gist is that the Exception is misleading and the test is incorrect. -- components: Library (Lib) messages: 322329 nosy: mrbell...@gmail.com priority: normal pull_requests: 7975

[issue34213] Frozen dataclass __init__ fails for "object" property"

2018-07-24 Thread Vadim Pushtaev
Change by Vadim Pushtaev : -- nosy: +Vadim Pushtaev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34214] Pylint recusion stack overflow abort

2018-07-24 Thread Nick Drozd
New submission from Nick Drozd : In certain very, very specific circumstances, Pylint can cause the interpreter to abort with a stack overflow error. I've seen this issue on 3.5, 3.6, and 3.8 (I assume it affects 3.7 as well) and on both Mac and Ubuntu. It requires: * 1.7 <= Pylint

RE: Checking whether type is None

2018-07-24 Thread David Raymond
https://docs.python.org/3.7/library/constants.html "None The sole value of the type NoneType..." "x is None" and "type(x) is type(None)" are equivalent because of that. I think though that the better way to do the first tests would be to use isinstance

hello from a very excited and totally blind python programmer and game player

2018-07-24 Thread Daniel Perry
Hi there everyone, my name is Daniel Perry and I'm a totally blind new Python user. I've only just recently started picking up python and playing with it and I intend on building some unique audio computer games for the blind. Such things mostly as simulation games like farming, building type

Re: Checking whether type is None

2018-07-24 Thread Chris Angelico
On Wed, Jul 25, 2018 at 5:33 AM, Tobiah wrote: > Consider: > > >>> type({}) is dict > True > >>> type(3) is int > True > >>> type(None) is None > False > > Obvious I guess, since the type object is not None. > So what would I compare type(None) to?

[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-24 Thread Yonatan Zunger
Yonatan Zunger added the comment: Eryk: Thanks for finding that! So that I'm sure I understand, if 34187 is resolved, does that mean the stdin.close() is no longer required at all in _Quitter? On Sun, Jul 22, 2018 at 2:12 AM Eryk Sun wrote: > > Eryk Sun added the comment: > > > On Windows

[issue1539381] Add readinto method to StringIO and cStringIO

2018-07-24 Thread Alan Justino
Alan Justino added the comment: Issued a related PR (https://github.com/python/cpython/pull/8451) to allow SpooledTemporaryFile to propagate `readinto` calls to TemporaryFile, BytesIO or StringIO. Of this ones, only StringIO will fail. -- ___

Re: Checking whether type is None

2018-07-24 Thread Iwo Herka
In Python 2, you can import NoneType from types module. In Python 3, the best you can do is: NoneType = type(None) ​Iwo Herka https://github.com/IwoHerka​ ‐‐‐ Original Message ‐‐‐ On 24 July 2018 7:33 PM, Tobiah wrote: > ​​ > > Consider: > > >>> type({}) is dict > > True

[issue1539381] Add readinto method to StringIO and cStringIO

2018-07-24 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +7973 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Can pip install packages for all users (on a Linux system)?

2018-07-24 Thread Wolfgang Maier
On 24.07.2018 20:07, John Ladasky wrote: I've been using "sudo pip3 install" to add packages from the PyPI repository. I have multiple user accounts on the computer in question. My goal is to install packages that are accessible to all user accounts. I know that using the Synaptic Package

Checking whether type is None

2018-07-24 Thread Tobiah
Consider: >>> type({}) is dict True >>> type(3) is int True >>> type(None) is None False Obvious I guess, since the type object is not None. So what would I compare type(None) to? >>> type(None) >>> type(None) is NoneType

[issue25083] Python can sometimes create incorrect .pyc files

2018-07-24 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-24 Thread tzickel
Change by tzickel : -- keywords: +patch pull_requests: +7972 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue25083] Python can sometimes create incorrect .pyc files

2018-07-24 Thread tzickel
Change by tzickel : -- pull_requests: +7971 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34158] Documentation of datetime '%z' format code is odd

2018-07-24 Thread Christophe Nanteuil
Christophe Nanteuil added the comment: PR updated according to Martin Panter comments. -- ___ Python tracker ___ ___

[issue1539381] Add readinto method to StringIO and cStringIO

2018-07-24 Thread Alan Justino
Alan Justino added the comment: It affects SpooledTemporaryFile too. Because it switches between StringIO, BytesIO and TemporaryFile internally. Only StringIO have not this interface. Discovered trying to `pickle.load` a remote storage file. Please reopen. -- nosy: +alanjds

[issue34195] test_nt_helpers fails with case difference in drive letter

2018-07-24 Thread Tim Golden
Change by Tim Golden : -- keywords: +patch pull_requests: +7970 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7969 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34213] Frozen dataclass __init__ fails for "object" property"

2018-07-24 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34060] regrtest: log "CPU usage" on Windows

2018-07-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > PR 8287 seems short to me and it seems like psutils doesn't expose Processor > Queue Length, so I'm not sure why we are talking about depending on psutils? I'm not sure if you're strictly interested in getting system load or if CPU utilization is also

[issue34213] Frozen dataclass __init__ fails for "object" property"

2018-07-24 Thread Edward Jones
New submission from Edward Jones : When `__init__` is called for a class which 1) is annotated with `@dataclasses.dataclass(frozen=True)` and 2) has a attribute named `object` a TypeError is raised because `object` is overridden for the local scope and as a result `__setattr__` is called on

Can pip install packages for all users (on a Linux system)?

2018-07-24 Thread John Ladasky
I've been using "sudo pip3 install" to add packages from the PyPI repository. I have multiple user accounts on the computer in question. My goal is to install packages that are accessible to all user accounts. I know that using the Synaptic Package Manager in Ubuntu will install for all

[issue34173] [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry for the noise about the title change. It seems you have edited it while I was typing my comment. There was a form error while I tried submit but I ignored it to try again and it had set my title. I have reverted back to your edit. Thanks

[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks, can confirm it on Python 3.7 . Unfortunately I couldn't test it with master since I have some problems setting up virtualenv and pip with the compiled binary. Running it on Python 3.7 hangs (bpo34173-env) ➜ cpython git:(master) ✗ python

[issue34173] [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Corey Bryant
Change by Corey Bryant : -- title: [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py -> [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py ___ Python tracker

[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Corey Bryant
Corey Bryant added the comment: eventlet issue opened at: https://github.com/eventlet/eventlet/issues/508 -- ___ Python tracker ___

[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Corey Bryant
Corey Bryant added the comment: I've narrowed this down a bit more. It appears to be caused by eventlet patching of standard library thread modules. See new attached patch bp034173-recreate.py. I'll get a bug opened against eventlet. -- Added file:

[issue34212] Cygwin link failure with builtin modules since issue30860

2018-07-24 Thread Erik Bray
Change by Erik Bray : -- keywords: +patch pull_requests: +7968 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34212] Cygwin link failure with builtin modules since issue30860

2018-07-24 Thread Erik Bray
New submission from Erik Bray : Since issue30860, libpython is no longer able to be linked as a shared library, because built-in modules are not compiled with the correct external linkage flags. This is due to the removal of -DPy_BUILD_CORE, which in pyport.h is used to control wither

[issue34192] FunctionType.__new__ can generate functions that immediately crash

2018-07-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34211] Cygwin build broken due to use of _Type in static declaration in _abc module

2018-07-24 Thread Erik Bray
Change by Erik Bray : -- keywords: +patch pull_requests: +7967 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue34211] Cygwin build broken due to use of _Type in static declaration in _abc module

2018-07-24 Thread Erik Bray
New submission from Erik Bray : This is essentially the same as issue21124, but introduced more recently with the addition of the _abc_data_type in the _abc module. The workaround is simply to use PyVarObject_HEAD_INIT(NULL, 0) instead of PyVarObject_HEAD_INIT(_Type, 0); PyType_Ready should

[issue34159] asyncio basic event loop stuck with no tasks scheduled or ready

2018-07-24 Thread Sheng Zhong
Sheng Zhong added the comment: Sorry I'm having trouble extracting a bug-producing portion of the code but I can describe the different components, what I think the problem was, and how I resolved it. There is one main coroutine (aka handler) responsible for handling the logic of

[issue34167] Standard library docs: prev/next skip right over 16.11

2018-07-24 Thread Segev Finer
Segev Finer added the comment: I think the prev/next links link to the previous/next document while 16.11 is in the same document as 16.10 at the bottom. -- nosy: +Segev Finer ___ Python tracker

[issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, indeed, I forgot to create a PR. Thank you for catching this Karthikeyan! -- ___ Python tracker ___

[issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans

2018-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +7966 stage: -> patch review ___ Python tracker ___ ___

[issue34196] @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced

2018-07-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Name mangling is intended to create class local references (that is why the class name is prepended) and can be used to add a layer of privacy to calls *within* a class. It is not intended to do what you're trying to do outside of class definitions.

[issue34210] Small improvements in heapq (refactoring)

2018-07-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I don't consider any of these changes to be improvements and some make the code worse in some ways, overriding intentional coding decisions. -- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open ->

[issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans

2018-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > The proposed PR makes them False or True. Sorry, is there a PR missing here? I hope you are referring to https://github.com/serhiy-storchaka/cpython/commit/f96e6969b7f73c3fd6ed2166ba3405f9e63b88f7 Thanks -- nosy: +xtreak

Re: curses, ncurses or something else

2018-07-24 Thread Peter Pearson
On Mon, 23 Jul 2018 23:24:18 +0100, John Pote wrote: > I recently wrote a command line app to take a stream of numbers, do some > signal processing on them and display the results on the console. There > may be several output columns of data so a title line is printed first. > But the stream of

[issue34204] Bump the default pickle protocol in shelve

2018-07-24 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34210] Small improvements in heapq (refactoring)

2018-07-24 Thread Alexander Marshalov
Change by Alexander Marshalov <_...@marshalov.org>: -- title: Small improvements in heapq (refatoring) -> Small improvements in heapq (refactoring) ___ Python tracker ___

[issue33635] OSError when using pathlib.Path.rglob() to list device files

2018-07-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: Os.stat is defined in C code, in particular in Modules/posixmodule.c. Op 20 jul. 2018 om 10:44 heeft Windson Yang het volgende geschreven: > > Windson Yang added the comment: > > I tried to fix this issue and I found this should be related to

[issue34210] Small improvements in heapq (refatoring)

2018-07-24 Thread Alexander Marshalov
Change by Alexander Marshalov <_...@marshalov.org>: -- keywords: +patch pull_requests: +7965 stage: -> patch review ___ Python tracker ___

[issue34210] Small improvements in heapq (refatoring)

2018-07-24 Thread Alexander Marshalov
New submission from Alexander Marshalov <_...@marshalov.org>: I would like to make three small improvements to the "heapq" module. 1) The "nsmallest" function has the following code (a similar code exists in the "nlargest" function): # When n>=size, it's faster to use sorted() try:

[issue34207] test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots

2018-07-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34208] Change in 3.7 expression evaluation?

2018-07-24 Thread Eryk Sun
Eryk Sun added the comment: Please refrain from using the issue tracker to satisfy your curiosity. This is a question about compiler optimizations that should be asked on python-list, or maybe python-dev. You can use the dis module to get a superficial answer in terms of the constants in

[issue34209] racecondition

2018-07-24 Thread Dhiraj
New submission from Dhiraj : File: /cpython/blob/master/Modules/posixmodule.c#L2657 #endif result = access(path->narrow, mode); Py_END_ALLOW_THREADS return_value = !result; #endif If an attacker could change anything along the path between the call `access()` and the files

[issue34208] Change in 3.7 expression evaluation?

2018-07-24 Thread Dave Opstad
New submission from Dave Opstad : In 3.6 I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 False But in 3.7, I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 True This isn't necessarily a problem, but I'm curious why this behavior changed

[issue34207] test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots

2018-07-24 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots: https://buildbot.python.org/all/#/builders/79/builds/186 https://buildbot.python.org/all/#/builders/60/builds/182 Sample error: test_xoptions

[issue34206] Move and clarify Py_Main documentation

2018-07-24 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +7964 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-24 Thread Nick Coghlan
Nick Coghlan added the comment: Since we decided the correct resolution here was to restore the Python 3.6 behaviour, I've filed https://bugs.python.org/issue34206 as a separate docs clarification issue (I'll amend my PR accordingly) -- resolution: -> fixed stage: patch review ->

[issue34206] Move and clarify Py_Main documentation

2018-07-24 Thread Nick Coghlan
Change by Nick Coghlan : -- dependencies: +Do we support calling Py_Main() after Py_Initialize()? ___ Python tracker ___ ___

[issue34206] Move and clarify Py_Main documentation

2018-07-24 Thread Nick Coghlan
New submission from Nick Coghlan : In resolving issue 34008, we determined that we *do* support calling Py_Main after Py_Initialize, but it's not clear from that current documentation that this implies a Py_Finalize() call, so you don't need to call that again yourself (and it's actually an

[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-24 Thread Corey Bryant
Corey Bryant added the comment: Karthikeyan, thanks for taking a look. I'm also unable to recreate with your test. I'm not sure what the difference is. I'll report back if I can figure it out. -- ___ Python tracker

[issue34196] @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced

2018-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think below doc gives some indication that it always occurs within the definition of the class (hence inside a static method) irrespective of the syntactic position for any valid identifier and hence for class __SuperPrivateClass too. I will let

[issue34193] Fix pluralization in TypeError messages in getargs.c

2018-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks, this needs to be fixed only in `check_num_args` and can help in all the other functions like __lt__, __delattr__ etc. in the file that use this. Before suggestion : ➜ cpython git:(bpo34193) ✗ ./python -c "a = {}; a.__delattr__()"

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
STINNER Victor added the comment: Reminder for myself: I have to write unit tests :-) https://github.com/python/cpython/pull/8417#pullrequestreview-139835391 -- ___ Python tracker

[issue34193] Fix pluralization in TypeError messages in getargs.c

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also "expected %d arguments, got %zd" in Objects/typeobject.c. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue8525] Display exceptions' subclasses in help()

2018-07-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Tests -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 ___ Python tracker

[issue34193] Fix pluralization in TypeError messages in getargs.c

2018-07-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +7963 stage: -> patch review ___ Python tracker ___ ___

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object)

2018-07-24 Thread Julien Palard
Julien Palard added the comment: I think it's already compiled in debug mode (https://github.com/pyenv/pyenv/blob/c057a80c8296a7c694e4ef80ecbac0d0c169df7a/plugins/python-build/bin/python-build#L2050). `-X dev` won't help (it's a 3.6.6 not a 3.7). The debug come from _Py_ForgetReference

Re: Tracking a memory leak in C extension - interpreting the output of PYTHONMALLOCSTATS

2018-07-24 Thread Bartosz Golaszewski
2018-07-24 13:30 GMT+02:00 Bartosz Golaszewski : > 2018-07-24 12:09 GMT+02:00 Bartosz Golaszewski : >> 2018-07-23 21:51 GMT+02:00 Thomas Jollans : >>> On 23/07/18 20:02, Bartosz Golaszewski wrote: Hi! >>> >>> Hey! >>> A user recently reported a memory leak in python bindings (C extension

Re: Tracking a memory leak in C extension - interpreting the output of PYTHONMALLOCSTATS

2018-07-24 Thread Bartosz Golaszewski
2018-07-24 12:09 GMT+02:00 Bartosz Golaszewski : > 2018-07-23 21:51 GMT+02:00 Thomas Jollans : >> On 23/07/18 20:02, Bartosz Golaszewski wrote: >>> Hi! >> >> Hey! >> >>> A user recently reported a memory leak in python bindings (C extension >>> module) to a C library[1] I wrote. I've been trying

Re: Tracking a memory leak in C extension - interpreting the output of PYTHONMALLOCSTATS

2018-07-24 Thread Bartosz Golaszewski
2018-07-23 21:51 GMT+02:00 Thomas Jollans : > On 23/07/18 20:02, Bartosz Golaszewski wrote: >> Hi! > > Hey! > >> A user recently reported a memory leak in python bindings (C extension >> module) to a C library[1] I wrote. I've been trying to fix it since >> but so far without success. Since I'm

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 113f86e7487e9312a2494667b088854ac942ab00 by Serhiy Storchaka in branch '3.6': [3.6] bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8436)

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9b33ca0f4d459c165d711778734b6e1bdc3ec35d by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8366)

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 23a3297ff1076d91ca6d70caadf9606f1fee0776 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8365)

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c206f0d1375fab7b58c19a6be3e68e316f718c66 by Serhiy Storchaka in branch 'master': bpo-34136: Make test_do_not_recreate_annotations more lenient. (GH-8437) https://github.com/python/cpython/commit/c206f0d1375fab7b58c19a6be3e68e316f718c66

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset d19d8d5279f156bc8f6736b5f16f069879b9519b by Victor Stinner in branch 'master': bpo-34170: Add _PyCoreConfig.isolated (GH-8417) https://github.com/python/cpython/commit/d19d8d5279f156bc8f6736b5f16f069879b9519b --

Re: Format list of list sub elements keeping structure.

2018-07-24 Thread Peter Otten
Sayth Renshaw wrote: > >> myjson = ... >> path = "['foo']['bar'][42]" >> print(eval("myjson" + path)) >> >> ? >> >> Wouldn't it be better to keep 'data' as is and use a helper function like >> >> def get_value(myjson, path): >> for key_or_index in path: >> myjson =

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7962 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7961 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0b2716918345b2bff0bb5c36086d5de368125536 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8435)

[issue8525] Display exceptions' subclasses in help()

2018-07-24 Thread Nick Coghlan
Nick Coghlan added the comment: I think the way modules display this information may actually provide a solid precedent that addresses the dynamic state problem I'm concerned about: filter the subclass list to only include subclasses that come from the same module as the object being

Re: Format list of list sub elements keeping structure.

2018-07-24 Thread Sayth Renshaw
> myjson = ... > path = "['foo']['bar'][42]" > print(eval("myjson" + path)) > > ? > > Wouldn't it be better to keep 'data' as is and use a helper function like > > def get_value(myjson, path): > for key_or_index in path: > myjson = myjson[key_or_index] > return myjson > >

Re: Non-GUI, single processort inter process massaging - how?

2018-07-24 Thread Chris Green
Dennis Lee Bieber wrote: > On Mon, 23 Jul 2018 22:14:22 +0100, Chris Green declaimed the > following: > > >Anders Wegge Keller wrote: > >> > >> If your update frequency is low enough that it wont kill the filesystem > >> and > >> the amount of data is reasonably small, atomic writes to a

[issue8525] Display exceptions' subclasses in help()

2018-07-24 Thread Nick Coghlan
Nick Coghlan added the comment: This is a UX problem folks: dynamic unbounded lists are inherently problematic in a line based information display. For methods on a class, there's the natural constraint that broad class APIs are a problem for a variety of reasons, but there's no such design

[issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object)

2018-07-24 Thread STINNER Victor
STINNER Victor added the comment: Recently, there was a discussion to find to detect earlier inconsistent objects: https://mail.python.org/pipermail/python-dev/2018-June/153857.html In the meanwhile, if you have time, you can try to run Ansible with a Python compiled in debug mode

[issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object)

2018-07-24 Thread STINNER Victor
Change by STINNER Victor : -- title: Segmentation fault in _PyObject_Dump -> Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object) ___ Python tracker

  1   2   >