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

Commit 6c33ceb

Browse files
authored
Merge pull request #68 from annatisch/develop
Python 2.7 support
2 parents 3e3c569 + 2a97956 commit 6c33ceb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4257
-1560
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ pip-delete-this-directory.txt
3939
azure/storage/
4040
azure/common/
4141
azure/profiles/
42+
*.log.1
43+
*.log.2
44+
*.log.3
4245

4346
htmlcov/
4447
.tox/
@@ -105,3 +108,10 @@ ENV/
105108
.mypy_cache/
106109
.pytest_cache/v/cache/lastfailed
107110
.pytest_cache/v/cache/nodeids
111+
112+
# EventHub
113+
azure/mgmt/
114+
azure/common/
115+
azure/profiles/
116+
azure/servicebus/
117+
features/steps/mgmt_settings_real.py

.travis.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
11
language: python
22
cache: pip
3-
python:
4-
- "3.6"
5-
# command to install dependencies
3+
dist: xenial
4+
sudo: required
5+
matrix:
6+
include:
7+
- os: linux
8+
python: "2.7"
9+
dist: trusty
10+
script:
11+
- pytest
12+
- python ./setup.py check -r -s
13+
- pylint --ignore=async_ops azure.eventhub
14+
- os: linux
15+
python: "3.4"
16+
dist: trusty
17+
script:
18+
- pytest
19+
- python ./setup.py check -r -s
20+
- pylint --ignore=async_ops azure.eventhub
21+
- os: linux
22+
python: "3.5"
23+
script:
24+
- pytest
25+
- python ./setup.py check -r -s
26+
- pylint azure.eventhub
27+
- pylint azure.eventprocessorhost
28+
- os: linux
29+
python: "3.6"
30+
script:
31+
- pytest
32+
- python ./setup.py check -r -s
33+
- pylint azure.eventhub
34+
- pylint azure.eventprocessorhost
35+
- os: linux
36+
python: "3.7"
37+
script:
38+
- pytest
39+
- python ./setup.py check -r -s
40+
- pylint azure.eventhub
41+
- pylint azure.eventprocessorhost
642
install:
743
- pip install -r dev_requirements.txt
844
- pip install -e .
9-
script:
10-
- pytest
11-
- python ./setup.py check -r -s
12-
- pylint azure.eventhub
13-
- pylint azure.eventprocessorhost

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python.pythonPath": "${workspaceFolder}/env36/bin/python",
3+
"python.linting.enabled": false
4+
}

HISTORY.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,83 @@
33
Release History
44
===============
55

