Skip to content

Commit b47b2cf

Browse files
committed
[Python APIView] vendor azure-core
1 parent 2d94e27 commit b47b2cf

File tree

9 files changed

+54
-8
lines changed

9 files changed

+54
-8
lines changed

packages/python-packages/apiview-stub-generator/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Release History
22

3+
## Version 0.3.17 (Unreleased)
4+
Fixed issue with azure-core dependency conflict when running the stub generator on azure-core by moving necessary core files into an internal vendor folder.
5+
36
## Version 0.3.16 (2025-03-03)
47
Fixed emty package name issue when running parser against pacakge source path instead of wheel. PKG_INFO is not available in this case.
58

packages/python-packages/apiview-stub-generator/apistub/_stub_generator.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ def _find_modules(self, pkg_root_path):
239239
# For e.g. _generated, _shared etc
240240
# Ignore build, which is created when installing a package from source.
241241
# Ignore tests, which may have an __init__.py but is not part of the package.
242-
dirs_to_skip = [
243-
x for x in subdirs if x.startswith("_") or x.startswith(".") or x == "tests" or x == "build"
244-
]
242+
dirs_to_skip = [x for x in subdirs if x.startswith(("_", ".", "test", "build"))]
245243
for d in dirs_to_skip:
246244
subdirs.remove(d)
247245

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# --------------------------------------------------------------------------
2+
#
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
#
5+
# The MIT License (MIT)
6+
#
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the ""Software""), to
9+
# deal in the Software without restriction, including without limitation the
10+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11+
# sell copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in
15+
# all copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23+
# IN THE SOFTWARE.
24+
#
25+
# --------------------------------------------------------------------------
26+
27+
from ._version import VERSION
28+
29+
__version__ = VERSION
30+
31+
from ._enum_meta import CaseInsensitiveEnumMeta
32+
33+
__all__ = [
34+
"CaseInsensitiveEnumMeta",
35+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
VERSION = "1.32.0"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
VERSION = "0.3.16"
4+
VERSION = "0.3.17"

packages/python-packages/apiview-stub-generator/apiview_reqs.txt

-3
This file was deleted.

packages/python-packages/apiview-stub-generator/setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"charset-normalizer",
3232
"pylint",
3333
"azure-pylint-guidelines-checker",
34-
"azure-core<2.0.0,>=1.28.0",
3534
"isodate>=0.6.1",
3635
"typing-extensions>=4.6.0",
3736
"pkginfo"

packages/python-packages/apiview-stub-generator/tests/apiview_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import tempfile
1010
import shutil
1111
from subprocess import check_call, run, PIPE
12+
import pytest
1213
from pytest import fail, mark
1314

1415
from apistub import ApiView, TokenKind, StubGenerator

0 commit comments

Comments
 (0)