[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-28 Thread STINNER Victor
STINNER Victor added the comment: I merged the doc change. I understand that the issue can now be closed, thanks to everyone who helped here! -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset ea446409cd5f1364beafd5e5255da673f285 by Victor Stinner (David H) in branch 'master': bpo-35701: Update doc for UUID weak referencing (GH-11621) https://github.com/python/cpython/commit/ea446409cd5f1364beafd5e5255da673f285 --

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-28 Thread David Heiberg
David Heiberg added the comment: I have submitted a PR for the documentation. Hopefully this is enough to resolve the issue and close. -- ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374, 11375 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374, 11375, 11376 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-18 Thread David Heiberg
David Heiberg added the comment: Agreed. I will fix the documentation and submit a PR this weekend hopefully. -- ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: The UUID module documentation (and docstring) begin with: "This module provides immutable UUID objects" Immutable is a stronger guarantee than __slots__ enforces already, so the documentation already ruled out adding arbitrary attributes to UUID (and the

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread David Heiberg
David Heiberg added the comment: Should the note on arbitrary attributes also be removed? If this was documented previously then I don't see the need for it here, but if this has never been documented then maybe some other way of wording it may be sensible to include? --

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: https://docs.python.org/dev/whatsnew/3.8.html#optimizations """uuid.UUID now uses __slots__ to reduce its memory footprint. Note that this means that instances can no longer be weak-referenced and that arbitrary attributes can no longer be added to them."""

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was already documented. We need to fix the documentation. See the discussion above. -- ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: > What's New changes still are needed. Sorry, what do you want to document? The fact that uuid.UUID now use slots? If yes, maybe reopen bpo-30977 instead? This issue is only about fixing a regression caused by bpo-30977 (it wasn't possible to create a weak

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What's New changes still are needed. Are weak references to UUID used in any existing code, or just in the code that is planned to be written? -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: I understand that the reported issue is now fixed, so I close the issue. Note: uuid.UUID of Python 3.7 doesn't use slots. -- keywords: -3.7regression resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset f1d8e7cf17a010d2657822e06a41b30c9542a8c7 by Victor Stinner (David H) in branch 'master': bpo-35701: Added __weakref__ slot to uuid.UUID (GH-11570) https://github.com/python/cpython/commit/f1d8e7cf17a010d2657822e06a41b30c9542a8c7 --

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-17 Thread David Heiberg
David Heiberg added the comment: Ahh yes of course, I will remove that from the notes. With regards to the second note, would it do any harm to leave it in? I suppose it does imply that this was possible before... -- ___ Python tracker

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: David, the What's New note about weak references no longer being possible should be removed as part of this change. I'm not sure the note on arbitrary attributes no longer being addable is needed either (__setattr__ blocked that beforehand, it's just even

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-15 Thread David Heiberg
Change by David Heiberg : -- keywords: +patch, patch, patch pull_requests: +11236, 11237, 11238 stage: needs patch -> patch review ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-15 Thread David Heiberg
Change by David Heiberg : -- keywords: +patch, patch pull_requests: +11236, 11237 stage: needs patch -> patch review ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-15 Thread David Heiberg
Change by David Heiberg : -- keywords: +patch pull_requests: +11236 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread David Heiberg
David Heiberg added the comment: Ok thanks for your input, I will work on a PR and hopefully submit one tomorrow or Wednesday depending on schedule. -- ___ Python tracker

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread wouter bolsterlee
wouter bolsterlee added the comment: the test could be sth like x = uuid.uuid4() y = weakref.ref(x) assert x is y() -- ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread Tal Einat
Tal Einat added the comment: Indeed, a PR for this should include a test that weakrefs work. -- ___ Python tracker ___ ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread David Heiberg
David Heiberg added the comment: Since there has been no objection to this yet, would it be alright for me to take this as my first PR? On top of the change you mentioned to the __slots__ list, should there also be a test written so that a similar regression doesn't happen again?

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-10 Thread Brett Cannon
Change by Brett Cannon : -- title: 3.8 needlessly breaks weak references for UUIDs -> [uuid] 3.8 breaks weak references for UUIDs ___ Python tracker ___