Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix releases #373

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/abstractions/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

T = TypeVar("T")
U = TypeVar("U", bound=Parsable)
K = TypeVar("K", bound=Enum)


class SerializationWriter(ABC):
Expand Down Expand Up @@ -134,13 +135,13 @@ def write_collection_of_object_values(

@abstractmethod
def write_collection_of_enum_values(
self, key: Optional[str], values: Optional[List[Enum]]
self, key: Optional[str], values: Optional[List[K]]
) -> None:
"""Writes the specified collection of enum values to the stream with an optional given key.

Args:
key (Optional[str]): The key to be used for the written value. May be null.
values Optional[List[Enum]): The enum values to be written.
values Optional[List[K]): The enum values to be written.
"""
pass

Expand Down Expand Up @@ -170,12 +171,12 @@ def write_object_value(
pass

@abstractmethod
def write_enum_value(self, key: Optional[str], value: Optional[Enum]) -> None:
def write_enum_value(self, key: Optional[str], value: Optional[K]) -> None:
"""Writes the specified enum value to the stream with an optional given key.

Args:
key (Optional[str]): The key to be used for the written value. May be null.
value (Optional[Enum]): The enum value to be written.
value (Optional[K]): The enum value to be written.
"""
pass

Expand Down
3 changes: 2 additions & 1 deletion packages/abstractions/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_abstractions"}]
packages = [{include = "kiota_abstractions"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/authentication/azure/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
1 change: 1 addition & 0 deletions packages/authentication/azure/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_authentication_azure"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/http/httpx/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
3 changes: 2 additions & 1 deletion packages/http/httpx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_http"}]
packages = [{include = "kiota_http"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/serialization/form/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

T = TypeVar("T")
U = TypeVar("U", bound=Parsable)
K = TypeVar("K", bound=Enum)


class FormSerializationWriter(SerializationWriter):
Expand Down Expand Up @@ -139,24 +140,24 @@ def write_collection_of_primitive_values(
method(key, val)

def write_collection_of_enum_values(
self, key: Optional[str], values: Optional[List[Enum]]
self, key: Optional[str], values: Optional[List[K]]
) -> None:
"""Writes the specified collection of enum values to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
values Optional[List[Enum]): The enum values to be written.
values Optional[List[K]): The enum values to be written.
"""
if key and values:
if isinstance(values, list):
for val in values:
if isinstance(val, Enum):
self.write_str_value(key, str(val.value))

def write_enum_value(self, key: Optional[str], value: Optional[Enum]) -> None:
def write_enum_value(self, key: Optional[str], value: Optional[K]) -> None:
"""Writes the specified enum value to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
value (Optional[Enum]): The enum value to be written.
value (Optional[K]): The enum value to be written.
"""
if key and value:
if isinstance(value, Enum):
Expand Down
3 changes: 2 additions & 1 deletion packages/serialization/form/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_serialization_form"}]
packages = [{include = "kiota_serialization_form"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/serialization/json/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

T = TypeVar("T")
U = TypeVar("U", bound=Parsable)
K = TypeVar("K", bound=Enum)
PRIMITIVE_TYPES = [bool, str, int, float, UUID, datetime, timedelta, date, time, bytes, Enum]


Expand Down Expand Up @@ -234,12 +235,12 @@ def write_collection_of_object_values(
self.value = obj_list

def write_collection_of_enum_values(
self, key: Optional[str], values: Optional[List[Enum]]
self, key: Optional[str], values: Optional[List[K]]
) -> None:
"""Writes the specified collection of enum values to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
values (Optional[List[Enum]]): The enum values to be written.
values (Optional[List[K]]): The enum values to be written.
"""
if isinstance(values, list):
result = []
Expand Down Expand Up @@ -320,11 +321,11 @@ def write_object_value(
else:
self.value = temp_writer.writer

def write_enum_value(self, key: Optional[str], value: Optional[Enum]) -> None:
def write_enum_value(self, key: Optional[str], value: Optional[K]) -> None:
"""Writes the specified enum value to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
value (Optional[Enum]): The enum value to be written.
value (Optional[K]): The enum value to be written.
"""
if isinstance(value, Enum):
if key:
Expand Down
3 changes: 2 additions & 1 deletion packages/serialization/json/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_serialization_json"}]
packages = [{include = "kiota_serialization_json"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/serialization/multipart/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

T = TypeVar("T")
U = TypeVar("U", bound=Parsable)
K = TypeVar("K", bound=Enum)


class MultipartSerializationWriter(SerializationWriter):
Expand Down Expand Up @@ -130,16 +131,16 @@ def write_collection_of_primitive_values(
raise NotImplementedError()

def write_collection_of_enum_values(
self, key: Optional[str], values: Optional[List[Enum]]
self, key: Optional[str], values: Optional[List[K]]
) -> None:
"""Writes the specified collection of enum values to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
values Optional[List[Enum]): The enum values to be written.
values Optional[List[K]): The enum values to be written.
"""
raise NotImplementedError()

def write_enum_value(self, key: Optional[str], value: Optional[Enum]) -> None:
def write_enum_value(self, key: Optional[str], value: Optional[K]) -> None:
"""Writes the specified enum value to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
Expand Down
3 changes: 2 additions & 1 deletion packages/serialization/multipart/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_serialization_multipart"}]
packages = [{include = "kiota_serialization_multipart"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/serialization/text/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

T = TypeVar("T")
U = TypeVar("U", bound=Parsable)
K = TypeVar("K", bound=Enum)


class TextSerializationWriter(SerializationWriter):
Expand Down Expand Up @@ -134,12 +135,12 @@ def write_collection_of_object_values(
raise Exception(self.NO_STRUCTURED_DATA_MESSAGE)

def write_collection_of_enum_values(
self, key: Optional[str], values: Optional[List[Enum]]
self, key: Optional[str], values: Optional[List[K]]
) -> None:
"""Writes the specified collection of enum values to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
values Optional[List[Enum]): The enum values to be written.
values Optional[List[K]): The enum values to be written.
"""
raise Exception(self.NO_STRUCTURED_DATA_MESSAGE)

Expand Down Expand Up @@ -169,11 +170,11 @@ def write_object_value(
"""
raise Exception(self.NO_STRUCTURED_DATA_MESSAGE)

def write_enum_value(self, key: Optional[str], value: Optional[Enum]) -> None:
def write_enum_value(self, key: Optional[str], value: Optional[K]) -> None:
"""Writes the specified enum value to the stream with an optional given key.
Args:
key (Optional[str]): The key to be used for the written value. May be null.
value (Optional[Enum]): The enum value to be written.
value (Optional[K]): The enum value to be written.
"""
if value:
self.write_str_value(key, str(value.value))
Expand Down
3 changes: 2 additions & 1 deletion packages/serialization/text/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ classifiers = [
homepage = "https://github.com/microsoft/kiota#readme"
repository = "https://github.com/microsoft/kiota-python"
documentation = "https://microsoft.github.io/kiota/"
packages = [{include = "kiota_serialization_text"}]
packages = [{include = "kiota_serialization_text"}]
include = ["CHANGELOG.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
Expand Down
Loading
Loading