Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-azure-core for
openSUSE:Factory checked in at 2023-10-22 21:02:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-core (Old)
and /work/SRC/openSUSE:Factory/.python-azure-core.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-azure-core"
Sun Oct 22 21:02:38 2023 rev:44 rq:1119440 version:1.29.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-azure-core/python-azure-core.changes
2023-09-15 22:11:26.049918928 +0200
+++
/work/SRC/openSUSE:Factory/.python-azure-core.new.1945/python-azure-core.changes
2023-10-22 21:02:57.171674834 +0200
@@ -1,0 +2,8 @@
+Fri Oct 20 09:14:39 UTC 2023 - John Paul Adrian Glaubitz
<[email protected]>
+
+- New upstream release
+ + Version 1.29.5
+ + For detailed information about changes see the
+ CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------
Old:
----
azure-core-1.29.4.tar.gz
New:
----
azure-core-1.29.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-azure-core.spec ++++++
--- /var/tmp/diff_new_pack.90xnIp/_old 2023-10-22 21:02:57.611690834 +0200
+++ /var/tmp/diff_new_pack.90xnIp/_new 2023-10-22 21:02:57.611690834 +0200
@@ -21,7 +21,7 @@
%define skip_python2 1
%endif
Name: python-azure-core
-Version: 1.29.4
+Version: 1.29.5
Release: 0
Summary: Microsoft Azure Core Library for Python
License: MIT
++++++ azure-core-1.29.4.tar.gz -> azure-core-1.29.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/CHANGELOG.md
new/azure-core-1.29.5/CHANGELOG.md
--- old/azure-core-1.29.4/CHANGELOG.md 2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/CHANGELOG.md 2023-10-20 03:28:48.000000000 +0200
@@ -1,5 +1,15 @@
# Release History
+## 1.29.5 (2023-10-19)
+
+### Bugs Fixed
+
+- Fixed an issue with `multipart/form-data` in the async transport where
`data` was not getting encoded into the request body. #32473
+
+### Other Changes
+
+- Use ssl context from aiohttp by default.
+
## 1.29.4 (2023-09-07)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/PKG-INFO
new/azure-core-1.29.5/PKG-INFO
--- old/azure-core-1.29.4/PKG-INFO 2023-09-07 19:38:17.038747800 +0200
+++ new/azure-core-1.29.5/PKG-INFO 2023-10-20 03:29:34.008916900 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: azure-core
-Version: 1.29.4
+Version: 1.29.5
Summary: Microsoft Azure Core Library for Python
Home-page:
https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core
Author: Microsoft Corporation
@@ -287,6 +287,16 @@
# Release History
+## 1.29.5 (2023-10-19)
+
+### Bugs Fixed
+
+- Fixed an issue with `multipart/form-data` in the async transport where
`data` was not getting encoded into the request body. #32473
+
+### Other Changes
+
+- Use ssl context from aiohttp by default.
+
## 1.29.4 (2023-09-07)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/azure/core/_version.py
new/azure-core-1.29.5/azure/core/_version.py
--- old/azure-core-1.29.4/azure/core/_version.py 2023-09-07
19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/_version.py 2023-10-20
03:28:48.000000000 +0200
@@ -9,4 +9,4 @@
# regenerated.
# --------------------------------------------------------------------------
-VERSION = "1.29.4"
+VERSION = "1.29.5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/azure/core/exceptions.py
new/azure-core-1.29.5/azure/core/exceptions.py
--- old/azure-core-1.29.4/azure/core/exceptions.py 2023-09-07
19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/exceptions.py 2023-10-20
03:28:48.000000000 +0200
@@ -172,25 +172,29 @@
Example of JSON:
- error: {
- "code": "ValidationError",
- "message": "One or more fields contain incorrect values: ",
- "details": [
- {
- "code": "ValidationError",
- "target": "representation",
- "message": "Parsing error(s): String '' does not match regex
pattern '^[^{}/ :]+(?: :\\\\d+)?$'.
- Path 'host', line 1, position 297."
- },
- {
+ .. code-block:: json
+
+ {
+ "error": {
"code": "ValidationError",
- "target": "representation",
- "message": "Parsing error(s): The input OpenAPI file is not
valid for the OpenAPI specificate
- https:
//github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
- (schema
https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
+ "message": "One or more fields contain incorrect values: ",
+ "details": [
+ {
+ "code": "ValidationError",
+ "target": "representation",
+ "message": "Parsing error(s): String '' does not match
regex pattern '^[^{}/ :]+(?: :\\\\d+)?$'.
+ Path 'host', line 1, position 297."
+ },
+ {
+ "code": "ValidationError",
+ "target": "representation",
+ "message": "Parsing error(s): The input OpenAPI file
is not valid for the OpenAPI specificate
+ https:
//github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
+ (schema
https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
+ }
+ ]
}
- ]
- }
+ }
:param dict json_object: A Python dict representing a ODataV4 JSON
:ivar str ~.code: Its value is a service-defined error code.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/azure/core/messaging.py
new/azure-core-1.29.5/azure/core/messaging.py
--- old/azure-core-1.29.4/azure/core/messaging.py 2023-09-07
19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/messaging.py 2023-10-20
03:28:48.000000000 +0200
@@ -216,8 +216,8 @@
@classmethod
def from_json(cls, event: Any) -> CloudEvent[DataType]:
- """
- Returns the deserialized CloudEvent object when a json payload is
provided.
+ """Returns the deserialized CloudEvent object when a json payload is
provided.
+
:param event: The json string that should be converted into a
CloudEvent. This can also be
a storage QueueMessage, eventhub's EventData or ServiceBusMessage
:type event: object
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/azure/core/pipeline/policies/_base.py
new/azure-core-1.29.5/azure/core/pipeline/policies/_base.py
--- old/azure-core-1.29.4/azure/core/pipeline/policies/_base.py 2023-09-07
19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/pipeline/policies/_base.py 2023-10-20
03:28:48.000000000 +0200
@@ -110,14 +110,6 @@
:param request: The Pipeline request object
:type request: ~azure.core.pipeline.PipelineRequest
-
- .. admonition:: Example:
-
- .. literalinclude:: ../samples/test_example_sansio.py
- :start-after: [START on_exception]
- :end-before: [END on_exception]
- :language: python
- :dedent: 4
"""
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/azure/core/pipeline/transport/_aiohttp.py
new/azure-core-1.29.5/azure/core/pipeline/transport/_aiohttp.py
--- old/azure-core-1.29.4/azure/core/pipeline/transport/_aiohttp.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/pipeline/transport/_aiohttp.py
2023-10-20 03:28:48.000000000 +0200
@@ -25,7 +25,16 @@
# --------------------------------------------------------------------------
from __future__ import annotations
import sys
-from typing import Any, Optional, AsyncIterator as AsyncIteratorType,
TYPE_CHECKING, overload, cast, Union, Type
+from typing import (
+ Any,
+ Optional,
+ AsyncIterator as AsyncIteratorType,
+ TYPE_CHECKING,
+ overload,
+ cast,
+ Union,
+ Type,
+)
from types import TracebackType
from collections.abc import AsyncIterator
@@ -86,7 +95,12 @@
"""
def __init__(
- self, *, session: Optional[aiohttp.ClientSession] = None, loop=None,
session_owner: bool = True, **kwargs
+ self,
+ *,
+ session: Optional[aiohttp.ClientSession] = None,
+ loop=None,
+ session_owner: bool = True,
+ **kwargs,
):
if loop and sys.version_info >= (3, 10):
raise ValueError("Starting with Python 3.10, asyncio doesnât
support loop as a parameter anymore")
@@ -164,7 +178,7 @@
:return: The request data
"""
if request.files:
- form_data = aiohttp.FormData()
+ form_data = aiohttp.FormData(request.data or {})
for form_file, data in request.files.items():
content_type = data[2] if len(data) > 2 else None
try:
@@ -246,10 +260,13 @@
break
response: Optional[Union[AsyncHttpResponse, RestAsyncHttpResponse]] =
None
- config["ssl"] = self._build_ssl_config(
+ ssl = self._build_ssl_config(
cert=config.pop("connection_cert", self.connection_config.cert),
verify=config.pop("connection_verify",
self.connection_config.verify),
)
+ # If ssl=True, we just use default ssl context from aiohttp
+ if ssl is not True:
+ config["ssl"] = ssl
# If we know for sure there is not body, disable "auto content type"
# Otherwise, aiohttp will send "application/octet-stream" even for
empty POST request
# and that break services like storage signature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/azure/core/tracing/_abstract_span.py
new/azure-core-1.29.5/azure/core/tracing/_abstract_span.py
--- old/azure-core-1.29.4/azure/core/tracing/_abstract_span.py 2023-09-07
19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/azure/core/tracing/_abstract_span.py 2023-10-20
03:28:48.000000000 +0200
@@ -144,7 +144,7 @@
Add correct attributes for a http client span.
:param request: The request made
- :type request: HttpRequest
+ :type request: azure.core.rest.HttpRequest
:param response: The response received by the server. Is None if no
response received.
:type response: ~azure.core.pipeline.transport.HttpResponse or
~azure.core.pipeline.transport.AsyncHttpResponse
"""
@@ -268,7 +268,7 @@
Add correct attributes for a http client span.
:param request: The request made
- :type request: HttpRequest
+ :type request: azure.core.rest.HttpRequest
:param response: The response received from the server. Is None if no
response received.
:type response: ~azure.core.pipeline.transport.HttpResponse or
~azure.core.pipeline.transport.AsyncHttpResponse
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/azure_core.egg-info/PKG-INFO
new/azure-core-1.29.5/azure_core.egg-info/PKG-INFO
--- old/azure-core-1.29.4/azure_core.egg-info/PKG-INFO 2023-09-07
19:38:16.000000000 +0200
+++ new/azure-core-1.29.5/azure_core.egg-info/PKG-INFO 2023-10-20
03:29:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: azure-core
-Version: 1.29.4
+Version: 1.29.5
Summary: Microsoft Azure Core Library for Python
Home-page:
https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core
Author: Microsoft Corporation
@@ -287,6 +287,16 @@
# Release History
+## 1.29.5 (2023-10-19)
+
+### Bugs Fixed
+
+- Fixed an issue with `multipart/form-data` in the async transport where
`data` was not getting encoded into the request body. #32473
+
+### Other Changes
+
+- Use ssl context from aiohttp by default.
+
## 1.29.4 (2023-09-07)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/azure_core.egg-info/SOURCES.txt
new/azure-core-1.29.5/azure_core.egg-info/SOURCES.txt
--- old/azure-core-1.29.4/azure_core.egg-info/SOURCES.txt 2023-09-07
19:38:16.000000000 +0200
+++ new/azure-core-1.29.5/azure_core.egg-info/SOURCES.txt 2023-10-20
03:29:33.000000000 +0200
@@ -88,7 +88,6 @@
doc/azure.core.polling.rst
doc/azure.core.rst
doc/azure.core.tracing.rst
-doc/azure.rst
samples/README.md
samples/example_shared_transport.py
samples/example_shared_transport_async.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/doc/azure.core.rst
new/azure-core-1.29.5/doc/azure.core.rst
--- old/azure-core-1.29.4/doc/azure.core.rst 2023-09-07 19:37:17.000000000
+0200
+++ new/azure-core-1.29.5/doc/azure.core.rst 2023-10-20 03:28:48.000000000
+0200
@@ -35,7 +35,7 @@
:inherited-members:
azure.core.credentials_async
----------------------
+----------------------------
.. automodule:: azure.core.credentials_async
:members:
@@ -50,7 +50,7 @@
:undoc-members:
azure.core.messaging
--------------------
+--------------------
.. automodule:: azure.core.messaging
:members:
@@ -74,7 +74,7 @@
:inherited-members:
azure.core.serialization
--------------------
+------------------------
.. automodule:: azure.core.serialization
:members:
@@ -82,7 +82,7 @@
:inherited-members:
azure.core.rest
--------------------
+---------------
.. automodule:: azure.core.rest
:members:
@@ -90,7 +90,7 @@
:inherited-members:
azure.core.utils
--------------------
+----------------
.. automodule:: azure.core.utils
:members:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/doc/azure.rst
new/azure-core-1.29.5/doc/azure.rst
--- old/azure-core-1.29.4/doc/azure.rst 2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/doc/azure.rst 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-azure package
-=============
-
-.. automodule:: azure
- :members:
- :undoc-members:
- :inherited-members:
-
-Subpackages
------------
-
-.. toctree::
-
- azure.core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-core-1.29.4/pyproject.toml
new/azure-core-1.29.5/pyproject.toml
--- old/azure-core-1.29.4/pyproject.toml 2023-09-07 19:37:17.000000000
+0200
+++ new/azure-core-1.29.5/pyproject.toml 2023-10-20 03:28:48.000000000
+0200
@@ -3,6 +3,7 @@
type_check_samples = true
verifytypes = true
pyright = false
+strict_sphinx = true
# For test environments or static checks where a check should be run by
default, not explicitly disabling will enable the check.
# pylint is enabled by default, so there is no reason for a pylint = true in
every pyproject.toml.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/async_tests/test_pipeline_async.py
new/azure-core-1.29.5/tests/async_tests/test_pipeline_async.py
--- old/azure-core-1.29.4/tests/async_tests/test_pipeline_async.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/tests/async_tests/test_pipeline_async.py
2023-10-20 03:28:48.000000000 +0200
@@ -42,6 +42,7 @@
AsyncioRequestsTransport,
TrioRequestsTransport,
AioHttpTransport,
+ HttpRequest,
)
from azure.core.polling.async_base_polling import AsyncLROBasePolling
@@ -58,6 +59,12 @@
from utils import HTTP_REQUESTS
+try:
+ from unittest.mock import AsyncMock, PropertyMock
+except ImportError:
+ pass
+
+
@pytest.mark.asyncio
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)
async def test_sans_io_exception(http_request):
@@ -272,7 +279,10 @@
assert pos_boo > pos_retry
client = AsyncPipelineClient(
- base_url="test", config=config, per_call_policies=boo_policy,
per_retry_policies=foo_policy
+ base_url="test",
+ config=config,
+ per_call_policies=boo_policy,
+ per_retry_policies=foo_policy,
)
policies = client._pipeline._impl_policies
assert boo_policy in policies
@@ -284,7 +294,10 @@
assert pos_foo > pos_retry
client = AsyncPipelineClient(
- base_url="test", config=config, per_call_policies=[boo_policy],
per_retry_policies=[foo_policy]
+ base_url="test",
+ config=config,
+ per_call_policies=[boo_policy],
+ per_retry_policies=[foo_policy],
)
policies = client._pipeline._impl_policies
assert boo_policy in policies
@@ -311,13 +324,19 @@
assert foo_policy == actual_policies[2]
client = AsyncPipelineClient(
- base_url="test", policies=policies, per_call_policies=boo_policy,
per_retry_policies=[foo_policy]
+ base_url="test",
+ policies=policies,
+ per_call_policies=boo_policy,
+ per_retry_policies=[foo_policy],
)
actual_policies = client._pipeline._impl_policies
assert boo_policy == actual_policies[0]
assert foo_policy == actual_policies[3]
client = AsyncPipelineClient(
- base_url="test", policies=policies, per_call_policies=[boo_policy],
per_retry_policies=[foo_policy]
+ base_url="test",
+ policies=policies,
+ per_call_policies=[boo_policy],
+ per_retry_policies=[foo_policy],
)
actual_policies = client._pipeline._impl_policies
assert boo_policy == actual_policies[0]
@@ -337,3 +356,32 @@
for policy in policies:
if isinstance(policy, SensitiveHeaderCleanupPolicy):
assert False
+
+
[email protected](sys.version_info < (3, 8), reason="Python 3.7 does not
support AsyncMock")
[email protected]
+async def test_default_ssl_context():
+ class MockAiohttpSession:
+ async def __aenter__(self):
+ pass
+
+ async def __aexit__(self, exc_type, exc_val, exc_tb):
+ pass
+
+ async def close(self):
+ pass
+
+ async def open(self):
+ pass
+
+ async def request(self, method: str, url: str, **kwargs):
+ assert "ssl" not in kwargs
+ mock_response = AsyncMock(spec=aiohttp.ClientResponse)
+ type(mock_response).status = PropertyMock(return_value=200)
+ return mock_response
+
+ transport = AioHttpTransport(session=MockAiohttpSession(),
session_owner=False)
+ pipeline = AsyncPipeline(transport=transport)
+
+ req = HttpRequest("GET", "https://bing.com")
+ await pipeline.run(req)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/async_tests/test_rest_http_response_async.py
new/azure-core-1.29.5/tests/async_tests/test_rest_http_response_async.py
--- old/azure-core-1.29.4/tests/async_tests/test_rest_http_response_async.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/tests/async_tests/test_rest_http_response_async.py
2023-10-20 03:28:48.000000000 +0200
@@ -221,14 +221,25 @@
)
-# @pytest.mark.asyncio
-# async def test_multipart_files_content(send_request):
-# request = HttpRequest(
-# "POST",
-# "/multipart/basic",
-# files={"fileContent": io.BytesIO(b"<file content>")},
-# )
-# await send_request(request)
[email protected]
+async def test_multipart_files_content(send_request):
+ request = HttpRequest(
+ "POST",
+ "/multipart/basic",
+ files={"fileContent": io.BytesIO(b"<file content>")},
+ )
+ await send_request(request)
+
+
[email protected]
+async def test_multipart_data_and_files_content(send_request):
+ request = HttpRequest(
+ "POST",
+ "/multipart/data-and-files",
+ data={"message": "Hello, world!"},
+ files={"fileContent": io.BytesIO(b"<file content>")},
+ )
+ await send_request(request)
@pytest.mark.asyncio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/async_tests/test_rest_response_backcompat_async.py
new/azure-core-1.29.5/tests/async_tests/test_rest_response_backcompat_async.py
---
old/azure-core-1.29.4/tests/async_tests/test_rest_response_backcompat_async.py
2023-09-07 19:37:17.000000000 +0200
+++
new/azure-core-1.29.5/tests/async_tests/test_rest_response_backcompat_async.py
2023-10-20 03:28:48.000000000 +0200
@@ -178,6 +178,7 @@
_test_response_internal_response(old_response, new_response, port)
[email protected](reason="Resolve in #32162")
@pytest.mark.asyncio
@pytest.mark.parametrize("transport", TRANSPORTS)
async def test_response_stream_download(get_old_response, get_new_response,
transport):
@@ -251,7 +252,7 @@
assert (
set(old_response.headers.keys())
== set(new_response.headers.keys())
- == set(["Content-Type", "Connection", "Server", "Date"])
+ == set(["Content-Type", "Connection", "Server", "Date",
"Transfer-Encoding"])
)
old_response.headers = {"Hello": "world!"}
new_response.headers = {"Hello": "world!"}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/test_connection_string_parsing.py
new/azure-core-1.29.5/tests/test_connection_string_parsing.py
--- old/azure-core-1.29.4/tests/test_connection_string_parsing.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/tests/test_connection_string_parsing.py
2023-10-20 03:28:48.000000000 +0200
@@ -1,10 +1,8 @@
import pytest
from azure.core.utils import parse_connection_string
-from devtools_testutils import AzureMgmtTestCase
-
-class CoreConnectionStringParserTests(AzureMgmtTestCase):
+class TestCoreConnectionStringParser:
# cSpell:disable
def test_parsing_with_case_sensitive_keys_for_sensitive_conn_str(self,
**kwargs):
conn_str =
"Endpoint=XXXXENDPOINTXXXX;SharedAccessKeyName=XXXXPOLICYXXXX;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
@@ -55,7 +53,7 @@
for conn_str in ["", "foobar", "foo;bar;baz", ";", "foo=;bar=;", "=",
"=;=="]:
with pytest.raises(ValueError) as e:
parse_result = parse_connection_string(conn_str)
- self.assertEqual(str(e.value), "Connection string is either blank
or malformed.")
+ assert str(e.value) == "Connection string is either blank or
malformed."
def test_case_insensitive_clear_method(self):
conn_str =
"enDpoiNT=XXXXENDPOINTXXXX;sharedaccesskeyname=XXXXPOLICYXXXX;SHAREDACCESSKEY=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/test_rest_response_backcompat.py
new/azure-core-1.29.5/tests/test_rest_response_backcompat.py
--- old/azure-core-1.29.4/tests/test_rest_response_backcompat.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/tests/test_rest_response_backcompat.py
2023-10-20 03:28:48.000000000 +0200
@@ -107,7 +107,7 @@
assert (
set(old_response.headers.keys())
== set(new_response.headers.keys())
- == set(["Content-Type", "Connection", "Server", "Date"])
+ == set(["Content-Type", "Connection", "Server", "Date",
"Transfer-Encoding"])
)
old_response.headers = {"Hello": "world!"}
new_response.headers = {"Hello": "world!"}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/testserver_tests/coretestserver/coretestserver/__init__.py
new/azure-core-1.29.5/tests/testserver_tests/coretestserver/coretestserver/__init__.py
---
old/azure-core-1.29.4/tests/testserver_tests/coretestserver/coretestserver/__init__.py
2023-09-07 19:37:17.000000000 +0200
+++
new/azure-core-1.29.5/tests/testserver_tests/coretestserver/coretestserver/__init__.py
2023-10-20 03:28:48.000000000 +0200
@@ -6,6 +6,7 @@
# -------------------------------------------------------------------------
from flask import Flask, Response
+import os
from .test_routes import (
basic_api,
encoding_api,
@@ -36,4 +37,7 @@
if __name__ == "__main__":
- app.run(debug=True)
+ debugArg = True
+ if os.getenv("TF_BUILD", None):
+ debugArg = False
+ app.run(debug=debugArg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/testserver_tests/coretestserver/coretestserver/test_routes/multipart.py
new/azure-core-1.29.5/tests/testserver_tests/coretestserver/coretestserver/test_routes/multipart.py
---
old/azure-core-1.29.4/tests/testserver_tests/coretestserver/coretestserver/test_routes/multipart.py
2023-09-07 19:37:17.000000000 +0200
+++
new/azure-core-1.29.5/tests/testserver_tests/coretestserver/coretestserver/test_routes/multipart.py
2023-10-20 03:28:48.000000000 +0200
@@ -26,7 +26,7 @@
assert_with_message("content type", multipart_header_start,
request.content_type[: len(multipart_header_start)])
if request.files:
# aiohttp
- assert_with_message("content length", 258, request.content_length)
+ assert_with_message("content length", 228, request.content_length)
assert_with_message("num files", 1, len(request.files))
assert_with_message("has file named fileContent", True,
bool(request.files.get("fileContent")))
file_content = request.files["fileContent"]
@@ -38,7 +38,7 @@
)
assert_with_message(
"content disposition",
- 'form-data; name="fileContent"; filename="fileContent";
filename*=utf-8\'\'fileContent',
+ 'form-data; name="fileContent"; filename="fileContent"',
file_content.headers["Content-Disposition"],
)
elif request.form:
@@ -52,9 +52,30 @@
@multipart_api.route("/data-and-files", methods=["POST"])
def data_and_files():
- assert_with_message("content type", multipart_header_start,
request.content_type[: len(multipart_header_start)])
- assert_with_message("message", "Hello, world!", request.form["message"])
- assert_with_message("message", "<file content>",
request.form["fileContent"])
+ if request.files:
+ # aiohttp
+ assert_with_message("content type", multipart_header_start,
request.content_type[: len(multipart_header_start)])
+ assert_with_message("has file named fileContent", True,
bool(request.files.get("fileContent")))
+ assert_with_message("message", "Hello, world!",
request.form["message"])
+ file_content = request.files["fileContent"]
+ assert_with_message("file content type", "application/octet-stream",
file_content.content_type)
+ assert_with_message("file content length", 14,
file_content.content_length)
+ assert_with_message("filename", "fileContent", file_content.filename)
+ assert_with_message(
+ "has content disposition header", True,
bool(file_content.headers.get("Content-Disposition"))
+ )
+ assert_with_message(
+ "content disposition",
+ 'form-data; name="fileContent"; filename="fileContent"',
+ file_content.headers["Content-Disposition"],
+ )
+ elif request.form:
+ # requests
+ assert_with_message("content type", multipart_header_start,
request.content_type[: len(multipart_header_start)])
+ assert_with_message("message", "Hello, world!",
request.form["message"])
+ assert_with_message("message", "<file content>",
request.form["fileContent"])
+ else:
+ return Response(status=400)
return Response(status=200)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-core-1.29.4/tests/testserver_tests/coretestserver/setup.py
new/azure-core-1.29.5/tests/testserver_tests/coretestserver/setup.py
--- old/azure-core-1.29.4/tests/testserver_tests/coretestserver/setup.py
2023-09-07 19:37:17.000000000 +0200
+++ new/azure-core-1.29.5/tests/testserver_tests/coretestserver/setup.py
2023-10-20 03:28:48.000000000 +0200
@@ -32,6 +32,6 @@
],
packages=find_packages(),
install_requires=[
- "flask==1.1.4",
+ "flask==2.2.5",
],
)