On 23 Jul 2014 07:28, "Antoine Pitrou" <antoine at python.org> wrote: > > Le 22/07/2014 17:03, Alex Gaynor a écrit : > >> >> The question is: >> >> a) Should we backport weak referencing _socket.sockets (changing the structure >> of the module seems overly invasive, albeit completely backwards >> compatible)? >> b) Does anyone know why weak references are used in the first place? The commit >> message just alludes to fixing a leak with no reference to an issue. > > > Because : > - the SSLSocket has a strong reference to the ssl object (self._sslobj) > - self._sslobj having a strong reference to the SSLSocket would mean both would only get destroyed on a GC collection > > I assume that's what "leak" means here :-) > > As for 2.x, I don't see why you couldn't just continue using a strong reference. As Antoine says, if the cycle already exists in Python 2 (and it sounds like it does), we can just skip backporting the weak reference change. I'll also give the Fedora Python list a heads up about your repo to see if anyone there can help you with the backport. Cheers, Nick. > > Regards > > Antoine. > > > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140723/f1a7aa07/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4