-
Notifications
You must be signed in to change notification settings - Fork 327
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
[CR][ENG-5681] Great Big Python Upgrade #10648
Merged
Merged
Changes from 250 commits
Commits
Show all changes
348 commits
Select commit
Hold shift + click to select a range
473cd97
fixed flake8 warnings
opaduchak 3dc4b04
Merge branch 'feature/dep-group-dev' into feature/python-upgrade
felliott 1c47f33
bump version of gevent
ly-mariia 72b1aae
update dep versions for transitions, pillow, geoip2
ly-mariia a4afa04
specify str encoding in nameparser
ly-mariia 5b4539c
remove unused Pystache module
ly-mariia faa1f23
replace maxminddb-geolite2 to more modern geoip2;
ly-mariia e7f1084
remove python-magic
ly-mariia 64a8561
downgrade geoip2 to avoid setuptools build failure
felliott 78379ea
Merge branch 'feature/dep-group-catchall' into feature/python-upgrade
felliott e46aa12
removed _app_ctx_stack and _request_ctx_stack
opaduchak 5b28d61
fied uritemplate.py -> uritemplate
opaduchak 39d7dc2
fixed future version of ipdb
opaduchak 57f62fc
Merge branch 'feature/fix-flask-context' into feature/python-upgrade
felliott 61e16db
remove egap assets missed from prior purge
felliott 2f97bea
repoint dv-client-pin pin to COS repo
felliott 33aecfd
repoint mendeley-python-sdk pin to COS repo
felliott d8ed3a9
repoint djelme pin to COS repo
felliott 054ba6b
replace mdx_del_ins fork with markdown-del-ins from pypi
felliott 5391352
Merge branch 'feature/misc-updates' into feature/python-upgrade
felliott 0e9eb50
updated furl usage
opaduchak c7864aa
added comments in locations that may be affected by furl upgrade
opaduchak 8a4ac00
added reasoning behind urrlib3 version
opaduchak e656848
replace furl / op with .add(path=); minor typo fix
felliott 74e03e1
Merge branch 'feature/dep-group-url-encoding' into feature/python-upg…
felliott db6e960
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott 0946d6f
removed future usages
opaduchak 7a3bdb0
removed future from mendeley
opaduchak c3a437e
Merge branch 'feature/dep-group-purge' into feature/python-upgrade
felliott 1a9535f
update pymongo
ly-mariia 732665e
update google & newrelic module versions
felliott 640520c
update elasticsearch deps
felliott 44e14bf
replace the raven module with sentry-sdk
felliott ca70c85
Merge branch 'feature/dep-group-services' into feature/python-upgrade
felliott fda8e09
fixed code to work with newer celery
opaduchak 432c427
Merge branch 'feature/dep-group-celery' into feature/python-upgrade
felliott 992c10a
bumped test dependencies
opaduchak c4b1934
fixed time.clock in tests and assert
opaduchak 8bbb37c
fixed some asserts
opaduchak 88867b7
fixed several tests, in cases where apis were changed or asserts not …
opaduchak ae8ef3b
fixed missing USE_COLOR
opaduchak 8ae666b
Merge branch 'feature/dep-group-tests' into feature/python-upgrade
felliott 18e9d81
update Postgres to version 15
ly-mariia 8694e95
fix the error "cannot import name 'sentry' from 'framework.sentry'"
ly-mariia ab89e8b
add back pymongo dep to requirements.txt
felliott aab46ec
Merge branch 'feature/local-pg15' into feature/python-upgrade
felliott 1e63cda
fixed more tests, added test report to CI, to ramp up development, fi…
opaduchak 8794e52
fixed report generation on failure
opaduchak 14bb7e3
added permission for test reporter to alter actions
opaduchak 22cea9f
fixed pre-commit issues
opaduchak a48ee86
fixed faker issue, improved reports naming in CI
opaduchak 5744328
fixed tests with otp
opaduchak df45eef
fixed part of quote tests failures, middleware process request
opaduchak 655bcd8
fixed materialized bug, increased annotations limit and removed passi…
opaduchak 3afa405
fixed materialized extecption, fixed es6 connection setup
opaduchak ec9e95b
silenced MaxmindDb file not foiund exception
opaduchak db090d6
allowed localhost for pytest-socket
opaduchak 2f5329f
fixed flask_client in addons except osd storage
opaduchak b8f0ee4
removed all instances of *method*_json
opaduchak 8b7b439
fixed allow_redirects and params for flask client and new pytest syntax
opaduchak b4ac23b
rest of errors which were left
opaduchak 51b3629
fixed more tests for website
opaduchak 9b51477
fixed more tests
opaduchak e3d8ed7
fixed more website tests
opaduchak 7ef5e91
fixed event more tests
opaduchak afae991
fixed even more tests
opaduchak 2518495
fixed even more website tests
opaduchak 3ae121d
fixed more website errors related to FlaskClient
opaduchak 74fe0af
fixed rest of FlaskClient related errors except for forms
opaduchak 6842eaf
fixed sentry tests
opaduchak 36ef494
more error fixes, lowered transitions to 0.8.11 due to breaking api c…
opaduchak 3d6cb1f
fixed forms handling in tests
opaduchak 778fb8b
applied more of easier test fixes
opaduchak 23e7e72
fixed mocks and in some cases misuses of FlaskClient
opaduchak f66b73a
fixed rest of invalid calls of sentry.log_exception()
opaduchak f936a2f
fixed more tests in addons
opaduchak e3c7225
fixed send_hook in addons, attempt to fix twofactor
opaduchak f9ba569
fixed sendgrid tests
opaduchak e3443f1
fixed redirect issues
opaduchak fd06b14
fixed url encodeing test failures, added TODO comments to each case s…
opaduchak cc051c9
fixed more urlencoding test failures
opaduchak 1b2b084
downgraded jsonschema validator to draft7
opaduchak ec51327
downgraded all jsonschema validators to draft7, for consistency reasons
opaduchak 41e685c
fixed makring Embargo as completed
opaduchak 7db5e0f
- fix github mock data;
ly-mariia f1bf8d3
- made the code more readable;
ly-mariia 1b652d5
- fix error in test_folder_list_GET_expected_behavior test;
ly-mariia 30a3623
- fixed error with URL decoding;
ly-mariia 736ad49
- add the to_header function to the Auth class;
ly-mariia d9b757b
Merge branch 'feature/bugfix-party' into feature/python-upgrade
felliott ca52f69
fixed cors middleware errors
opaduchak f24a005
fixed report generation
opaduchak 18343d3
Merge branch 'feature/fix-middleware' into feature/python-upgrade
felliott bdafdfb
fixed sendgrid tests
opaduchak f164d61
Merge branch 'feature/fix-sendgrid' into feature/python-upgrade
felliott b693dbb
fixed double quotes and datetime.UTC which is available only on pytho…
opaduchak 93a149d
fixed metaclass issue in MockOAuth2Provider
opaduchak 9821161
fixed double strings and flaske8 errors
opaduchak ce8b753
fixed leftover datetime.UTC
opaduchak ec26ee8
Merge branch 'feature/rebase-repairs' into feature/python-upgrade
felliott 3188c86
hyphenize invoke task for worker command
felliott 1fad18a
Merge branch 'feature/fix-worker' into feature/python-upgrade
felliott 9b813c9
- fix error with passwords;
ly-mariia b4cdc4d
- remove unnecessary imports;
ly-mariia b62cc32
- fix status_code error for test_external_login_confirm_email_get_wit…
ly-mariia 1bce789
- fix error for test_provider_down test;
ly-mariia b0cf268
Merge branch 'feature/fix-auth' into feature/python-upgrade
felliott 87c4673
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott 65e106f
resolved celery issue by skipping tests
opaduchak e4336ae
Merge branch 'feature/skip-share-interactions' into feature/python-up…
felliott e825378
explicitly close request context manager in test_session
opaduchak ed3b54e
Merge branch 'feature/teardown-testsession' into feature/python-upgrade
felliott 76c2275
fixed testSearchViews queries for FlaskClient
opaduchak 5bc8592
Merge branch 'feature/fix-testsearchviews' into feature/python-upgrade
felliott f63dc15
revert `datetime.UTC` back to pre-3.11 form
felliott e92c72e
declare test markers in pytest.ini to silence warnings
felliott d9d663f
fix incorrectly-named pytest marker
felliott e30c433
replace yield_fixture with fixture to silence warnings
felliott 17a3aba
remove marker that is actually a fixture
felliott b304998
silence pytest warning; return True will be an error
felliott bd25e7e
silence warnings for osf app config
felliott a1f4a53
silence warnings for addon app configs
felliott 4f64dfd
replace ugettext_lazy with gettext_lazy to silence dep warnings
felliott cf99f34
replace django urlquote with urllib quote to silence warnings
felliott aecd0fc
silence test warnings for non-test classes called 'Test*'
felliott b264d97
Merge branch 'feature/pyup-misc-fixes' into feature/python-upgrade
felliott fe9e823
- fix test_link_repo_registration test;
ly-mariia 392cce4
- fix settings conflict;
ly-mariia 8582959
- fix test_link_repo_registration test;
ly-mariia de19605
- fix test_get_refs_registered_missing_branch test;
ly-mariia b9c71e3
- fix test_before_page_load_osf_public_gh_public test;
ly-mariia 5d37516
- fix tests from classes TestCallbacks and TestNodeSettings;
ly-mariia 368a119
- fixes according to PEP8;
ly-mariia f0c3ef6
Merge branch 'feature/github-gitlab-fixes' into feature/python-upgrade
felliott 5a4c494
fixed affected tests
opaduchak c9c3a8e
skipped one more test due to celery 5.0 synchronous retries
opaduchak 5f1fa27
Merge branch 'fix/ENG-5531' into feature/python-upgrade
cslzchen 6d67329
Fix invalid HTML in tests to fix bleach sanitization issue
cslzchen 153fb4e
Merge branch 'fix/ENG-5514' into feature/python-upgrade
cslzchen 96addbb
fixed several OTP-related tests
opaduchak 4b7a2f4
fixed test with otp drift
opaduchak ca2b4d0
changed permissions for jobs in ci, to fix test reporting in PR jobs
opaduchak 50ec1de
removed test reports from PR, because they do not work when PRs are s…
opaduchak b78c410
Merge branch 'ENG-5587' into feature/python-upgrade
cslzchen 9a3f793
- fix errors for test_external_login_confirm_email_get_duped_id and t…
ly-mariia 3089868
- fix errors for test_download_file_with_token and test_download_file…
ly-mariia 4720a20
- fix status code error for test_external_login_confirm_email_get_lin…
ly-mariia cbc1ca5
- removed the extra comma;
ly-mariia ea77e2e
- fix test_download_file_with_token tests;
ly-mariia 70fc8f1
- fix error request.authorization;
ly-mariia c64c4fb
- update guid;
ly-mariia e7b2050
Merge branch 'feature/ENG-5553' into feature/python-upgrade
cslzchen 1d42a5a
- replace json with data;
ly-mariia 4c56131
Merge branch 'feature/ENG-5588' into feature/python-upgrade
cslzchen 0da3db1
fixed test containing invalid status code
opaduchak 1cd73ad
Merge branch 'ENG-5604' into feature/python-upgrade
cslzchen 35d5512
fixed conflicts
opaduchak 800b95d
fixed jwt token encryption
opaduchak bfc35c4
fixed import order
opaduchak baba6ef
Merge pull request #10618 from opaduchak/feature/develop-updates
cslzchen e6794b8
bumped django along with sentry
opaduchak 5167467
removed deprecated urls and fixed csrf_token generation
opaduchak 37cdd3c
fixed invalid re_path imports
opaduchak 1b5ba8f
fixed one failed re_path fix
opaduchak 17101c7
fixed more instances of misimported re_path
opaduchak bc989da
fixed is_ajax and other minor import fixes
opaduchak 68a8e47
fixed pytz timezone instead of datetime, fixed sentry mocks
opaduchak 9150450
fixed unused import
opaduchak 08a29aa
bumped Django to 4.2
opaduchak c749434
fixed token santitization
opaduchak 2a0b3aa
fixed AuthUserFactory not saving instance if there are no emails
opaduchak 810b3db
fixed AuthUserFactory to crating instance cause of absence of password
opaduchak a244236
more fixed to auth user factory
opaduchak b7b1408
fixed adding emails before save
opaduchak 0fd3bd1
fixed unused imports
opaduchak 7f7799f
Merge branch 'ENG-5550' into feature/python-upgrade
cslzchen 3904e28
added crutch to allow to use CSRF middleware inside of OSFSessionAuth…
opaduchak b09ab7a
Merge branch 'ENG-5639' into feature/python-upgrade
cslzchen 1e95c3e
- fix test_update_two_factor_enabled test;
ly-mariia 2045954
- add a commas;
ly-mariia 00603b6
- reverse the change;
ly-mariia ef53555
- fix error AttributeError: 'NoneType' object has no attribute 'lower';
ly-mariia 7b2c076
- fix with value 1 and 0;
ly-mariia 99c9bb3
- add comment;
ly-mariia bd0cb46
Revert bug-fixing unrelated style changes
cslzchen 346e938
Merge branch 'feature/ENG-5637' into feature/python-upgrade
cslzchen 8a63f48
bumped ci to 3.11
opaduchak 1f27a1d
bumped ci to 3.12
opaduchak c9f238f
bumped pre-commit to reset cache on ci
opaduchak 1596fb6
bumped python to 3.11 in pre-commit
opaduchak 61e691e
removed asynctest
opaduchak ac127bb
ported fixes from 3.11 branch
opaduchak e298b78
got rid of distutils
opaduchak cabc19b
fixed inspect
opaduchak 0f4ede1
fixed setuptools
opaduchak 6de1b09
removed old setuptools from requirements
opaduchak 20ee6ad
fixed pre-commit hooks
opaduchak f4cfef3
removed boto in favour of boto3
opaduchak bdae661
fixed test containing invalid import
opaduchak 4969554
fixed mongodb for live edit, fixed using called-with which was remove…
opaduchak 512c869
fixed leftover usage of called_with which was removed in python 3.12
opaduchak c48db62
marked called_with tests as broken
opaduchak 7760369
fixed docker-compose, fixed called_with for tests that do pass
opaduchak 44b14b1
fixed two more develop tests, removed skips related to already broken…
opaduchak 3b2ca45
removed leftover comments, enforced python compile success, added pac…
opaduchak 492d249
fixed comments
opaduchak a8ce147
removed comment as for Longze's suggestions
opaduchak a3303b5
Merge branch 'ENG-5646-3.12' into feature/python-upgrade
cslzchen f0fa6aa
fixed requirements for python 3.12
opaduchak 0a9e458
Merge branch 'feature/fix-py3.12-compile' into feature/python-upgrade
felliott e605d6d
fixed portion of previously broken tests
opaduchak e9e1d10
Merge branch 'ENG-5696' into feature/python-upgrade
cslzchen b3bb6a7
fixed osf_tests/test_archiver.py::TestArchiverTasks.test_archive_addo…
opaduchak 87665ed
fixed tests related to archive_node for osf_storage and dropbox
opaduchak bff0512
Merge branch 'feature/fix-archiver-tests' into feature/python-upgrade
felliott 23da4f4
fixed test_GET_approve_with_valid_token_redirects: for token_action c…
opaduchak 744eab2
Merge branch 'feature/fix-token-redirects' into feature/python-upgrade
felliott 8c20bb7
fixed s3 failures when setting up addon (not when browsing files)
opaduchak f7aeefe
Merge branch 'feature/s3-setup-fix' into feature/python-upgrade
felliott 2f0226c
fixed box addon setup
opaduchak 9a3554f
removed state as it wasn't needed
opaduchak 64cf539
Merge branch 'feature/box-client-fix' into feature/python-upgrade
felliott 353c536
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott 26e7b9d
i forgot to flake
felliott 6a08399
Merge branch 'feature/shame-on-me' into feature/python-upgrade
felliott 8331d96
switch to poetry for dep management
opaduchak af0b559
Merge branch 'feature/poetry' into feature/python-upgrade
felliott 11190f0
remove unused files
felliott 9a88b30
Merge branch 'feature/remove-obsolete-file' into feature/python-upgrade
felliott 1458262
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott f43096f
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott b013d7b
fixed project metrics not being collected
opaduchak 7b4126b
modernized if statement
opaduchak f47ed16
Merge branch 'feature/fix-metrics' into feature/python-upgrade
felliott 8047519
fork admin's django-webpack-loader dep
felliott da49c86
Merge branch 'feature/fix-admin-pin-djwl' into feature/python-upgrade
felliott bcbffde
responding to python-upgrade cr
felliott eb2badf
Merge branch 'feature/python-upgrade-cr' into feature/python-upgrade
felliott c4b6463
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott efed3c9
New django 4.2 migrations
felliott a1d6de5
Merge branch 'feature/dj4.2-migrations' into feature/python-upgrade
felliott 3863fa9
fix sendgrid module usage
felliott 6b32642
Merge branch 'feature/unbreak-sendgrid' into feature/python-upgrade
felliott 12d1db4
remove celery setup_security()
felliott f9c4dae
Merge branch 'feature/celery-config' into feature/python-upgrade
felliott 12e28b1
remove obsolete gevent monkeypatches
felliott 635dff4
Merge branch 'feature/remove-gevent-monkeypatch' into feature/python-…
felliott 11b62d4
manually init newrelic, since newrelic-admin is bork
felliott f8f1e1e
update celery's max-tasks-per-child arg
felliott c285ed4
Merge branch 'feature/no-newrelic-admin' into feature/python-upgrade
felliott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Generate Report' | ||
description: 'Generate test report from junit xml file' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Generate Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
name: ${{github.job}} REPORT # Name of the check run which will be created | ||
path: report.xml # Path to test results | ||
reporter: java-junit # Format of test results | ||
max-annotations: 49 | ||
list-tests: failed | ||
list-suites: failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
default_language_version: | ||
python: python3.6 | ||
python: python3.12 | ||
repos: | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v0.7.0 | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
# TODO: Remove this line. For now, we only format the api/ directory | ||
files: ^api/ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v1.4.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: double-quote-string-fixer | ||
- id: trailing-whitespace | ||
exclude: "^(website/static/vendor/|osf/metadata/definitions/.*\\.xsd)" | ||
- id: flake8 | ||
additional_dependencies: ["flake8==3.6.0", "flake8-mutable==1.2.0"] | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '7.0.0' # pick a git hash / tag to point to | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: ["flake8-mutable==1.2.0"] | ||
- repo: https://github.com/pre-commit/mirrors-jshint | ||
rev: v2.9.6 | ||
rev: v2.13.6 | ||
hooks: | ||
- id: jshint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.12?
Also, since we're using GHA in favor of TCI, this file could probably be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be covered by Phase X ticket: https://openscience.atlassian.net/browse/ENG-5753