[issue27069] webbrowser creates zombi processes in the background mode

2018-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't this a duplicate of issue5993? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue32056] Improve exceptions in Lib/wave.py

2018-03-01 Thread zhangdeyue
zhangdeyue added the comment: ok, I found this bug when I use librosa-0.5.1 to read audio file in the audio-classification project -- an ASR project. (https://github.com/nextco/audio-classification) In the project, librosa.load function read audio file, and it called

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset aa40f92240adea7067c3add8e09cec09dcf24d7f by Xiang Zhang (Alexey Izbyshev) in branch '2.7': [2.7] bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801). (#5947)

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 6ae75d9d1221459ab18c2599e42fcc45f9f65617 by Xiang Zhang (Miss Islington (bot)) in branch '3.7': bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801) (#5945)

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd argue against such a change in any case And apparently I already did: see issue 22444 for previous discussion on the topic. -- ___ Python tracker

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 3e197c7a6740d564ad52fb7901c07d5ff49460f5 by Xiang Zhang (Alexey Izbyshev) in branch 'master': bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801)

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +5713 ___ Python tracker ___

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +5715 ___ Python tracker ___ ___

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: > It would be a bit strange if mod with a float returns a float and floordiv > with a float returns an int. Agreed: if there are floats involved (Fraction // float or float // Fraction), I think the rule should be that we simply fall back

Functions unnecessarily called in Python/pylifecycle.c:_Py_InitializeCore() ?

2018-03-01 Thread Thomas Nyberg
Hello, I was playing around with cpython and noticed the following. The `_PyFrame_Init()` and `PyByteArray_Init()` functions are called in these two locations: https://github.com/python/cpython/blob/master/Python/pylifecycle.c#L693-L694

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +5714 ___ Python tracker ___

Re: Is there are good DRY fix for this painful design pattern?

2018-03-01 Thread Gregory Ewing
After this thread, the term "docstring" is never going to mean quite the same thing to me again. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker

Problem: Need galileo running on debian wheezy

2018-03-01 Thread Gene Heskett
I know its supposed to be in the debian stretch repo's. I've been told to get a fitbit, but they don't support linux of any flavor, and that leaves galileo as the possible solution? So how should I proceed since the only stretch machine I have ATM is an arm64, aka a rock64. -- Cheers, Gene

Re: Detection of ultrasonic side channels in mobile devices with Python?

2018-03-01 Thread Chris Angelico
On Thu, Mar 1, 2018 at 10:51 AM, Steven D'Aprano wrote: > On Thu, 01 Mar 2018 08:54:52 +1100, Chris Angelico wrote: > >> But this part sounds like prime quality tinfoil hat material: >> >>> Tell me how exactly ultrasonic side channels may activate remotely

PyDev 6.3.1 Released

2018-03-01 Thread Fabio Zadrozny
PyDev 6.3.1 Release Highlights - PyDev is now also available for Python coding on Visual Studio Code -- see: http://www.pydev.org/vscode/ for more details. PyDev changes: - Type inference - Folders no longer require *__init__* to be considered a package. - Properly

Re: csv module and NULL data byte

2018-03-01 Thread Neil Cerutti
On 2018-03-01, Tim Chase wrote: > On 2018-02-28 21:38, Dennis Lee Bieber wrote: >> >     with open( fname, 'rt', encoding='iso-8859-1' ) as csvfile: >> >> Pardon? Has the CSV module changed in the last year or so? >> >> Last time I read the

Strange problem with pip2

2018-03-01 Thread Cecil Westerhof
There are three pip2 packages that should be updated: apsw (3.13.0.post1) - Latest: 3.9.2.post1 [sdist] mysql-utilities (1.6.4) - Latest: 1.4.3 [sdist] pygobject (3.22.0) - Latest: 3.27.4 [sdist] But the strange thing is that the installed version is newer as the new version. And when

Re: help me ? (Posting On Python-List Prohibited)

2018-03-01 Thread Rustom Mody
On Thursday, March 1, 2018 at 5:37:28 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 28 Feb 2018 09:58:24 -0800, Aktive wrote: > > > what the hell do you care about cheating.. > > > > the world doest care about cheating. > > > > its about skill. > > Because cheaters don't have skill. That's why

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Richard Damon
On 2/28/18 11:00 PM, ROGER GRAYDON CHRISTMAN wrote: On Wed, Feb 28, 2018, Rick Johnson wrote: > On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6, Chris Angelico wrote: Here's one example: reference cycles. When do they get detected? Taking a really simple situation: class Foo: def

[issue32976] linux/random.h present but cannot be compiled

2018-03-01 Thread Mike Schmidt
New submission from Mike Schmidt : I am attempting to install python 3.6.4 to my home directory on a linux cluster where I do not have root access. A warning, "linux/random.h present but cannot be compiled", was emitted from the config process requesting that I

Re: Is there are good DRY fix for this painful design pattern?

2018-03-01 Thread Jugurtha Hadjar
On 03/01/2018 10:34 AM, Gregory Ewing wrote: After this thread, the term "docstring" is never going to mean quite the same thing to me again. I still feel that the following is quite readable: <---> import inspect def snatch(func):     def snatched(self,

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Steven D'Aprano
On Wed, 28 Feb 2018 18:51:33 -0800, Rick Johnson wrote: >> What happens if the __del__ method recreates a reference to the object? > > So make instantation of the object in its __del__ method an illegal op! Why should it be illegal? And could that even be enforced in Python? Is this one of

[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2018-03-01 Thread Cyril Martin
Cyril Martin added the comment: Hello Vinay, I strongly disagree with you. In the Python documentation (https://docs.python.org/3/library/logging.html), we can read the following for the debug function: > The third keyword argument is extra which can be used to pass a

[issue32818] multiprocessing segmentfault under Windows compatibility mode

2018-03-01 Thread Segev Finer
Segev Finer added the comment: Windows seems to dereference lpStartupInfo->lpAttributeList, despite it being NULL since we had no attributes to set. Smells like a Windows bug in the compatibility shim, since it doesn't crash in non compatibility mode. Not setting

[issue32818] multiprocessing segmentfault under Windows compatibility mode

2018-03-01 Thread Segev Finer
Change by Segev Finer : -- keywords: +patch pull_requests: +5716 stage: -> patch review ___ Python tracker ___

Salabim version 2.2.15 released

2018-03-01 Thread Ruud van der Ham
I am pleased to announce the release of salabim version 2.2.15. Salabim is a Python package for discrete event simulation built on process description methodology.It supports queue handling, statistical

Re: In Python2, does it need to wrap imp.find/load_module with imp_acquire/release_lock?

2018-03-01 Thread Xiang Zhang
On Wednesday, February 28, 2018 at 3:02:38 PM UTC+8, dieter wrote: > Xiang Zhang writes: > > > Just like the title. It seems to me it is needed from the source code but > > codes in stdlib all doesn't do that. > > The "import" machinery uses locks of its own (to

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not all Fractions can be converted to float. >>> Fraction(2**2000, 3) // 1.0 Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/fractions.py", line 432, in __floordiv__ return

Re: Functions unnecessarily called in Python/pylifecycle.c:_Py_InitializeCore() ?

2018-03-01 Thread bartc
On 01/03/2018 09:57, Thomas Nyberg wrote: Hello, I was playing around with cpython and noticed the following. The `_PyFrame_Init()` and `PyByteArray_Init()` functions are called in these two locations: https://github.com/python/cpython/blob/master/Python/pylifecycle.c#L693-L694

Re: Functions unnecessarily called in Python/pylifecycle.c:_Py_InitializeCore() ?

2018-03-01 Thread Thomas Nyberg
On 03/01/2018 12:46 PM, bartc wrote: > If they're only called once, then it probably doesn't matter too much in > terms of harming performance. Oh yeah there's no way this has any affect on performance. A smart compiler might even be able optimize the call away entirely. Even if it couldn't, it's

[issue32977] added acts_like decorator to dataclasses module

2018-03-01 Thread Aaron Christianson
New submission from Aaron Christianson : I'm always writting these wrapper classes where I want to selectively want to expose the interface of some of the methods of certain attributes to co the containing object. This can mean I spend a lot of time implementing wrapper

[issue32056] Improve exceptions in Lib/wave.py

2018-03-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5717 ___ Python tracker ___

[issue32056] Improve exceptions in aifc, sunau and wave

2018-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 5951 adds explicit checks for the number of channels and sample width when read audio files in aifc, sunau and wave and converts some struct.error to EOFError when the file is truncated in wave. This change can break an

Re: Functions unnecessarily called in Python/pylifecycle.c:_Py_InitializeCore() ?

2018-03-01 Thread Ned Batchelder
On 3/1/18 7:40 AM, Thomas Nyberg wrote: On 03/01/2018 12:46 PM, bartc wrote: If they're only called once, then it probably doesn't matter too much in terms of harming performance. Oh yeah there's no way this has any affect on performance. A smart compiler might even be able optimize the call

[issue30607] Extract documentation theme into a separate package

2018-03-01 Thread Ned Deily
Ned Deily added the comment: New changeset bf63e8d55fd2853df3bb99d66de7f428107aadb3 by Ned Deily (Jon Wayne Parrott) in branch 'master': bpo-30607: Use external python-doc-theme (GH-2017) https://github.com/python/cpython/commit/bf63e8d55fd2853df3bb99d66de7f428107aadb3

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Change by Elias Zamaria : -- keywords: +patch pull_requests: +5721 stage: -> patch review ___ Python tracker ___

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Wildman via Python-list
On Thu, 01 Mar 2018 13:44:27 -0500, Gene Heskett wrote: > I know its supposed to be in the debian stretch repo's. > > I've been told to get a fitbit, but they don't support linux of any > flavor, and that leaves galileo as the possible solution? > > So how should I proceed since the only

Re: RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

2018-03-01 Thread Rob Gaddi
On 03/01/2018 02:24 PM, Lawrence D’Oliveiro wrote: On Thursday, March 1, 2018 at 6:44:39 PM UTC+13, Paul Rubin wrote: DOM trees are a classic example (see the various DOM modules in the Python stdlib). Non-leaf nodes have a list of child nodes, child nodes have pointers back upwards to their

[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2018-03-01 Thread Preston Landers
Change by Preston Landers : -- nosy: +planders ___ Python tracker ___ ___

[issue32980] Remove functions that do nothing in _Py_InitializeCore()

2018-03-01 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list

[issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details

2018-03-01 Thread Brett Cannon
Change by Brett Cannon : -- title: Docs on unittest.TestCase.assertRaises() should be improved -> Docs on unittest.TestCase.assertRaises() should clarify context manager details ___ Python tracker

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Elias Zamaria added the comment: I added the pull request. It includes only my changes to modulo, and not the ones to floordiv. -- ___ Python tracker

[issue32493] UUID Module - FreeBSD build failure

2018-03-01 Thread Michael Felt
Michael Felt added the comment: If it is a bug in OpenBSD how do you propose we "fix" this. imho, the problem is "outside" python. however, until it is fixed in openbsd, would you accept an 3error macro that prevents the mod from being built on the specific version of

[issue32056] Improve exceptions in aifc, sunau and wave

2018-03-01 Thread Ned Deily
Ned Deily added the comment: @zhangdeyue, can you please request that the CVE be unassigned? I think we all agree this is *not* a security issue. -- keywords: -security_issue nosy: +ned.deily ___ Python tracker

[issue30607] Extract documentation theme into a separate package

2018-03-01 Thread Ned Deily
Ned Deily added the comment: Thanks, Jon, and every one else who helped with and commented on the PR. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker

[issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit

2018-03-01 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +5720 stage: -> patch review ___ Python tracker

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Elias Zamaria added the comment: Mark, you said "if there's a test that's explicitly checking that `my_fraction // my_float` returns something of type `int`, then the behaviour is clearly intentional". I see exactly that. See

[issue10507] Check well-formedness of reST markup within "make patchcheck"

2018-03-01 Thread Cheryl Sabella
Cheryl Sabella added the comment: Since `blurb` says to write a simple ReST paragraph and that is code reviewed with the PR, is this issue still needed? -- nosy: +csabella ___ Python tracker

[issue32493] UUID Module - FreeBSD build failure

2018-03-01 Thread Michael Felt
Michael Felt added the comment: oops, sain openbsd, should be freebsd -- ___ Python tracker ___

[issue32978] Issues with reading large float values in AIFC files

2018-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: I'm finding it hard to imagine why you'd ever have a sample rate greater than 1e308 in an audio file. (In fact, it's hard to imagine needing a sample rate greater than 1e6.) Raising an OverflowError for a value that's too large to fit in

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread ooomzay
On Thursday, March 1, 2018 at 12:35:38 PM UTC, Richard Damon wrote: > [snip] > I disagree with the original complaint that these > are always 'errors', if you know you have garbage collection, the > allowance of cycles knowing they will still get cleaned up is a useful > simplification if you

[issue18855] Inconsistent README filenames

2018-03-01 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.8 -Python 3.5 ___ Python tracker ___

[issue18855] Inconsistent README filenames

2018-03-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks. I'm going to reject this and to keep the readme files as is. The consequence of renaming files, now that we are on GitHub, is that GitHub doesn't retain the complete file history. So while on GitHub, clicking the file's

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Cousin Stanley
Gene Heskett wrote: > I know its supposed to be in the debian stretch repo's. > > I've been told to get a fitbit, but they don't support linux > of any flavor, and that leaves galileo as the possible solution? > > So how should I proceed since the only stretch machine I have ATM > is an

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 9:49 AM, Rick Johnson wrote: > On Wednesday, February 28, 2018 at 9:00:37 PM UTC-6, Chris Angelico wrote: >> On Thu, Mar 1, 2018 at 1:46 PM, Rick Johnson >> wrote: >> > On Wednesday, February 28, 2018 at 5:02:17

[issue32977] added acts_like decorator to dataclasses module

2018-03-01 Thread Eric V. Smith
Eric V. Smith added the comment: Since this has to wait until 3.8 and I'm swamped with 3.7, this is going to have to wait for me to look at it. Is there a reason it needs to be part of dataclasses itself? I'd suggest separating it out, putting it on PyPI, and getting some

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Wednesday, February 28, 2018 at 9:00:37 PM UTC-6, Chris Angelico wrote: > On Thu, Mar 1, 2018 at 1:46 PM, Rick Johnson > wrote: > > On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6, Chris Angelico wrote: > > > >> Here's one example: reference cycles. When do

[issue32978] Issues with reading large float values in AIFC files

2018-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm fine with an OverflowError, but it looks inconsistent to me that for some huge values an OverflowError is not raised, but aifc._HUGE_VAL is returned instead. And I think that using math.ldexp() can be more preferable that

Problem: Need galileo running on debian wheezy

2018-03-01 Thread Gene Heskett
I know its supposed to be in the debian stretch repo's. I've been told to get a fitbit, but they don't support linux of any flavor, and that leaves galileo as the possible solution? So how should I proceed since the only stretch machine I have ATM is an arm64, aka a rock64. -- Cheers, Gene

[issue32979] dict get() function equivalent for lists.

2018-03-01 Thread Felix
Felix added the comment: Thanks for the link! Interesting read. I have to disagree with the statement that this is something that happens very rarely. Just have a look at the mess on stackoverflow alone (these are only the top results I got after a minute of googling):

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: Serhiy: I think both those results are reasonable, and not too surprising. It should be easy to understand that the mixed-type operation converts one of the arguments to float, and if that conversion overflows we get an exception. A

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2018-03-01 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager

2018-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know, maybe someone with a Mac wants to try and debug it? -- ___ Python tracker ___

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread ooomzay
On Thursday, March 1, 2018 at 11:59:26 PM UTC, Chris Angelico wrote: > On Fri, Mar 2, 2018 at 10:38 AM, ooomzay wrote: > > def raii_example(): > > > > src = RAIIFileAccess("src.txt", 'r') > > dst = RAIIFileAccess("dst.txt", 'w') > > > > for line in src: > > dst.write(line) >

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Thursday, March 1, 2018 at 6:10:45 PM UTC-6, Chris Angelico wrote: > On Fri, Mar 2, 2018 at 10:58 AM, Rick Johnson > wrote: > > I don't buy into the religion that _all_ CRs are evil. Those > > who make such claims are dealing in absolutes. And as Obi- > > wan

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Wednesday, February 28, 2018 at 10:03:56 PM UTC-6, ROGER GRAYDON CHRISTMAN wrote: [...] > If you want something that looks like a real world example, > consider the very common doubly-linked list: > > [ 1 ] <---> [ 2 ] <---> [ 3 ] <--.--> [ N ] > > This is chock-full of reference

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 10:38 AM, wrote: > def raii_example(): > > src = RAIIFileAccess("src.txt", 'r') > dst = RAIIFileAccess("dst.txt", 'w') > > for line in src: > dst.write(line) > What happens if we make this change? def raii_example(): global dst

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Wednesday, February 28, 2018 at 11:44:39 PM UTC-6, Paul Rubin wrote: > Rick Johnson writes: > > Can you provide a real world example in which you need an > > object which circularly references _itself_? > > DOM trees are a classic example (see the various DOM >

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 10:58 AM, Rick Johnson wrote: > I don't buy into the religion that _all_ CRs are evil. Those > who make such claims are dealing in absolutes. And as Obi- > wan warned Anakin, only a Sith deals in absolutes. ;-) So mathematicians are all Sith?

Re: csv module and NULL data byte

2018-03-01 Thread Tim Chase
On 2018-03-01 23:57, John Pote wrote: > On 01/03/2018 01:35, Tim Chase wrote: > > While inelegant, I've "solved" this with a wrapper/generator > > > >f = file(fname, …) > >g = (line.replace('\0', '') for line in f) > I wondered about something like this but thought if there's a way > of

[issue32981] Catastrophic backtracking in poplib and difflib

2018-03-01 Thread James Davis
New submission from James Davis : Hi Python security team, My name is James Davis. I'm a security researcher at Virginia Tech. The python core (cpython) has 2 regular expressions vulnerable to catastrophic backtracking that look like potential DOS vectors. The vulnerable

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Thursday, March 1, 2018 at 1:54:40 AM UTC-6, Serhiy Storchaka wrote: [...] > Every global function (or method of global class) creates a > reference cycle. > > def f(): pass > > f.__globals__['f'] is f (Note: This is also a response to dieter) This is true, but it does not answer

[issue32818] subprocess crash under Windows compatibility mode

2018-03-01 Thread Ma Lin
Change by Ma Lin : -- title: multiprocessing segmentfault under Windows compatibility mode -> subprocess crash under Windows compatibility mode ___ Python tracker

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 11:07 AM, wrote: > On Thursday, March 1, 2018 at 11:59:26 PM UTC, Chris Angelico wrote: >> On Fri, Mar 2, 2018 at 10:38 AM, ooomzay wrote: >> > def raii_example(): >> > >> > src = RAIIFileAccess("src.txt", 'r') >> > dst =

[issue32975] mailbox: It would be nice to move mailbox.Message from legacy email.message.Message API to new EmailMessage API

2018-03-01 Thread R. David Murray
R. David Murray added the comment: This is a reasonable request (a good way to use EmailMessage), but EmailMessage is not yet the default even for the email package. You have to specify policy=default to get it (or use it to construct a message). Mailbox probably

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2018 16:49:35 -0800, Rick Johnson wrote: > Remember, the challenge is _not_ simply a matter of circular references > (there is literally tons of Python code out there which creates CRs for > various reasons), no, the challenge is to create a custom class which > references

[issue32056] Improve exceptions in aifc, sunau and wave

2018-03-01 Thread zhangdeyue
zhangdeyue added the comment: I'm confused now. For any program which receive external file, to check the input file is necessary to do, isn't it? And program error lead to security bug, that's not right? The program itself check input file, catch and show some

Re: csv module and NULL data byte

2018-03-01 Thread John Pote
On 01/03/2018 01:35, Tim Chase wrote: While inelegant, I've "solved" this with a wrapper/generator f = file(fname, …) g = (line.replace('\0', '') for line in f) I wondered about something like this but thought if there's a way of avoiding the extra step it would keep the execution speed

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread MRAB
On 2018-03-01 23:38, ooom...@gmail.com wrote: On Thursday, March 1, 2018 at 12:15:57 AM UTC, Paul Rubin wrote: RAII is similar to Python's "with" statement. So it sounds like OP wants to replace one "malignant carbuncle" with another one. I would like to understand why you think RAII is

Re: csv module and NULL data byte

2018-03-01 Thread John Pote
On 01/03/2018 02:38, Dennis Lee Bieber wrote: On Wed, 28 Feb 2018 23:40:41 +, John Pote declaimed the following:     with open( fname, 'rt', encoding='iso-8859-1' ) as csvfile: Pardon? Has the CSV module changed in the last year or so? Python 3.6

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Gene Heskett
On Thursday 01 March 2018 15:31:32 Cousin Stanley wrote: > Gene Heskett wrote: > > I know its supposed to be in the debian stretch repo's. > > > > I've been told to get a fitbit, but they don't support linux > > of any flavor, and that leaves galileo as the possible solution? > > > > So how

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Gene Heskett
On Thursday 01 March 2018 17:29:27 Wildman via Python-list wrote: > On Thu, 01 Mar 2018 13:44:27 -0500, Gene Heskett wrote: > > I know its supposed to be in the debian stretch repo's. > > > > I've been told to get a fitbit, but they don't support linux of any > > flavor, and that leaves galileo

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread ooomzay
On Thursday, March 1, 2018 at 12:15:57 AM UTC, Paul Rubin wrote: > RAII is similar to Python's "with" statement. So it sounds like OP > wants to replace one "malignant carbuncle" with another one. I would like to understand why you think RAII is not substantially more pythonic than "With".

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Rick Johnson
On Wednesday, February 28, 2018 at 10:26:26 PM UTC-6, Steven D'Aprano wrote: > On Wed, 28 Feb 2018 18:46:05 -0800, Rick Johnson wrote: > > > On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6, Chris Angelico > > wrote: > > > >> Here's one example: reference cycles. When do they get detected?

Re: RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

2018-03-01 Thread ooomzay
On Thursday, March 1, 2018 at 11:51:50 PM UTC, Lawrence D’Oliveiro wrote: > On Friday, March 2, 2018 at 12:39:01 PM UTC+13, ooo...@gmail.com wrote: > > class RAIIFileAccess(): > > '''File Access-like Resource using [RAII] idiom''' > > > > ... > > > > def __del__(self): > >

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread ooomzay
On Friday, March 2, 2018 at 12:14:53 AM UTC, Chris Angelico wrote: > On Fri, Mar 2, 2018 at 11:07 AM, ooomzay wrote: > > On Thursday, March 1, 2018 at 11:59:26 PM UTC, Chris Angelico wrote: > >> On Fri, Mar 2, 2018 at 10:38 AM, ooomzay wrote: > >> > def raii_example(): > >> > > >> > src =

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread INADA Naoki
> > Remember, the challenge is _not_ simply a matter of circular > references (there is literally tons of Python code out there > which creates CRs for various reasons), no, the challenge is > to create a custom class which references _itself_, and then > explain (or demonstrate) how such a thing

[issue32056] Improve exceptions in aifc, sunau and wave

2018-03-01 Thread zhangdeyue
zhangdeyue added the comment: I agree that it is very small, but I still think it is indeed a security issue, because it can crash real world program when called by some library used in Deep Learning ASR project. Does a CVE assigned have any negative impact on you?

[issue32975] mailbox: It would be nice to move mailbox.Message from legacy email.message.Message API to new EmailMessage API

2018-03-01 Thread Abhilash Raj
Abhilash Raj added the comment: Can you suggest what would be the best way go about doing that? Given that mailbox.Message subclasses from Message, I am not sure how to proceed about this to make this configurable with a flag. I haven't yet made a PR, but this[1] is

[issue32056] Improve exceptions in aifc, sunau and wave

2018-03-01 Thread Ned Deily
Ned Deily added the comment: > I agree that it is very small, but I still think it is indeed a security > issue, because it can crash real world program when called by some library > used in Deep Learning ASR project. That sounds like a programming error, not a security

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2018-03-01 Thread Anthony Sottile
Anthony Sottile added the comment: Still a problem in 3.7: $ python3.7 Python 3.7.0b2 (default, Feb 28 2018, 06:59:18) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.parse("""x =

[issue10507] Check well-formedness of reST markup within "make patchcheck"

2018-03-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This is out of date. I'm closing it. Thanks. -- nosy: +Mariatta resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2018-03-01 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 4:16 PM, Ian Kelly wrote: > On Wed, Feb 28, 2018 at 8:00 PM, Chris Angelico wrote: >> On Thu, Mar 1, 2018 at 1:46 PM, Rick Johnson >> wrote: >>> On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6,

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Ian Kelly
On Wed, Feb 28, 2018 at 9:00 PM, ROGER GRAYDON CHRISTMAN wrote: > > On Wed, Feb 28, 2018, Rick Johnson wrote: > > On Wednesday, February 28, 2018 at 5:02:17 PM UTC-6, Chris Angelico wrote: >> >>> Here's one example: reference cycles. When do they get detected? >>> Taking a really

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Ian Kelly
On Thu, Mar 1, 2018 at 10:35 PM, Chris Angelico wrote: > On Fri, Mar 2, 2018 at 4:16 PM, Ian Kelly wrote: >> On Wed, Feb 28, 2018 at 8:00 PM, Chris Angelico wrote: >>> Not off hand, but I can provide an EXTREMELY real-world example of a

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Chris Angelico
On Fri, Mar 2, 2018 at 4:46 PM, Ian Kelly wrote: > On Thu, Mar 1, 2018 at 10:35 PM, Chris Angelico wrote: >> On Fri, Mar 2, 2018 at 4:16 PM, Ian Kelly wrote: >>> On Wed, Feb 28, 2018 at 8:00 PM, Chris Angelico

Homebrew changed default Python to python 3!

2018-03-01 Thread INADA Naoki
https://github.com/Homebrew/homebrew-core/pull/24604 /use/local/bin/python is symlink to python3. vim is built with python3. You can install it from bottle. Thanks to Homebrew maintainers!! -- https://mail.python.org/mailman/listinfo/python-list

[issue32982] Parse out invisible Unicode characters?

2018-03-01 Thread Franklin? Lee
New submission from Franklin? Lee : The following line should have a character that trips up the compiler. ‎indices = range(5) The character is \u200e, and was inserted by Google Keep. (I've already reported the issue to Google as a regression.) Here's the error

  1   2   >