Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

long handling in python3 #57

Closed Jaymon closed 1 year ago

Jaymon commented 6 years ago

In order to get around the lack of a long in python3, compat does this:

class long(int): pass

but long is used by the prom.Field to create BIGINT fields in python2, the problem is that int in python3 is the same as long in python 2 (so there isn't really a way to create BIGINT fields in python 3 without doing something like:

from prom.compat import long
from prom import Field

some_field = Field(long)

which seems horrible and is definitely counter-intuitive. I'm wondering if it is worth just making all integers BIGINT in python 3?