6+
1.2.0 (release-candidate)
7+
+++++++++++++++++++++++++
8+
9+
- Support for Python 2.7 in azure.eventhub module (azure.eventprocessorhost will not support Python 2.7).
10+
11+
12+
1.1.0 (2018-09-21)
13+
++++++++++++++++++
14+
15+
- Changes to `AzureStorageCheckpointLeaseManager` parameters to support other connection options (issue #61):
16+
17+
- The `storage_account_name`, `storage_account_key` and `lease_container_name` arguments are now optional keyword arguments.
18+
- Added a `sas_token` argument that must be specified with `storage_account_name` in place of `storage_account_key`.
19+
- Added an `endpoint_suffix` argument to support storage endpoints in National Clouds.
20+
- Added a `connection_string` argument that, if specified, overrides all other endpoint arguments.
21+
- The `lease_container_name` argument now defaults to `"eph-leases"` if not specified.
22+
23+
- Fix for clients failing to start if run called multipled times (issue #64).
24+
- Added convenience methods `body_as_str` and `body_as_json` to EventData object for easier processing of message data.
25+
26+
27+
1.0.0 (2018-08-22)
28+
++++++++++++++++++
29+
30+
- API stable.
31+
- Renamed internal `_async` module to `async_ops` for docs generation.
32+
- Added optional `auth_timeout` parameter to `EventHubClient` and `EventHubClientAsync` to configure how long to allow for token
33+
negotiation to complete. Default is 60 seconds.
34+
- Added optional `send_timeout` parameter to `EventHubClient.add_sender` and `EventHubClientAsync.add_async_sender` to determine the
35+
timeout for Events to be successfully sent. Default value is 60 seconds.
36+
- Reformatted logging for performance.
37+
38+
39+
0.2.0 (2018-08-06)
40+
++++++++++++++++++
41+
42+
- Stability improvements for EPH.
43+
- Updated uAMQP version.
44+
- Added new configuration options for Sender and Receiver; `keep_alive` and `auto_reconnect`.
45+
These flags have been added to the following:
46+
47+
- `EventHubClient.add_receiver`
48+
- `EventHubClient.add_sender`
49+
- `EventHubClientAsync.add_async_receiver`
50+
- `EventHubClientAsync.add_async_sender`
51+
- `EPHOptions.keey_alive_interval`
52+
- `EPHOptions.auto_reconnect_on_error`
53+
54+
55+
0.2.0rc2 (2018-07-29)
56+
+++++++++++++++++++++
57+
58+
- **Breaking change** `EventData.offset` will now return an object of type `~uamqp.common.Offset` rather than str.
59+
The original string value can be retrieved from `~uamqp.common.Offset.value`.
60+
- Each sender/receiver will now run in its own independent connection.
61+
- Updated uAMQP dependency to 0.2.0
62+
- Fixed issue with IoTHub clients not being able to retrieve partition information.
63+
- Added support for HTTP proxy settings to both EventHubClient and EPH.
64+
- Added error handling policy to automatically reconnect on retryable error.
65+
- Added keep-alive thread for maintaining an unused connection.
66+
67+
68+
0.2.0rc1 (2018-07-06)
69+
+++++++++++++++++++++
70+
71+
- **Breaking change** Restructured library to support Python 3.7. Submodule `async` has been renamed and all classes from
72+
this module can now be imported from azure.eventhub directly.
73+
- **Breaking change** Removed optional `callback` argument from `Receiver.receive` and `AsyncReceiver.receive`.
74+
- **Breaking change** `EventData.properties` has been renamed to `EventData.application_properties`.
75+
This removes the potential for messages to be processed via callback for not yet returned
76+
in the batch.
77+
- Updated uAMQP dependency to v0.1.0
78+
- Added support for constructing IoTHub connections.
79+
- Fixed memory leak in receive operations.
80+
- Dropped Python 2.7 wheel support.
81+
82+
683
0.2.0b2 (2018-05-29)
784
++++++++++++++++++++
885

README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Microsoft Azure SDK for Event Hubs
22
==================================
33

4+
.. image:: https://img.shields.io/pypi/v/azure-eventhub.svg?maxAge=2592000
5+
:target: https://pypi.python.org/pypi/azure-eventhub/
6+
7+
.. image:: https://img.shields.io/pypi/pyversions/azure-eventhub.svg?maxAge=2592000
8+
:target: https://pypi.python.org/pypi/azure-eventhub/
9+
10+
.. image:: https://travis-ci.org/Azure/azure-event-hubs-python.svg?branch=master
11+
:target: https://travis-ci.org/Azure/azure-event-hubs-python
12+
13+
414
A Python AMQP client for Azure Event Hubs the provides:
515

616
- A sender to publish events to the Event Hubs service.
@@ -21,6 +31,15 @@ Wheels are provided for all major operating systems, so you can install directly
2131
2232
$ pip install azure-eventhub
2333
34+
Python 2.7 support
35+
++++++++++++++++++
36+
The uAMQP library currently only supports Python 3.4 and above. Python 2.7 support is planned for a future release.
37+
38+
39+
Documentation
40+
+++++++++++++
41+
Reference documentation is available at `docs.microsoft.com/python/api/azure-eventhub <https://docs.microsoft.com/python/api/azure-eventhub>`__.
42+
2443

2544
Examples
2645
+++++++++

azure/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
__import__('pkg_resources').declare_namespace(__name__)
2+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

0 commit comments

Comments
 (0)