Skip to content

Commit 3c94944

Browse files
author
Rakshith Bhyravabhotla
authored
Remove py2 support from EG (#22430)
* Remove py2 support from EG * dev req * changes * Apply suggestions from code review
1 parent 4fc9276 commit 3c94944

File tree

5 files changed

+7
-26
lines changed

5 files changed

+7
-26
lines changed

sdk/eventgrid/azure-eventgrid/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 4.7.2 (Unreleased)
44

5+
- This version and all future versions will require Python 3.6+. Python 2.7 is no longer supported.
6+
57
### Features Added
68

79
### Breaking Changes

sdk/eventgrid/azure-eventgrid/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Azure Event Grid is a fully-managed intelligent event routing service that allow
66

77
## _Disclaimer_
88

9-
_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
9+
_Azure SDK Python packages support for Python 2.7 has ended on 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

1111
## Getting started
1212

1313
### Prerequisites
14-
* Python 2.7, or 3.6 or later is required to use this package.
14+
* Python 3.6 or later is required to use this package.
1515
* You must have an [Azure subscription][azure_subscription] and an Event Grid Topic resource to use this package. Follow this [step-by-step tutorial](https://docs.microsoft.com/azure/event-grid/custom-event-quickstart-portal) to register the Event Grid resource provider and create Event Grid topics using the [Azure portal](https://portal.azure.com/). There is a [similar tutorial](https://docs.microsoft.com/azure/event-grid/custom-event-quickstart) using [Azure CLI](https://docs.microsoft.com/cli/azure).
1616

1717

sdk/eventgrid/azure-eventgrid/dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
-e ../azure-mgmt-eventgrid
66
azure-storage-queue
77
cloudevents<=2.0.0; python_version >= "3.6"
8-
aiohttp>=3.0; python_version >= '3.5'
8+
aiohttp>=3.0

sdk/eventgrid/azure-eventgrid/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

sdk/eventgrid/azure-eventgrid/setup.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@
2020
# a-b-c => a.b.c
2121
namespace_name = PACKAGE_NAME.replace('-', '.')
2222

23-
# azure v0.x is not compatible with this package
24-
# azure v0.x used to have a __version__ attribute (newer versions don't)
25-
try:
26-
import azure
27-
try:
28-
ver = azure.__version__
29-
raise Exception(
30-
'This package is incompatible with azure=={}. '.format(ver) +
31-
'Uninstall it with "pip uninstall azure".'
32-
)
33-
except AttributeError:
34-
pass
35-
except ImportError:
36-
pass
37-
3823
# Version extraction inspired from 'requests'
3924
with open(os.path.join(package_folder_path, 'version.py')
4025
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
@@ -64,16 +49,15 @@
6449
classifiers=[
6550
"Development Status :: 5 - Production/Stable",
6651
'Programming Language :: Python',
67-
'Programming Language :: Python :: 2',
68-
'Programming Language :: Python :: 2.7',
69-
'Programming Language :: Python :: 3',
52+
'Programming Language :: Python :: 3 :: Only',
7053
'Programming Language :: Python :: 3.6',
7154
'Programming Language :: Python :: 3.7',
7255
'Programming Language :: Python :: 3.8',
7356
'Programming Language :: Python :: 3.9',
7457
'Programming Language :: Python :: 3.10',
7558
'License :: OSI Approved :: MIT License',
7659
],
60+
python_requires=">=3.6",
7761
zip_safe=False,
7862
packages=find_packages(exclude=[
7963
'tests',
@@ -85,7 +69,4 @@
8569
'msrest>=0.6.21',
8670
'azure-core<2.0.0,>=1.18.0',
8771
],
88-
extras_require={
89-
":python_version<'3.0'": ['azure-nspkg'],
90-
}
9172
)

0 commit comments

Comments
 (0)