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

Commit

Permalink
Merge pull request #68 from annatisch/develop
Browse files Browse the repository at this point in the history
Python 2.7 support
  • Loading branch information
annatisch authored Oct 1, 2018
2 parents 3e3c569 + 2a97956 commit 6c33ceb
Show file tree
Hide file tree
Showing 69 changed files with 4,257 additions and 1,560 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ pip-delete-this-directory.txt
azure/storage/
azure/common/
azure/profiles/
*.log.1
*.log.2
*.log.3

htmlcov/
.tox/
Expand Down Expand Up @@ -105,3 +108,10 @@ ENV/
.mypy_cache/
.pytest_cache/v/cache/lastfailed
.pytest_cache/v/cache/nodeids

# EventHub
azure/mgmt/
azure/common/
azure/profiles/
azure/servicebus/
features/steps/mgmt_settings_real.py
47 changes: 39 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
language: python
cache: pip
python:
- "3.6"
# command to install dependencies
dist: xenial
sudo: required
matrix:
include:
- os: linux
python: "2.7"
dist: trusty
script:
- pytest
- python ./setup.py check -r -s
- pylint --ignore=async_ops azure.eventhub
- os: linux
python: "3.4"
dist: trusty
script:
- pytest
- python ./setup.py check -r -s
- pylint --ignore=async_ops azure.eventhub
- os: linux
python: "3.5"
script:
- pytest
- python ./setup.py check -r -s
- pylint azure.eventhub
- pylint azure.eventprocessorhost
- os: linux
python: "3.6"
script:
- pytest
- python ./setup.py check -r -s
- pylint azure.eventhub
- pylint azure.eventprocessorhost
- os: linux
python: "3.7"
script:
- pytest
- python ./setup.py check -r -s
- pylint azure.eventhub
- pylint azure.eventprocessorhost
install:
- pip install -r dev_requirements.txt
- pip install -e .
script:
- pytest
- python ./setup.py check -r -s
- pylint azure.eventhub
- pylint azure.eventprocessorhost
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.pythonPath": "${workspaceFolder}/env36/bin/python",
"python.linting.enabled": false
}
77 changes: 77 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,83 @@
Release History
===============

1.2.0 (release-candidate)
+++++++++++++++++++++++++

- Support for Python 2.7 in azure.eventhub module (azure.eventprocessorhost will not support Python 2.7).


1.1.0 (2018-09-21)
++++++++++++++++++

- Changes to `AzureStorageCheckpointLeaseManager` parameters to support other connection options (issue #61):

- The `storage_account_name`, `storage_account_key` and `lease_container_name` arguments are now optional keyword arguments.
- Added a `sas_token` argument that must be specified with `storage_account_name` in place of `storage_account_key`.
- Added an `endpoint_suffix` argument to support storage endpoints in National Clouds.
- Added a `connection_string` argument that, if specified, overrides all other endpoint arguments.
- The `lease_container_name` argument now defaults to `"eph-leases"` if not specified.

- Fix for clients failing to start if run called multipled times (issue #64).
- Added convenience methods `body_as_str` and `body_as_json` to EventData object for easier processing of message data.


1.0.0 (2018-08-22)
++++++++++++++++++

- API stable.
- Renamed internal `_async` module to `async_ops` for docs generation.
- Added optional `auth_timeout` parameter to `EventHubClient` and `EventHubClientAsync` to configure how long to allow for token
negotiation to complete. Default is 60 seconds.
- Added optional `send_timeout` parameter to `EventHubClient.add_sender` and `EventHubClientAsync.add_async_sender` to determine the
timeout for Events to be successfully sent. Default value is 60 seconds.
- Reformatted logging for performance.


0.2.0 (2018-08-06)
++++++++++++++++++

- Stability improvements for EPH.
- Updated uAMQP version.
- Added new configuration options for Sender and Receiver; `keep_alive` and `auto_reconnect`.
These flags have been added to the following:

- `EventHubClient.add_receiver`
- `EventHubClient.add_sender`
- `EventHubClientAsync.add_async_receiver`
- `EventHubClientAsync.add_async_sender`
- `EPHOptions.keey_alive_interval`
- `EPHOptions.auto_reconnect_on_error`


0.2.0rc2 (2018-07-29)
+++++++++++++++++++++

- **Breaking change** `EventData.offset` will now return an object of type `~uamqp.common.Offset` rather than str.
The original string value can be retrieved from `~uamqp.common.Offset.value`.
- Each sender/receiver will now run in its own independent connection.
- Updated uAMQP dependency to 0.2.0
- Fixed issue with IoTHub clients not being able to retrieve partition information.
- Added support for HTTP proxy settings to both EventHubClient and EPH.
- Added error handling policy to automatically reconnect on retryable error.
- Added keep-alive thread for maintaining an unused connection.


0.2.0rc1 (2018-07-06)
+++++++++++++++++++++

- **Breaking change** Restructured library to support Python 3.7. Submodule `async` has been renamed and all classes from
this module can now be imported from azure.eventhub directly.
- **Breaking change** Removed optional `callback` argument from `Receiver.receive` and `AsyncReceiver.receive`.
- **Breaking change** `EventData.properties` has been renamed to `EventData.application_properties`.
This removes the potential for messages to be processed via callback for not yet returned
in the batch.
- Updated uAMQP dependency to v0.1.0
- Added support for constructing IoTHub connections.
- Fixed memory leak in receive operations.
- Dropped Python 2.7 wheel support.


0.2.0b2 (2018-05-29)
++++++++++++++++++++

Expand Down
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Microsoft Azure SDK for Event Hubs
==================================

.. image:: https://img.shields.io/pypi/v/azure-eventhub.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/azure-eventhub/

.. image:: https://img.shields.io/pypi/pyversions/azure-eventhub.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/azure-eventhub/

.. image:: https://travis-ci.org/Azure/azure-event-hubs-python.svg?branch=master
:target: https://travis-ci.org/Azure/azure-event-hubs-python


A Python AMQP client for Azure Event Hubs the provides:

- A sender to publish events to the Event Hubs service.
Expand All @@ -21,6 +31,15 @@ Wheels are provided for all major operating systems, so you can install directly
$ pip install azure-eventhub
Python 2.7 support
++++++++++++++++++
The uAMQP library currently only supports Python 3.4 and above. Python 2.7 support is planned for a future release.


Documentation
+++++++++++++
Reference documentation is available at `docs.microsoft.com/python/api/azure-eventhub <https://docs.microsoft.com/python/api/azure-eventhub>`__.


Examples
+++++++++
Expand Down
2 changes: 1 addition & 1 deletion azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Loading

0 comments on commit 6c33ceb

Please sign in to comment.