Skip to content
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
4 changes: 0 additions & 4 deletions eng/templates/jobs/ci-emulator-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:

strategy:
matrix:
Python37:
PYTHON_VERSION: '3.7'
Python38:
PYTHON_VERSION: '3.8'
Python39:
PYTHON_VERSION: '3.9'
Python310:
Expand Down
4 changes: 0 additions & 4 deletions eng/templates/jobs/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:

strategy:
matrix:
Python37:
PYTHON_VERSION: '3.7'
Python38:
PYTHON_VERSION: '3.8'
Python39:
PYTHON_VERSION: '3.9'
Python310:
Expand Down
9 changes: 0 additions & 9 deletions eng/templates/official/jobs/ci-docker-consumption-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ jobs:

strategy:
matrix:
Python38:
PYTHON_VERSION: '3.8'
STORAGE_CONNECTION: $(LinuxStorageConnectionString38)
COSMOSDB_CONNECTION: $(LinuxCosmosDBConnectionString38)
EVENTHUB_CONNECTION: $(LinuxEventHubConnectionString38)
SERVICEBUS_CONNECTION: $(LinuxServiceBusConnectionString38)
SQL_CONNECTION: $(LinuxSqlConnectionString38)
EVENTGRID_URI: $(LinuxEventGridTopicUriString38)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString38)
Python39:
PYTHON_VERSION: '3.9'
STORAGE_CONNECTION: $(LinuxStorageConnectionString39)
Expand Down
9 changes: 0 additions & 9 deletions eng/templates/official/jobs/ci-docker-dedicated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ jobs:

strategy:
matrix:
Python38:
PYTHON_VERSION: '3.8'
STORAGE_CONNECTION: $(LinuxStorageConnectionString38)
COSMOSDB_CONNECTION: $(LinuxCosmosDBConnectionString38)
EVENTHUB_CONNECTION: $(LinuxEventHubConnectionString38)
SERVICEBUS_CONNECTION: $(LinuxServiceBusConnectionString38)
SQL_CONNECTION: $(LinuxSqlConnectionString38)
EVENTGRID_URI: $(LinuxEventGridTopicUriString38)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString38)
Python39:
PYTHON_VERSION: '3.9'
STORAGE_CONNECTION: $(LinuxStorageConnectionString39)
Expand Down
18 changes: 0 additions & 18 deletions eng/templates/official/jobs/ci-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,6 @@ jobs:

strategy:
matrix:
Python37:
PYTHON_VERSION: '3.7'
STORAGE_CONNECTION: $(LinuxStorageConnectionString37)
COSMOSDB_CONNECTION: $(LinuxCosmosDBConnectionString37)
EVENTHUB_CONNECTION: $(LinuxEventHubConnectionString37)
SERVICEBUS_CONNECTION: $(LinuxServiceBusConnectionString37)
SQL_CONNECTION: $(LinuxSqlConnectionString37)
EVENTGRID_URI: $(LinuxEventGridTopicUriString37)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString37)
Python38:
PYTHON_VERSION: '3.8'
STORAGE_CONNECTION: $(LinuxStorageConnectionString38)
COSMOSDB_CONNECTION: $(LinuxCosmosDBConnectionString38)
EVENTHUB_CONNECTION: $(LinuxEventHubConnectionString38)
SERVICEBUS_CONNECTION: $(LinuxServiceBusConnectionString38)
SQL_CONNECTION: $(LinuxSqlConnectionString38)
EVENTGRID_URI: $(LinuxEventGridTopicUriString38)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString38)
Python39:
PYTHON_VERSION: '3.9'
STORAGE_CONNECTION: $(LinuxStorageConnectionString39)
Expand Down
2 changes: 1 addition & 1 deletion workers/azure_functions_worker/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

VERSION = '4.40.2'
VERSION = '4.41.0'
2 changes: 1 addition & 1 deletion workers/proxy_worker/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

VERSION = '4.40.2'
VERSION = '4.41.0'
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import sys
import time
import unittest

from tests.utils import testutils


@unittest.skipIf(sys.version_info.minor <= 8, "The base extension"
"is only supported for 3.9+.")
class TestDeferredBindingsBlobFunctions(testutils.WebHostTestCase):

@classmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
import sys
import time
from datetime import datetime
from unittest.case import skipIf

from dateutil import parser
from tests.utils import testutils
Expand Down Expand Up @@ -66,9 +64,6 @@ def test_eventhub_multiple(self):

self.assertDictEqual(all_row_keys_seen, row_keys_seen)

