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

Commit

Permalink
fix: require python 3.7+ (#535)
Browse files Browse the repository at this point in the history
* chore(python): drop python 3.6

Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c

* add api_description to .repo-metadata.json

* require python 3.7+ in setup.py

* remove python 3.6 sample configs

* remove require check for python 3.6

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Jul 6, 2022
1 parent 069c71e commit 912518b
Show file tree
Hide file tree
Showing 16 changed files with 133 additions and 171 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:65e656411895bff71cffcae97246966460160028f253c2e45b7a25d805a5b142
# created: 2022-06-12T13:11:45.905884945Z
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
# created: 2022-07-05T18:31:20.838186805Z
1 change: 0 additions & 1 deletion .github/sync-repo-settings.yaml
Expand Up @@ -12,7 +12,6 @@ branchProtectionRules:
- 'docs'
- 'docfx'
- 'lint'
- 'unit (3.6)'
- 'unit (3.7)'
- 'unit (3.8)'
- 'unit (3.9)'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
python: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
40 changes: 0 additions & 40 deletions .kokoro/samples/python3.6/common.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/samples/python3.6/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.6/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/periodic.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/presubmit.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions .kokoro/test-samples-impl.sh
Expand Up @@ -33,7 +33,7 @@ export PYTHONUNBUFFERED=1
env | grep KOKORO

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.9 -m pip install --upgrade --quiet nox

# Use secrets acessor service account to get secrets
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
Expand Down Expand Up @@ -76,7 +76,7 @@ for file in samples/**/requirements.txt; do
echo "------------------------------------------------------------"

# Use nox to execute the tests for the project.
python3.6 -m nox -s "$RUN_TESTS_SESSION"
python3.9 -m nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# If this is a periodic build, send the test log to the FlakyBot.
Expand Down
3 changes: 2 additions & 1 deletion .repo-metadata.json
Expand Up @@ -13,5 +13,6 @@
"requires_billing": true,
"default_version": "v2",
"codeowner_team": "@googleapis/cdpe-cloudai",
"api_shortname": "dialogflow"
"api_shortname": "dialogflow",
"api_description": "is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. Dialogflow Enterprise Edition users have access to Google Cloud Support and a service level agreement (SLA) for production deployments."
}
6 changes: 2 additions & 4 deletions CONTRIBUTING.rst
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -221,13 +221,11 @@ Supported Python Versions

We support:

- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_

.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
Expand All @@ -239,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-dialogflow/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.6.
We also explicitly decided to support Python 3 beginning with version 3.7.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
121 changes: 66 additions & 55 deletions README.rst
@@ -1,92 +1,103 @@
Dialogflow: Python Client
=========================
Python Client for Dialogflow API
================================

|ga| |pypi| |versions|
|stable| |pypi| |versions|

Python idiomatic client for `Dialogflow ES`_
`Dialogflow API`_: is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. Dialogflow Enterprise Edition users have access to Google Cloud Support and a service level agreement (SLA) for production deployments.

`Dialogflow ES`_ is an enterprise-grade NLU platform that makes it easy for
developers to design and integrate conversational user interfaces into
mobile apps, web applications, devices, and bots.
- `Client Library Documentation`_
- `Product Documentation`_

* `Dialogflow ES Python Client API Reference <https://cloud.google.com/python/docs/reference/dialogflow/latest/index.html>`_
* `Dialogflow ES Documentation <https://cloud.google.com/dialogflow/es/docs>`_

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in
`Client Libraries Explained <https://cloud.google.com/apis/docs/client-libraries-explained>`_.

.. |ga| image:: https://img.shields.io/badge/support-ga-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#ga-support
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-dialogflow.svg
:target: https://pypi.org/project/google-cloud-dialogflow/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-dialogflow.svg
:target: https://pypi.org/project/google-cloud-dialogflow/
.. _Dialogflow ES: https://cloud.google.com/dialogflow/docs/
.. _Dialogflow API: https://www.dialogflow.com/
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/dialogflow/latest
.. _Product Documentation: https://www.dialogflow.com/

Quick Start
-----------

Before you begin
----------------
In order to use this library, you first need to go through the following steps:

#. Select or create a Cloud Platform `project`_.
#. `Enable billing`_ for your project.
#. `Enable the Google Cloud Dialogflow API`_.
#. `Set up authentication`_ with a service account so you can access the
API from your local workstation.

.. _project: https://console.cloud.google.com/project
.. _Enable billing: https://support.google.com/cloud/answer/6293499#enable-billing
.. _Enable the Google Cloud Dialogflow API: https://console.cloud.google.com/flows/enableapi?apiid=dialogflow.googleapis.com
.. _Set up authentication: https://cloud.google.com/docs/authentication/getting-started
1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Dialogflow API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Dialogflow API.: https://www.dialogflow.com/
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
------------
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

.. code-block:: shell
With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

pip install google-cloud-dialogflow
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/

.. note::

We highly recommend that you install this library in a
`virtualenv <https://virtualenv.pypa.io/en/latest/>`_.
Code samples and snippets
~~~~~~~~~~~~~~~~~~~~~~~~~

Code samples and snippets live in the `samples/` folder.


Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.6
Our client libraries are compatible with all current [active](https://devguide.python.org/devcycle/#in-development-main-branch) and [maintenance](https://devguide.python.org/devcycle/#maintenance-branches) versions of
Python.

Python >= 3.7

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The last version of this library compatible with Python 2.7 is dialogflow==1.1.0.

Python <= 3.6

Usage
-----
If you are using an [end-of-life](https://devguide.python.org/devcycle/#end-of-life-branches)
version of Python, we recommend that you update as soon as possible to an actively supported version.

View `usage documentation <https://cloud.google.com/python/docs/reference/dialogflow/latest/index.html>`_.

Mac/Linux
^^^^^^^^^

Versioning
----------
.. code-block:: console
This library follows `Semantic Versioning <http://semver.org/>`_.
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-dialogflow
This library is considered to be stable. This means and that the code surface will not change in backwards-incompatible
ways unless either absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation
period. Issues and requests against GA libraries are addressed with the highest priority.
More Information: `Google Cloud Python Library Support <https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability>`_
Windows
^^^^^^^

Contributing
------------
.. code-block:: console
Contributions welcome! See the `Contributing Guide <https://github.com/googleapis/python-dialogflow/blob/main/.github/CONTRIBUTING.md>`_.
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-dialogflow
License
-------
Next Steps
~~~~~~~~~~

Apache Version 2.0
- Read the `Client Library Documentation`_ for Dialogflow API
to see other available methods on the client.
- Read the `Dialogflow API Product documentation`_ to learn
more about the product and see How-to Guides.
- View this `README`_ to see the full list of Cloud
APIs that we cover.

See `the LICENSE file <https://github.com/googleapis/python-dialogflow/blob/main/LICENSE>`_ for more information.
.. _Dialogflow API Product documentation: https://www.dialogflow.com/
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst

0 comments on commit 912518b

Please sign in to comment.