UUIDs eventually choke as primary key

2018-02-12 Thread M Mackey
I've run into a strange issue with using a UUID as primary key, and I'm hoping we can either verify this is a bug, or figure out what I've done wrong. I've got a core model object with a UUID for it's primary key. (Generated external to this system, thus using that for when additional

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
e self value UUID('338fa43f-3e07-4e83-8525-d195d2fc64d4') << 3) REPORTS AS UUID So, if 3) is right and 'value' is a UUID, 1) should keep us from getting to 2). But we get there. On Friday, February 23, 2018 at 12:59:28 PM UTC-8, M Mackey wrote: > > Adding details I seem

Re: UUIDs eventually choke as primary key

2018-02-22 Thread M Mackey
jango/core/handlers/exception.py in inner On Monday, February 12, 2018 at 1:00:53 PM UTC-8, M Mackey wrote: > > I've run into a strange issue with using a UUID as primary key, and I'm > hoping we can either verify this is a bug, or figure out what I've done > wrong. > >

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
The thing that gets me is this part: .../django/db/models/fields/__init__.py in to_python > return uuid.UUID(value) ... > /usr/local/lib/python3.6/uuid.py in __init__ > hex = hex.replace('urn:', '').replace('uuid:', '') ... > > During handling of the above exception

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
wrote: > > On Fri, Feb 23, 2018 at 4:20 PM, M Mackey <mm...@mac.com > > wrote: > > I have noticed in the python > > path that there are two paths to .../lib/python3.6. One from my > virtualenv, > > and one at /usr/local/. Not sure where to clear that up, si

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
Adding details I seem to have left out. The id is defined like this: id = models.UUIDField(primary_key=True, default=uuid.uuid1, editable=False) and I'm running on PostgreSQL. I'm pretty sure I never create a row without already having the key. On Monday, February 12, 2018 at 1:00:53 PM UTC-8, M

Re: UUIDs eventually choke as primary key

2018-03-15 Thread M Mackey
Well, I don't seem to be able to get around this. I'm going to have to switch away from using a UUID as a primary key, which fortunately doesn't seem like too much work. On Thursday, March 1, 2018 at 8:53:13 AM UTC-8, M Mackey wrote: > > I added some debug support, and there are on

Re: UUIDs eventually choke as primary key

2018-03-01 Thread M Mackey
string, so it does not appear to be a case of mistaken identity. Which makes the failure of "not instance" to catch the UUID after a while all the more weird... I'm pretty baffled on this one. Am I really the only one running into this? M On Friday, February 23, 2018 at 1:17:34 PM UTC-8