Skip to content

Commit

Permalink
feat: apply patch at the top level import
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybayblade committed Sep 19, 2023
1 parent 557dd11 commit 2ae120f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 15 additions & 0 deletions aea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@

"""Contains the AEA package."""

# pylint: disable=wrong-import-position

import sys


# Patch to fix https://github.com/protocolbuffers/protobuf/issues/3276

_google_upb_message = sys.modules.pop("google._upb._message", None)

from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2


if _google_upb_message is not None:
sys.modules["google._upb._message"] = _google_upb_message

import inspect
import os

Expand Down
14 changes: 0 additions & 14 deletions aea/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,5 @@

"""This module contains the implementation of command-line tool 'aea'."""

# pylint: disable=wrong-import-position

import sys


# Patch to fix https://github.com/protocolbuffers/protobuf/issues/3276

_google_upb_message = sys.modules.pop("google._upb._message", None)

from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2


if _google_upb_message is not None:
sys.modules["google._upb._message"] = _google_upb_message

from .core import cli

0 comments on commit 2ae120f

Please sign in to comment.