This is an automated email from the ASF dual-hosted git repository.
kojiromike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new ad820ed AVRO-2676: DeprecationWarning on import avro-python3 (#947)
ad820ed is described below
commit ad820ed7edba566a8a2be480d5e2e42238862a5a
Author: Michael A. Smith <[email protected]>
AuthorDate: Sun Aug 16 14:48:20 2020 -0400
AVRO-2676: DeprecationWarning on import avro-python3 (#947)
---
lang/py3/avro/__init__.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lang/py3/avro/__init__.py b/lang/py3/avro/__init__.py
index 3493dd6..5fd4675 100644
--- a/lang/py3/avro/__init__.py
+++ b/lang/py3/avro/__init__.py
@@ -20,8 +20,11 @@
__all__ = ('schema', 'io', 'datafile', 'protocol', 'ipc')
-
import pkgutil
+import warnings
__version__ = (pkgutil.get_data(__name__, 'VERSION.txt') or
b'0.0.1+unknown').decode().strip()
VERSION = __version__
+
+warnings.warn("`avro-python3` is deprecated. Please use the `avro` package
instead.",
+ DeprecationWarning)