[issue33023] Unable to copy ssl.SSLContext

2021-04-17 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 324e1790094708538acf2e7795f9c44e3732aaf7 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001) (GH-11008)

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10242 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7a2cf1e7d3bf300e98c702589d405734f4a8fcf8 by Serhiy Storchaka in branch '3.6': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001) https://github.com/python/cpython/commit/7a2cf1e7d3bf300e98c702589d405734f4a8fcf8

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread miss-islington
miss-islington added the comment: New changeset 6485aa6eb1024672f08afdd577e2b5792eb6b03c by Miss Islington (bot) in branch '3.7': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934) https://github.com/python/cpython/commit/6485aa6eb1024672f08afdd577e2b5792eb6b03c --

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10240 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +10239 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33023] Unable to copy ssl.SSLContext

2018-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 42b1d6127bd8595522a78a75166ebb9fba74a6a2 by Serhiy Storchaka in branch 'master': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934) https://github.com/python/cpython/commit/42b1d6127bd8595522a78a75166ebb9fba74a6a2 --

[issue33023] Unable to copy ssl.SSLContext

2018-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 10934 fixes just a typo in the name of NotImplementedError. It fixes also a similar typo in IDLE. It adds new tests and fixes existing tests for NotImplementedError in SSLSocket. -- ___ Python tracker

[issue33023] Unable to copy ssl.SSLContext

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10189 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33023] Unable to copy ssl.SSLContext

2018-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After discussing on Python-Dev all error messages were changed to "cannot pickle 'XXX' object". https://mail.python.org/pipermail/python-dev/2018-October/155599.html I suggest to not add __getstate__() methods with different error messages. But the dup()

[issue33023] Unable to copy ssl.SSLContext

2018-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If changes to __getstate__() be merged in 2.7, I suggest to unify them with issue33138. -- ___ Python tracker ___

[issue33023] Unable to copy ssl.SSLContext

2018-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The change to the dup() method looks as a bug fix to me. It needs to be backported to all maintained versions. New tests can be backported to all versions except perhaps 2.7 (not tested). Changes to __getstate__() will be not needed if merge issue33138 PR

[issue33023] Unable to copy ssl.SSLContext

2018-06-06 Thread Ned Deily
Ned Deily added the comment: We have a languishing PR here. What should be done with it? If I understand correctly, Serhiy is proposing a more general cleanup in Issue33138 PR 6239. If that is merged, can PR 6099 here be simplified? What branches should it apply to? (retargeting for 3.8

[issue33023] Unable to copy ssl.SSLContext

2018-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue33138. -- ___ Python tracker ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-25 Thread Christian Heimes
Christian Heimes added the comment: That's the only reason for PR 6099. The change makes it more obvious that SSL objects can't be serialized or copied. -- ___ Python tracker

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Christian, I thought the reason of adding __getstate__ methods which raise an exception is that the existing error message doesn't satisfy your. What is the other reason? -- ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: Thank you, I'll consider myself having been warned :) On Sat, Mar 24, 2018, 7:28 AM Christian Heimes wrote: > > Christian Heimes added the comment: > > Serhiy, > I don't understand what you

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: Serhiy, I don't understand what you are trying to tell me. "cannot serialize '%s' object" is used all over the interpreter, e.g. io, pickle, etree, and more. I feel it's the standard message. Vitaly, A lot of objects can't be copied. It's

[issue33023] Unable to copy ssl.SSLContext

2018-03-23 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: It would be very helpful to make a statement in SSLContext's documentation to the effect that it's not copyable. This is frankly the first time I run into a non-copyable object.I spend quite a bit of time researching this after

[issue33023] Unable to copy ssl.SSLContext

2018-03-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 6099 changes error message "can't pickle SSLContext objects" to "cannot serialize SSLContext object", right? Wouldn't be better to change the standard error message instead? -- nosy: +serhiy.storchaka

[issue33023] Unable to copy ssl.SSLContext

2018-03-13 Thread Christian Heimes
Christian Heimes added the comment: Antoine is correct. Session resumption is fully transparent for the application layer. The context object is designed to be reused by multiple connections to same or different servers. -- ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-13 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5862 stage: -> patch review ___ Python tracker ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: You won't have any session resumption tickets until a connection succeeds. And even then, I don't think it would be a problem. By design, SSL contexts are meant to be re-used accross multiple connections. --

[issue33023] Unable to copy ssl.SSLContext

2018-03-12 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: > What would those side-effects be? Christian Heimes suggested that > A context contains elements that can't be cloned easily, e.g. session > resumption tickets. My concern then would be potential side-effects from such session

[issue33023] Unable to copy ssl.SSLContext

2018-03-11 Thread Antoine Pitrou
Change by Antoine Pitrou : -- type: crash -> behavior ___ Python tracker ___ ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Each connection attempt will require a fresh unadulterated clone of the > ssl.SSLContext instance provided by user to avoid any side-effects from prior > connection attempts. What would those side-effects be? -- nosy: +pitrou

[issue33023] Unable to copy ssl.SSLContext

2018-03-08 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: Also, updating ssl.SSLContext documentation about intentional inability to copy generically and suggestion how to go about it if you need to obtain a clone or similar would be terrific and save developers time so they won't run into

[issue33023] Unable to copy ssl.SSLContext

2018-03-08 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: Hi Christian, thank you for following up. Here is my use case, and perhaps you can suggest something else that will work: I am refactoring the transport layer in the Pika AMQP client library. The user provides an ssl.SSLContext

[issue33023] Unable to copy ssl.SSLContext

2018-03-08 Thread Christian Heimes
Christian Heimes added the comment: This is rather a feature than a bug. It is not possible to make a copy of a SSLContext object because OpenSSL doesn't support the operation. A context contains elements that can't be cloned easily, e.g. session resumption tickets.

[issue33023] Unable to copy ssl.SSLContext

2018-03-07 Thread Vitaly Kruglikov
Change by Vitaly Kruglikov : -- assignee: -> christian.heimes components: +SSL nosy: +christian.heimes ___ Python tracker ___

[issue33023] Unable to copy ssl.SSLContext

2018-03-07 Thread Vitaly Kruglikov
New submission from Vitaly Kruglikov : ``` import copy import ssl copy.copy(ssl.create_default_context()) ``` results in `TypeError: can't pickle SSLContext objects` This prevents me from being able to `copy.deepcopy()` an object that references `ssl.SSLContext`. The

[issue33023] Unable to copy ssl.SSLContext

2018-03-07 Thread Vitaly Kruglikov
Change by Vitaly Kruglikov : -- type: -> crash ___ Python tracker ___ ___