[issue22872] multiprocessing.Queue raises AssertionError

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I don't think we need to document AssertionError in older Python versions. This 
is an implementation detail. We don't document all exceptions that can be 
raised with improper use of the API. Just don't do this.

In addition, using the assert statement for validating user input or the object 
state which depends on user actions is a bad style. We shouldn't encourage this 
by documenting it as a behavior of the stdlib. It was a bug, and it is fixed 
now.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-10-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 0461704060474cb358d3495322950c4fd00616a0 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the 
queue is closed. (GH-9010)
https://github.com/python/cpython/commit/0461704060474cb358d3495322950c4fd00616a0


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-08-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-08-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +8480
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-08-28 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-03-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The expected behaviour here would be to raise ValueError, as on other closed 
objects:

>>> s = io.StringIO()
>>> s.close()
>>> s.write("")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: I/O operation on closed file

--
nosy: +pitrou
versions: +Python 3.8 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-03-13 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
components: +Library (Lib) -ctypes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-01-22 Thread Jason Qian

Change by Jason Qian :


--
components: +ctypes -Library (Lib)
versions:  -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2016-01-20 Thread Berker Peksag

Berker Peksag added the comment:

See issue 5001 for more general cleanup in multiprocessing.

> [...] (2) altering the behavior in a new release version (perhaps 3.6 when it 
> comes) and documenting that change appropriately there.

+1. We can also document AssertionError in older Python versions.

--
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2015-09-20 Thread Davin Potts

Davin Potts added the comment:

The proposed patch would potentially break existing code which anticipates the 
current behavior.  The potential negative impact means this particular proposed 
patch is not viable.

Choices forward include:  (1) better documenting the existing, established 
implementation behavior (perhaps having the assert provide a more informative 
message), or (2) altering the behavior in a new release version (perhaps 3.6 
when it comes) and documenting that change appropriately there.

As to what sort of exception we should expect in this situation, unfortunately 
comparing to the queue module's Queue does not help guide expectations much 
since it does not have need of a close().

Of the two above options, I'm more inclined towards the first.  Does 
@Joseph.Siddall have other motivations that helped motivate this suggested 
improvement?

--
stage: patch review -> 
type: behavior -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2015-07-21 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy:  -ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22872
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2015-06-12 Thread Milan Oberkirch

Milan Oberkirch added the comment:

Here is the trivial patch for that :)

--
keywords: +patch
nosy: +zvyn
Added file: http://bugs.python.org/file39700/issue22872.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22872
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue22872] multiprocessing.Queue raises AssertionError

2015-02-22 Thread Davin Potts

Changes by Davin Potts pyt...@discontinuity.net:


--
nosy: +davin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22872
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2014-11-14 Thread Joseph Siddall

New submission from Joseph Siddall:

putting something in Queue(multiprocessing.Queue) after closing it raises an 
AssertionError.
Getting something out of a Queue after closing it raises an OSError.
I expected both scenarios to raise the same exception.


To Reproduce:


 from multiprocessing import Queue
 q = Queue()
 q.close()
 q.put(ok)
Traceback (most recent call last):
...
AssertionError


 from multiprocessing import Queue
 q = Queue()
 q.close()
 q.get()
Traceback (most recent call last):
...
OSError: handle is closed

--
components: Library (Lib)
messages: 231164
nosy: Joseph.Siddall
priority: normal
severity: normal
status: open
title: multiprocessing.Queue raises AssertionError
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22872
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2014-11-14 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman, jnoller, sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22872
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com