[issue30977] reduce uuid.UUID() memory footprint

2018-09-10 Thread Tal Einat
Tal Einat added the comment: New changeset 54752533b2ed1c898ffe5ec2e795c6910ee46a39 by Tal Einat in branch 'master': bpo-30977: rework code changes according to post-merge code review (GH-9106) https://github.com/python/cpython/commit/54752533b2ed1c898ffe5ec2e795c6910ee46a39 --

[issue30977] reduce uuid.UUID() memory footprint

2018-09-10 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +8586 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30977] reduce uuid.UUID() memory footprint

2018-09-07 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +8560 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: Thanks for the suggestion and the original patch, Wouter! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: New changeset 3e2b29dccc3ca9fbc418bfa312ad655782e250f2 by Tal Einat in branch 'master': bpo-30977: make uuid.UUID use __slots__ (GH-9078) https://github.com/python/cpython/commit/3e2b29dccc3ca9fbc418bfa312ad655782e250f2 --

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: Oops. I missed the fact that Tal created PR 9078. Sorry, I reopen the issue ;-) -- resolution: out of date -> status: closed -> open ___ Python tracker

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I close the issue because of the pickle issue that hasn't been addressed by the wouter bolsterlee (the author) didn't reply for 1 month 1/2. @wouter bolsterlee: if you still want to work on that issue, you should try to address the pickle issue first, then

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: See new PR which addresses pickle forward and backward compatibility. -- nosy: +taleinat ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +8536 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue30977] reduce uuid.UUID() memory footprint

2018-02-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2017-09-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue30977] reduce uuid.UUID() memory footprint

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change breaks pickle. You should preserve forward and backward pickle compatibility. 1. Pickle data produced by old Python versions should be unpickleable with a new implementation. Implement __setstate__ for satisfying

[issue30977] reduce uuid.UUID() memory footprint

2017-07-21 Thread wouter bolsterlee
wouter bolsterlee added the comment: i consider uuids as low level data types, not as fancy containers, similar to how i view datetime objects. given the native support in e.g. postgresql and many other systems, it's common to deal with uuids. of course you can convert to/from strings or

[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Nir Soffer
Nir Soffer added the comment: This saves memory, but using str(uuid.uuid4()) requires even less memory. If you really want to save memory, you can keep the uuid.uuid4().int. Can you explain someone would like to have 100 uuid objects, instead of 100 strings? What is the advantage of

[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee
Wouter Bolsterlee added the comment: as a follow-up note, i also experimented with keeping the actual value as a bytes object instead of an integer, but that does not lead to less memory being used: a 128-bit integer uses less memory than a 16 byte bytes object (presumably because

[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee
New submission from Wouter Bolsterlee: memory usage for uuid.UUID seems larger than it has to be. it seems that using __slots__ will save around ~100 bytes per instance, which is very significant, e.g. when dealing with large sets of uuids (which are often used as "primary keys" into external

[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee
Changes by Wouter Bolsterlee : -- pull_requests: +2835 ___ Python tracker ___ ___