Skip to content

Commit 1e2a86d

Browse files
[formrecognizer] Update to use Python 3 only (Azure#22227)
* python 3 update * update changelog
1 parent 7445fbc commit 1e2a86d

File tree

6 files changed

+8
-29
lines changed

6 files changed

+8
-29
lines changed

sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Bugs Fixed
1010

1111
### Other Changes
12+
- Python 2.7 and 3.6 are no longer supported in this release. Please use Python 3.7 or later.
1213

1314
## 3.2.0b2 (2021-11-09)
1415

sdk/formrecognizer/azure-ai-formrecognizer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Azure Cognitive Services Form Recognizer is a cloud service that uses machine le
1111

1212
## _Disclaimer_
1313

14-
_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_
14+
_Azure SDK Python packages support for Python 2.7 ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1515

1616
## Getting started
1717

1818
### Prerequisites
19-
* Python 2.7, or 3.6 or later is required to use this package.
19+
* Python 3.7 or later is required to use this package.
2020
* You must have an [Azure subscription][azure_subscription] and a
2121
[Cognitive Services or Form Recognizer resource][FR_or_CS_resource] to use this package.
2222

sdk/formrecognizer/azure-ai-formrecognizer/dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
-e ../../cognitiveservices/azure-mgmt-cognitiveservices
44
../../core/azure-core
55
-e ../../identity/azure-identity
6-
aiohttp>=3.0; python_version >= '3.6'
6+
aiohttp>=3.0; python_version >= '3.7'

sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ All of these samples need the endpoint to your Form Recognizer resource ([instru
7171
Please see the samples [here][v3.0.0-samples-tag].
7272

7373
## Prerequisites
74-
* Python 2.7, or 3.6 or later is required to use this package (3.6 or later if using asyncio)
74+
* Python 3.7 or later is required to use this package
7575
* You must have an [Azure subscription][azure_subscription] and an
7676
[Azure Form Recognizer account][azure_form_recognizer_account] to run these samples.
7777

sdk/formrecognizer/azure-ai-formrecognizer/setup.cfg

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

sdk/formrecognizer/azure-ai-formrecognizer/setup.py

Lines changed: 3 additions & 23 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'), 'r') as fd:
4025
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
@@ -62,10 +47,8 @@
6247
classifiers=[
6348
"Development Status :: 4 - Beta",
6449
'Programming Language :: Python',
65-
'Programming Language :: Python :: 2',
66-
'Programming Language :: Python :: 2.7',
50+
'Programming Language :: Python :: 3 :: Only',
6751
'Programming Language :: Python :: 3',
68-
'Programming Language :: Python :: 3.6',
6952
'Programming Language :: Python :: 3.7',
7053
'Programming Language :: Python :: 3.8',
7154
'Programming Language :: Python :: 3.9',
@@ -79,14 +62,11 @@
7962
'azure',
8063
'azure.ai',
8164
]),
65+
python_requires=">=3.7",
8266
install_requires=[
8367
"azure-core<2.0.0,>=1.13.0",
8468
"msrest>=0.6.21",
8569
'six>=1.11.0',
8670
'azure-common~=1.1',
87-
],
88-
extras_require={
89-
":python_version<'3.0'": ['azure-ai-nspkg'],
90-
":python_version<'3.5'": ['typing'],
91-
}
71+
]
9272
)

0 commit comments

Comments
 (0)