@skipIf(sys.version_info.minor == 7,
"Using azure-eventhub SDK with the EventHub Emulator"
"requires Python 3.8+")
@testutils.retryable_test(3, 5)
def test_eventhub_multiple_with_metadata(self):
# Generate a unique event body for EventHub event
Expand Down Expand Up @@ -176,9 +171,6 @@ def test_eventhub_multiple(self):

self.assertDictEqual(all_row_keys_seen, row_keys_seen)

@skipIf(sys.version_info.minor == 7,
"Using azure-eventhub SDK with the EventHub Emulator"
"requires Python 3.8+")
@testutils.retryable_test(3, 5)
def test_eventhub_multiple_with_metadata(self):
# Generate a unique event body for EventHub event
Expand Down
6 changes: 0 additions & 6 deletions workers/tests/emulator_tests/test_eventhub_functions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
import sys
import time

from unittest import skipIf

from tests.utils import testutils


Expand Down Expand Up @@ -55,9 +52,6 @@ def test_eventhub_trigger(self):
# Check if the event body matches the initial data
self.assertEqual(response, doc)

@skipIf(sys.version_info.minor == 7,
"Using azure-eventhub SDK with the EventHub Emulator"
"requires Python 3.8+")
@testutils.retryable_test(3, 5)
def test_eventhub_trigger_with_metadata(self):
# Generate a unique event body for EventHub event
Expand Down
4 changes: 2 additions & 2 deletions workers/tests/endtoend/test_eol_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
REQUEST_TIMEOUT_SEC = 5


@skipIf(sys.version_info.minor >= 9,
'3.9+ is supported.')
@skipIf(sys.version_info.minor >= 10,
'3.10+ is supported.')
class TestEOLFunctions(testutils.WebHostTestCase):

@classmethod
Expand Down
2 changes: 0 additions & 2 deletions workers/tests/endtoend/test_http_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ def send_request():
@unittest.skipIf(is_envvar_true(DEDICATED_DOCKER_TEST)
or is_envvar_true(CONSUMPTION_DOCKER_TEST),
"Tests are flaky when running on Docker")
@unittest.skipIf(sys.version_info.minor < 8, "HTTPv2"
"is only supported for 3.8+.")
@unittest.skipIf(sys.version_info.minor >= 13,
"App Setting is not needed for 3.13+")
class TestHttpFunctionsWithInitIndexingDisabled(testutils.WebHostTestCase):
Expand Down
3 changes: 2 additions & 1 deletion workers/tests/unittest_proxy/test_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
@patch("proxy_worker.utils.dependency.DependencyManager._get_worker_deps_path",
return_value="/mock/worker")
@patch("proxy_worker.utils.dependency.logger")
def test_use_worker_dependencies(mock_logger, mock_worker, mock_cx_dir, mock_cx_deps):
def test_use_worker_dependencies(mock_logger, mock_worker, mock_cx_dir,
mock_cx_deps):
sys.path = ["/mock/cx/site-packages", "/mock/cx", "/original"]

DependencyManager.initialize()
Expand Down
5 changes: 1 addition & 4 deletions workers/tests/unittests/test_datumref.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys

import unittest
from http.cookies import SimpleCookie
from unittest import skipIf

