Skip to content

Commit

Permalink
Avoid string types when using ClassVar
Browse files Browse the repository at this point in the history
As of Python 3.9.8, this does not work with Pydantic BaseModel, and
does not work in a way that causes the whole module to fail to
import.  See pydantic/pydantic#3401.

In general, Pydantic does not work well with string types as enabled
by from __future__ import annotations.
  • Loading branch information
rra committed Nov 11, 2021
1 parent d67b257 commit b9dacf1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions python/lsst/daf/butler/core/logging.py
Expand Up @@ -19,8 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import annotations

__all__ = ("ButlerMDC", "ButlerLogRecords", "ButlerLogRecordHandler",
"ButlerLogRecord", "JsonLogFormatter")

Expand Down
2 changes: 0 additions & 2 deletions python/lsst/daf/butler/core/serverModels.py
Expand Up @@ -19,8 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import annotations

__all__ = (
"QueryDatasetsModel",
"QueryDataIdsModel",
Expand Down

0 comments on commit b9dacf1

Please sign in to comment.