]> git.ipfire.org Git - thirdparty/psycopg.git/commit
refactor(enum): rename python_type -> enum, enum_labels -> labels on EnumInfo
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 18 Apr 2022 17:23:32 +0000 (19:23 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 22 Apr 2022 03:03:24 +0000 (05:03 +0200)
commit17bfce4baffa7b48db59d3258e3efd60133bc677
tree5908ce46d1e82216a4dadd104b12204c4c8a4957
parent278d0c382e3b71fd34084f249e3cc0853d90d954
refactor(enum): rename python_type -> enum, enum_labels -> labels on EnumInfo

The previous name were lifted from the composite adapters. However, that
class would have had a more ambiguous "type" attribute, and "types" for
the fields, hence the decision of using "python_" and "fields_" prefix
to disambiguate.

In the enum adapters context, enum is not ambiguous, so a more natural
name seems preferred.
docs/basic/adapt.rst
psycopg/psycopg/_typeinfo.py
psycopg/psycopg/types/enum.py
tests/types/test_enum.py