Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit 113cf83

Browse files
authored
docs: raise DeprecationWarning when 'dialogflow' is installed (#257)
1 parent e78b0e6 commit 113cf83

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

README.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
Dialogflow: Python Client
22
=========================
33

4-
|release level|
54

6-
Python idiomatic client for `Dialogflow`_
5+
.. warning::
6+
The package `dialogflow`_ has been renamed to `google-cloud-dialogflow`_.
7+
`dialogflow`_ will no longer be updated.
78

8-
`Dialogflow`_ is an enterprise-grade NLU platform that makes it easy for
9+
For help upgrading to ``google-cloud-dialogflow>=2.0.0``, see the `Migration Guide`_.
10+
11+
After **October 28, 2021**, importing code from the latest release of `dialogflow`_ will result in a ``RuntimeError``. If you need to continue to use `dialogflow`_ after this date, please pin to a specific version of `dialogflow`_ (e.g., ``dialogflow==1.1.1``). If you have questions, please `file an issue`_.
12+
13+
.. _dialogflow: https://pypi.org/project/dialogflow
14+
.. _google-cloud-dialogflow: https://pypi.org/project/google-cloud-dialogflow
15+
.. _Migration Guide: https://github.com/googleapis/python-dialogflow/blob/master/UPGRADING.md
16+
.. _file an issue: https://github.com/googleapis/python-dialogflow/issues
17+
18+
19+
20+
Python idiomatic client for `Dialogflow <https://dialogflow.com/>`_
21+
22+
`Dialogflow <https://dialogflow.com/>`_ is an enterprise-grade NLU platform that makes it easy for
923
developers to design and integrate conversational user interfaces into
1024
mobile apps, web applications, devices, and bots.
1125

@@ -17,8 +31,6 @@ Read more about the client libraries for Cloud APIs, including the older
1731
Google APIs Client Libraries, in
1832
`Client Libraries Explained <https://cloud.google.com/apis/docs/client-libraries-explained>`_.
1933

20-
.. _Dialogflow: https://dialogflow.com/
21-
2234

2335
Before you begin
2436
----------------
@@ -88,4 +100,4 @@ See `the LICENSE file <https://github.com/googleapis/python-dialogflow/blob/mast
88100

89101

90102
.. |release level| image:: https://img.shields.io/badge/support-GA-gold.svg
91-
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability
103+
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability

dialogflow_v2/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@
3838
)
3939
warnings.warn(message, DeprecationWarning)
4040

41+
package_deprecation_message = (
42+
"The package 'dialogflow' has been renamed to 'google-cloud-dialogflow'. "
43+
"'dialogflow' will no longer be updated. "
44+
"For help upgrading to google-cloud-dialogflow>=2.0.0, "
45+
"see https://github.com/googleapis/python-dialogflow/blob/master/UPGRADING.md. "
46+
"\n\nAfter October 28, 2021, importing code from the latest release of 'dialogflow' "
47+
"will result in a RuntimeError. If you need to continue to use 'dialogflow' after this date, "
48+
"please pin to a specific version of 'dialogflow' (e.g., dialogflow==1.1.1). "
49+
"If you have questions, please file an issue: "
50+
"https://github.com/googleapis/python-dialogflow/issues."
51+
)
52+
53+
warnings.warn(
54+
package_deprecation_message,
55+
DeprecationWarning
56+
)
57+
4158

4259
class AgentsClient(agents_client.AgentsClient):
4360
__doc__ = agents_client.AgentsClient.__doc__

dialogflow_v2beta1/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@
4141
warnings.warn(message, DeprecationWarning)
4242

4343

44+
package_deprecation_message = (
45+
"The package 'dialogflow' has been renamed to 'google-cloud-dialogflow'. "
46+
"'dialogflow' will no longer be updated. "
47+
"For help upgrading to google-cloud-dialogflow>=2.0.0, "
48+
"see https://github.com/googleapis/python-dialogflow/blob/master/UPGRADING.md. "
49+
"\n\nAfter October 28, 2021, importing code from the latest release of 'dialogflow' "
50+
"will result in a RuntimeError. If you need to continue to use 'dialogflow' after this date, "
51+
"please pin to a specific version of 'dialogflow' (e.g., dialogflow==1.1.1). "
52+
"If you have questions, please file an issue: "
53+
"https://github.com/googleapis/python-dialogflow/issues."
54+
)
55+
56+
warnings.warn(
57+
package_deprecation_message,
58+
DeprecationWarning
59+
)
4460
class EnvironmentsClient(environments_client.EnvironmentsClient):
4561
__doc__ = environments_client.EnvironmentsClient.__doc__
4662
enums = enums

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
name = "dialogflow"
2121
description = "Client library for the Dialogflow API"
22-
version = "1.1.0"
22+
version = "1.1.1"
2323
release_status = "Development Status :: 5 - Production/Stable"
2424
dependencies = ["google-api-core[grpc] >= 1.14.0, < 2.0.0dev"]
2525

0 commit comments

Comments
 (0)