from dateutil import parser
from dateutil.parser import ParserError
Expand Down Expand Up @@ -67,8 +66,6 @@ def test_parse_cookie_attr_same_site_explicit_none(self):
def test_parse_to_rpc_http_cookie_list_none(self):
self.assertEqual(parse_to_rpc_http_cookie_list(None), None)

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_parse_to_rpc_http_cookie_list_valid(self):
headers = [
'foo=bar; Path=/some/path; Secure; HttpOnly; Domain=123; '
Expand Down
11 changes: 1 addition & 10 deletions workers/tests/unittests/test_deferred_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
from azure_functions_worker import protos
from azure_functions_worker.bindings import meta

# Even if the tests are skipped for <=3.8, the library is still imported as
# it is used for these tests.
if sys.version_info.minor >= 9:
from azurefunctions.extensions.base import GrpcClientType
from azurefunctions.extensions.base import GrpcClientType

DEFERRED_BINDINGS_ENABLED_DIR = testutils.UNIT_TESTS_FOLDER / \
'deferred_bindings_functions' / \
Expand All @@ -35,8 +32,6 @@ def __init__(self, version: str, source: str,
self.content = content


@unittest.skipIf(sys.version_info.minor <= 8, "The base extension"
"is only supported for 3.9+.")
@unittest.skipIf(sys.version_info.minor >= 13, "For python 3.13+,"
"this logic is in the"
"library worker.")
Expand Down Expand Up @@ -69,8 +64,6 @@ async def test_deferred_bindings_enabled_log(self):
del sys.modules['function_app']


@unittest.skipIf(sys.version_info.minor <= 8, "The base extension"
"is only supported for 3.9+.")
@unittest.skipIf(sys.version_info.minor >= 13, "For python 3.13+,"
"this logic is in the"
"library worker.")
Expand Down Expand Up @@ -103,8 +96,6 @@ async def test_deferred_bindings_disabled_log(self):
del sys.modules['function_app']


@unittest.skipIf(sys.version_info.minor <= 8, "The base extension"
"is only supported for 3.9+.")
@unittest.skipIf(sys.version_info.minor >= 13, "For python 3.13+,"
"this logic is in the"
"library worker.")
Expand Down
32 changes: 0 additions & 32 deletions workers/tests/unittests/test_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,38 +515,6 @@ async def _check_if_async_function_is_ok(self, host) -> Tuple[str, str]:
return func_id, invoke_id, function_name


@unittest.skipIf(sys.version_info.minor != 8,
"Run the tests only for Python 3.8. In other platforms, "
"as the default passed is None, the cpu_count determines the "
"number of max_workers and we cannot mock the os.cpu_count() "
"in the concurrent.futures.ThreadPoolExecutor")
class TestThreadPoolSettingsPython38(TestThreadPoolSettingsPython37):
def setUp(self, version=SysVersionInfo(3, 8, 0, 'final', 0)):
super(TestThreadPoolSettingsPython38, self).setUp(version)
self._allowed_max_workers: int = self._over_max_workers

def tearDown(self):
super(TestThreadPoolSettingsPython38, self).tearDown()

async def test_dispatcher_sync_threadpool_in_placeholder_above_max(self):
"""Test if the sync threadpool will use any value and there isn't any
artificial max value set.
"""
with patch('azure_functions_worker.dispatcher.logger'):
async with self._ctrl as host:
await self._check_if_function_is_ok(host)

# Reload environment variable on specialization
await host.reload_environment(environment={
PYTHON_THREADPOOL_THREAD_COUNT: f'{self._over_max_workers}'
})
await self._assert_workers_threadpool(self._ctrl, host,
self._allowed_max_workers)
self.assertNotEqual(
self._ctrl._worker.get_sync_tp_workers_set(),
self._default_workers)


@unittest.skipIf(sys.version_info.minor != 9,
"Run the tests only for Python 3.9. In other platforms, "
"as the default passed is None, the cpu_count determines the "
Expand Down
14 changes: 0 additions & 14 deletions workers/tests/unittests/test_http_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ def test_print_to_console_stdout(self):
self.assertEqual(r.status_code, 200)
self.assertEqual(r.text, 'OK-print-logging')

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_multiple_cookie_header_in_response(self):
r = self.webhost.request('GET', 'multiple_set_cookie_resp_headers')
self.assertEqual(r.status_code, 200)
Expand All @@ -363,24 +361,18 @@ def test_multiple_cookie_header_in_response(self):
"foo3=43; expires=Fri, 12 Jan 2018 13:55:08 GMT; "
"max-age=10000000; domain=example.com; path=/; secure; httponly")

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_set_cookie_header_in_response_empty_value(self):
r = self.webhost.request('GET', 'set_cookie_resp_header_empty')
self.assertEqual(r.status_code, 200)
self.assertEqual(r.headers.get('Set-Cookie'), None)

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_set_cookie_header_in_response_default_value(self):
r = self.webhost.request('GET',
'set_cookie_resp_header_default_values')
self.assertEqual(r.status_code, 200)
self.assertEqual(r.headers.get('Set-Cookie'),
'foo=bar; domain=; path=')

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_response_cookie_header_nullable_timestamp_err(self):
r = self.webhost.request(
'GET',
Expand All @@ -396,17 +388,13 @@ def check_log_response_cookie_header_nullable_timestamp_err(self,
"invalid format.",
host_out)

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_response_cookie_header_nullable_bool_err(self):
r = self.webhost.request(
'GET',
'response_cookie_header_nullable_bool_err')
self.assertEqual(r.status_code, 200)
self.assertFalse("Set-Cookie" in r.headers)

@skipIf(sys.version_info < (3, 8, 0),
"Skip the tests for Python 3.7 and below")
def test_response_cookie_header_nullable_double_err(self):
r = self.webhost.request(
'GET',
Expand All @@ -418,8 +406,6 @@ def check_log_print_to_console_stdout(self, host_out: typing.List[str]):
# System logs stdout should exist in host_out
self.assertIn('Secret42', host_out)

@skipIf(sys.version_info < (3, 9, 0),
"Skip the tests for Python 3.8 and below")
def test_print_to_console_stderr(self):
r = self.webhost.request('GET', 'print_logging?console=true'
'&message=Secret42&is_stderr=true')
Expand Down
Loading
Loading