Skip to content

Commit

Permalink
build: remove Python 3.8 references
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudSheraz committed Nov 1, 2024
1 parent 9846e6c commit 902ed80
Show file tree
Hide file tree
Showing 18 changed files with 131 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-reserved-keywords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.11']
python-version: ['3.11']
toxenv: [django42, quality]

steps:
Expand All @@ -36,7 +36,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
if: matrix.python-version == '3.11' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v4
with:
flags: unittests
Expand All @@ -56,7 +56,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify_changed_contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
8 changes: 6 additions & 2 deletions edxval/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,9 @@ def create_transcripts_xml(video_id, video_el, resource_fs, static_dir):
return dict(xml=video_el, transcripts=transcript_files_map)


def import_from_xml(xml, edx_video_id, resource_fs, static_dir, external_transcripts=None, course_id=None):
def import_from_xml(
xml, edx_video_id, resource_fs, static_dir, external_transcripts=None, course_id=None
): # pylint: disable=too-many-positional-arguments
"""
Imports data from a video_asset element about the given video_id.
If the edx_video_id already exists, then no changes are made. If an unknown
Expand Down Expand Up @@ -1205,7 +1207,9 @@ def import_from_xml(xml, edx_video_id, resource_fs, static_dir, external_transcr
return edx_video_id


def import_transcript_from_fs(edx_video_id, language_code, file_name, provider, resource_fs, static_dir):
def import_transcript_from_fs(
edx_video_id, language_code, file_name, provider, resource_fs, static_dir
): # pylint: disable=too-many-positional-arguments
"""
Imports transcript file from file system and creates transcript record in DS.
Expand Down
4 changes: 3 additions & 1 deletion edxval/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ def get_or_none(cls, video_id, language_code):
return transcript

@classmethod
def create(cls, video, language_code, file_format, content, provider):
def create(
cls, video, language_code, file_format, content, provider
): # pylint: disable=too-many-positional-arguments
"""
Create a Video Transcript.
Expand Down
12 changes: 9 additions & 3 deletions edxval/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,9 @@ def test_get_video_transcript_url(self):
},
)
@unpack
def test_create_or_update_video_transcript(self, file_data, file_name, file_format, language_code, provider):
def test_create_or_update_video_transcript(
self, file_data, file_name, file_format, language_code, provider
): # pylint: disable=too-many-positional-arguments
"""
Verify that `create_or_update_video_transcript` api function updates existing transcript as expected.
"""
Expand Down Expand Up @@ -2897,7 +2899,9 @@ def test_create_or_update_video_transcript(self, file_data, file_name, file_form
},
)
@unpack
def test_create_or_update_video_exceptions(self, video_id, file_format, provider, exception, exception_message):
def test_create_or_update_video_exceptions(
self, video_id, file_format, provider, exception, exception_message
): # pylint: disable=too-many-positional-arguments
"""
Verify that `create_or_update_video_transcript` api function raise exceptions on invalid values.
"""
Expand Down Expand Up @@ -3015,7 +3019,9 @@ def test_create_video_transcript(self):
}
)
@unpack
def test_create_video_transcript_exceptions(self, video_id, language_code, file_format, provider, exception_msg):
def test_create_video_transcript_exceptions(
self, video_id, language_code, file_format, provider, exception_msg
): # pylint: disable=too-many-positional-arguments
"""
Verify that `create_video_transcript` api function raise exceptions on invalid values.
"""
Expand Down
2 changes: 1 addition & 1 deletion edxval/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def post(self, request):

try:
validate_generated_images(generated_images, LIST_MAX_ITEMS)
except Exception as e:
except Exception as e: # pylint: disable=broad-exception-caught
return Response(
status=status.HTTP_400_BAD_REQUEST,
data={'message': str(e)}
Expand Down
7 changes: 4 additions & 3 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.3.0
# Generated by edx-lint version: 5.3.7
# ------------------------------
[MASTER]
ignore = migrations
Expand Down Expand Up @@ -259,6 +259,7 @@ enable =
useless-suppression,
disable =
bad-indentation,
broad-exception-raised,
consider-using-f-string,
duplicate-code,
file-ignored,
Expand Down Expand Up @@ -380,6 +381,6 @@ ext-import-graph =
int-import-graph =

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception

# e4144201a3f25df503e5cbb5cc51147c12a2d137
# 9e382112fd455855f6d0f08cef2bdb5077da2d63
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ certifi==2024.8.30
# via requests
chardet==5.2.0
# via tox
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
colorama==0.4.6
# via tox
coverage[toml]==7.6.1
coverage[toml]==7.6.4
# via coveralls
coveralls==4.0.1
# via -r requirements/ci.in
distlib==0.3.8
distlib==0.3.9
# via virtualenv
docopt==0.6.2
# via coveralls
Expand All @@ -42,9 +42,9 @@ pyproject-api==1.8.0
# via tox
requests==2.32.3
# via coveralls
tox==4.20.0
tox==4.23.2
# via -r requirements/ci.in
urllib3==2.2.3
# via requests
virtualenv==20.26.5
virtualenv==20.27.1
# via tox
4 changes: 4 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ django-simple-history==3.0.0
# This can be unpinned once https://github.com/openedx/edx-platform/issues/34586
# has been resolved and edx-platform is running with pymongo>=4.4.0
event-tracking<2.4.1

# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3
7 changes: 0 additions & 7 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
# Common constraints for edx repos
-c common_constraints.txt

# For python greater than or equal to 3.9 backports.zoneinfo is causing failures
backports.zoneinfo;python_version<"3.9"

# Python 3.8 is not supported by newer versions of docutils. Remove this pin once
# python 3.8 is deprecated
docutils==0.20.1

# 5.4.0 is breaking for Python 3.8 and 3.11 CI checks with error
# importlib.resources' has no attribute 'files'
# To be unpinned once edx-val moves to Python 3.12
Expand Down
Loading

0 comments on commit 902ed80

Please sign in to comment.