[issue33138] Improve standard error for uncopyable types

2018-10-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Changed to "cannot pickle 'XXX' object" after discussing on Python-Dev:

https://mail.python.org/pipermail/python-dev/2018-October/155599.html

--

___
Python tracker 

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



[issue33138] Improve standard error for uncopyable types

2018-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 0353b4eaaf451ad463ce7eb3074f6b62d332f401 by Serhiy Storchaka in 
branch 'master':
bpo-33138: Change standard error message for non-pickleable and non-copyable 
types. (GH-6239)
https://github.com/python/cpython/commit/0353b4eaaf451ad463ce7eb3074f6b62d332f401


--

___
Python tracker 

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



[issue33138] Improve standard error for uncopyable types

2018-10-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
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



[issue33138] Improve standard error for uncopyable types

2018-09-18 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



[issue33138] Improve standard error for uncopyable types

2018-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Does anybody have opinion about this issue? Is this option the best of 
possible? I'm going to merge the PR soon.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue33138] Improve standard error for uncopyable types

2018-06-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Current error messages for different classes:

   "can't pickle XXX objects" (default)
   "Cannot serialize XXX object" (socket, BZ2Compressor, BZ2Decompressor)
   "can not serialize a 'XXX' object" (buffered files in _pyio)
   "cannot serialize 'XXX' object" (FileIO, TextWrapperIO, WinConsoleIO, 
buffered files in _io, LZMACompressor, LZMADecompressor)

Yest one error message is proposed by PR 6099 in issue33023 for SSLContext:

   "cannot serialize {} object"

PR 6239 replaces them with unified

   "cannot serialize 'XXX' object"

which already is used in some extension classes. This is the most popular error 
message except the default error message. I'm not sure this is the best error 
message. "can't"/"Cannot"/"cannot"/"can not", using an article and quotes -- 
what is better?

--

___
Python tracker 

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



[issue33138] Improve standard error for uncopyable types

2018-03-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +5978
stage:  -> patch review

___
Python tracker 

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



[issue33138] Improve standard error for uncopyable types

2018-03-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently most extension types are not pickleable and copyable. The default 
error messages is "can't pickle XXX objects". This is confusing in case of 
copying because not all know that copying falls back to the pickle protocol 
(see for example issue33023). The proposed PR changes the default error 
messages to more neutral "cannot serialize 'XXX' object". This or similar error 
messages are already used in some classes (files, sockets, 
compressors/decompressors).

It also removes __getstate__ methods raising an error from non-pickleable 
extension types. They where added when extension types were pickleable by 
default (fixed in issue22995). Now they are not needed.

--
components: Interpreter Core
messages: 314418
nosy: alexandre.vassalotti, christian.heimes, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve standard error for uncopyable types
type: enhancement
versions: Python 3.8

___
Python tracker 

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