-
Notifications
You must be signed in to change notification settings - Fork 132
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
Upgrade dependencies for Django 3.x upgrade #2230
Merged
Merged
Changes from all commits
Commits
Show all changes
240 commits
Select commit
Hold shift + click to select a range
358d95d
Upgrade dependencies for Django 3.x upgrade
ukanga f0b9185
Update basestring references
ukanga d5506bc
Switch to using six instead of future
ukanga 4f6ea56
django.utils.six - Remove usage of this vendored library or switch to…
ukanga c17da0c
Disable SPSS export in the event of an ImportError exception.
ukanga d6fd696
django.utils.decorators.available_attrs() - This function returns fun…
ukanga 914f571
Disable SPSS export in the event of an ImportError exception.
ukanga 2436bf4
Merge branch 'master' into django-3-upgrade-base
KipSigei 49dea8c
Upgrade dependencies for Django 3.x upgrade
ukanga fed5113
Update basestring references
ukanga ba64380
Switch to using six instead of future
ukanga 610c836
django.utils.six - Remove usage of this vendored library or switch to…
ukanga 3576885
Disable SPSS export in the event of an ImportError exception.
ukanga 4884d9d
django.utils.decorators.available_attrs() - This function returns fun…
ukanga 4b0333e
Disable SPSS export in the event of an ImportError exception.
ukanga a8b83b9
Update requirements/base.pip
ukanga d04ebe9
Remove xlrd package in data_dictionary.py
ukanga 3db7e19
Merge branch 'django-3-upgrade-base' of github.com:onaio/onadata into…
KipSigei 0aa473b
Remove deprecated django.db.backends.postgresql_psycopg2
KipSigei cf42e8e
Fix dataview query_iterator bug
KipSigei cef1f01
Upgrade pyxform to version 1.10.0
ukanga 02dd9c9
Remove deprecated django.contrib.postgres.fields.JSONField
KipSigei deefb2d
Remove deprecated python_2_unicode_compatible decorator
KipSigei aa5969f
Squash logger application migrations
DavisRayM 562a507
Alter JSON column field types to use `django.db.models.JSONField`
DavisRayM ea08db0
Use `JSONField` field type instead of `TextField` on the XForm model
DavisRayM ad3fe9c
Add DEFAULT_AUTO_FIELD
KipSigei 9dc886c
Merge branch 'django-3-upgrade-base' of github.com:onaio/onadata into…
KipSigei a96f8a2
Transition to using the squashed migration
DavisRayM 0ff25ea
Update migrations files to depend on the squashed migration
DavisRayM 5430b46
Restore old logger application migration files
DavisRayM e756f4c
Revert dependency changes to use 0001_initial
DavisRayM 1d4090d
Add back `replaces` attribute
DavisRayM c8ee2b3
Squash viewer app migrations
DavisRayM 31b7557
Install `jsonfield` package; Allows migrations to run on the CI
DavisRayM da3c3b3
Merge pull request #2232 from onaio/fix-ci-tests-failures
DavisRayM 6a0e6d9
Alter media_all_received col to use BooleanField
KipSigei c4f2c9f
Fix failing `query_data` test
DavisRayM e62a8fa
Fix cursor.fetchall() returning stringofied dicts
KipSigei 238335a
remove jsonfield import from migrations
ukanga f3bae6a
Fix regressions
KipSigei 934c414
Update apps/api & apps/main modules
KipSigei db12a0f
Add tblib dependency to pickle tracebacks
KipSigei dd6f831
Json load cursor dicts
KipSigei 18cc28c
Handle non existent exports
KipSigei a8eaf91
use setup-python@v3 on CI
KipSigei 9e73e2a
update CI python version to 3.9
KipSigei c3d754b
jsonfield in CI not required
ukanga c852876
Skip savReaderWriter tests
ukanga a8df483
Handle "Attribute etag_hash defined outside __init__"
ukanga 9587635
Cleanup onadata/settings module
ukanga 752fdb3
Cleanup
ukanga 8f11a51
Add lxml apt deps to CI
KipSigei 23e3d89
Cleanup
KipSigei 1d3f363
Fix deformed f-strings
KipSigei 69621ca
Upgrade to django 3 on ses & s3 requirements
KipSigei 93102a4
covert survey to json string
KipSigei 323bb63
covert survey to json string
KipSigei c741170
Update OSM XML, order changed.
ukanga 9a9314b
Use builder.create_survey_element_from_(dict|json) accordingly.
ukanga 879240d
Cleanup
ukanga 1f4bc19
Cleanup
ukanga e025903
Fix f-string syntax
ukanga 6b0280f
Fix project caching clearing
ukanga 30f960e
Fix test check string
ukanga 10e7261
Fix generate_qrcode: Rename format to image_format
ukanga 6239e30
Cleanup
ukanga 2996b71
Cleanup
ukanga b6cdd80
Skip SPSS tests
ukanga 3162a37
briefcase_viewset.py: cleanup
ukanga 578d110
renderers.py: cleanup
ukanga 8add763
filters.py: cleanup
ukanga 68926e7
batch: cleanup
ukanga 6e11628
batch: cleanup
ukanga 6ae9c95
Indicate md5 use in gravatar is not used for security'
ukanga 87130f7
Use requests library since urllib.urlopen is blacklisted
ukanga 7b22805
cleanup
ukanga 6727768
cleanup
ukanga 1120ec4
Fix xform_tags_add imports
ukanga 8c61312
Update deformed f-strings
KipSigei 640bc52
batch: cleanup
ukanga 50baa77
batch: cleanup
ukanga 4bf0ac4
batch: cleanup
ukanga 08a2ff5
batch: cleanup
ukanga b65f088
Fix: handle KeyError exception
ukanga 2ce81f7
batch: cleanup
ukanga 010c503
batch: cleanup
ukanga 2ec3ea1
batch: cleanup
ukanga a519c20
batch: cleanup
ukanga 41fbfac
Fix missing f-string format
ukanga 0b7b1c7
flake8 fixes
ukanga bd9c41a
batch: cleanup
ukanga 2eb4e70
Fix: handle DataError exceptions
ukanga 0a4e075
assertEquals is deprecated
ukanga c558ced
batch: cleanup
ukanga 039ab1a
batch: cleanup
ukanga 011bd69
batch: cleanup
ukanga 122b72f
batch: cleanup
ukanga 20f1d3b
batch: cleanup
ukanga 2d22c6b
Fixes
ukanga ebbe267
onadata.libs.utils.audit is not in use
ukanga a8cc0d5
batch: cleanup
ukanga a4268a0
export_builder.py: cleanup
ukanga ebde8e2
Fix: mock the builtin ConnectionError for connection_error test
ukanga b654103
fix: 'ExportBuilder' object has no attribute 'dd'
ukanga eb277bc
batch: cleanup
ukanga a471fee
Fix: urlopen tests to use requests mocked response.
ukanga 5fc0e66
Fixes: urlopen removal in test and setting xform.sms_id_string
ukanga 60bb1fe
Remove unused import of requests
ukanga fcff196
Handle stringified dicts
KipSigei b5dc8de
Use create_survey_element_from_(json|dict) where necessary
KipSigei 51f6a9c
Build onadata ECR image with python 3.9
KipSigei 7959c5f
Use python3-dev apt dependency
KipSigei 47d335d
Instal pyyaml in docker builds
KipSigei a4faaef
main.views: cleanup
ukanga 2e12885
main.views: cleanup fixes
ukanga 52e5a66
Add some debug statements in CI only failing test.
ukanga 9ac1b14
Use defusedxml for parsing xml in osm module
ukanga 68a40b3
Add some debug statements in CI only failing test.
ukanga d096758
Import etree via defusedxml module
ukanga d14cfa7
batch: cleanup
ukanga 12a5ba1
Use defusedxml tostring import
ukanga a8110c4
user_profile_viewset.py: cleanup
ukanga 5af578e
Add some debug statements in CI only failing test.
ukanga df87d54
batch: cleanup
ukanga bce53e2
Merge branch 'master' into django-3-upgrade-base
ukanga 3124819
batch: cleanup
ukanga d75de96
Dependecies cleanup
KipSigei fadc3d3
Remove local path to onadata repository
DavisRayM 43464c9
Use python3.9 instead of in-built python3 installation
DavisRayM 9075e79
Deprecation: staticfiles has been renamed to static
KipSigei c780e1e
Fix: [200~UnboundLocalError: local variable response_obj referenced …
ukanga d7233a4
Used 'django-upgrade --target-version 3.2'
ukanga 61da20e
Add prospector configuration file.
ukanga dbcf980
stats_serializer.py: cleanup
ukanga 8264a1a
Fix flake8 issues.
ukanga e3c2a03
Update test to set HTTP_ prefix header correctly for Django 3
ukanga 1832370
stats_serializer.py: fix super(serializers.Serializer, self) call
ukanga b6ac782
import_briefcase.py: cleanup
ukanga 736a497
xform_viewset.py: cleanup
ukanga 6ee49f3
Update test to set HTTP_ prefix header correctly for Django 3
ukanga dda1994
import.py: cleanup
ukanga 34396c3
logger/views.py: cleanup
ukanga 35c4a1b
exceptions.py: cleanup
ukanga a59cece
set_media_file_hash.py: cleanup
ukanga 0bef078
Check for None in overwrite params
ukanga 51a7de5
create_image_thumbnails.py: cleanup
ukanga 660f962
admin.py: cleanup
ukanga f76fab4
viewer/views.py: cleanup
ukanga b4af3d9
restore_backup.py: cleanup
ukanga 891fc51
project_serializer.py: cleanup
ukanga 60a7793
parsed_instance.py: cleanup
ukanga 9b7094b
xform_serializer.p: cleanup
ukanga 55e9b66
user_profile_serializer.py: cleanup
ukanga 4121813
organization_serializer.py: cleanup
ukanga c1c7ba1
chart_tools.py: cleanup
ukanga 25cfa6a
signals.py: cleanup
ukanga eed0184
change_s3_media_permissions.py: cleanup
ukanga 9f48aed
export_xforms_and_instances.py: cleanup
ukanga e7aa703
update_enketo_urls.py: cleanup
ukanga 6ea1e04
update_enketo_urls.py: cleanup
ukanga 8738fa3
main/urls.py: cleanup
ukanga f983aa4
viewer_tools.py: use defusedxml.minidom
ukanga a8fb5a0
xform_viewset.py: cleanup
ukanga 4780e46
labels_mixin.py: cleanup
ukanga 8835c1b
tools.py: cleanup
ukanga 7dba4ea
move_media_to_s3.py: cleanup
ukanga 2fcd1b4
filters.py: cleanup
ukanga 1423333
populate_osmdata_model.py: cleanup
ukanga 2504e59
osmdata.py: cleanup
ukanga ad9b1ea
tag_list_serializer.py: cleanup
ukanga 1a936f5
share_team_project_serializer.py: cleanup
ukanga 6be367f
fix: check if overwrite is a str
ukanga e2c71c5
batch: cleanup
ukanga ac0f60c
user_auth.py: cleanup
ukanga 7c56e9e
main.views: cleanup fixes
ukanga 83be5f1
get_accounts_with_duplicate_id_strings.py: cleanup
ukanga cb83775
batch: cleanup
ukanga 1f04916
Refactor create_attachments_zipfile()
ukanga 7ca8fe1
twilio.py: cleanup
ukanga 6aaccba
telerivet.py: cleanup
ukanga 0a7faae
smssync.py: cleanup
ukanga f956848
sms_support.providers: cleanup
ukanga 11ba38c
batch: cleanup
ukanga 9ff759b
batch: cleanup
ukanga b59e5de
project_cleanup.py: cleanup
ukanga a3fbf7f
factory.py: cleanup
ukanga 090feb6
share_xform.py: cleanup
ukanga 009b5cc
share_team_project.py: cleanup
ukanga e81c196
import_forms.py: cleanup
ukanga 0dff8cb
reassign_permission.py: cleanup
ukanga d269018
share_project.py: cleanup
ukanga 0cf040f
merged_xform.py: cleanup
ukanga cbd3390
clone_xform.py: cleanup
ukanga 941d291
share_xform_serializer.py: cleanup
ukanga 990e8a4
Duplicate command.
ukanga 1f40551
__init__.py cleanup
ukanga c87a51b
__init__.py cleanup
ukanga 3ffa281
signal.py: Check ASYNC_POST_SUBMISSION_PROCESSING_ENABLED
ukanga b0d9186
csv_import.py: Check if xform.json is a dict
ukanga 5ed6b01
restservice: cleanup
ukanga 793769b
Check if xform.json is a dict
ukanga 1dbbeca
Check for None value in textit rest service configuration
ukanga 9c06267
fixes: Check if xform.json is a dict
ukanga 22a40a1
sms_support: cleanup
ukanga 4e6093b
logger_tools.py: cleanup
ukanga e7f6882
logger_tools.py: Fix check for request.
ukanga 4a2fa71
logger_tools.py: Fix add DuplicateUUIDError exception for handling in…
ukanga 3ee8df8
apps/logger blackify
ukanga 76829bc
logger: cleanup
ukanga efdc717
logger: cleanup
ukanga 8b54914
import_tools.py: handle silently Http404 exception
ukanga 5445c54
Add `google-auth-oauthlib` requirement
DavisRayM 985f146
Use Flow class from `google_auth_oauthlib`
DavisRayM 6bc459c
Disable credential storage and utilize `create_flow` function
DavisRayM 25424c0
Add `google-auth` requirement
DavisRayM f9d314c
Add `CredentialsField` class
DavisRayM b7884b7
Remove unsupported `prompt` keyword arguement
DavisRayM f414cce
Remove local directory path
DavisRayM 6fc11cd
Remove oauth2client requirement
DavisRayM 524a576
Update `from_db_value` function signature
DavisRayM 4f01f78
Use correct scopes when creating flow object
DavisRayM 4b0543c
Handle storage and retrieval of OAuth2 credentials
DavisRayM de25395
Use internal `CredentialsField` class
DavisRayM 18d3a0c
Implement authorization URL best practices
DavisRayM a3583dd
Ensure credential is returned if present
DavisRayM 3f8ffb4
Code cleanup
DavisRayM 6a0927a
Format code
DavisRayM c74304b
Prompt for consent everytime we authenticate with google
DavisRayM 18ba766
Add migration to convert oauth2client.Credentials class
DavisRayM 97c2d1c
Create credentials using access token when present
DavisRayM c6d7c01
Google: cleanup
ukanga c056ee0
cleanup
ukanga 89503b1
cleanup
ukanga 1cdc204
Allow geojson file uploads
FrankApiyo c868d6f
Merge pull request #2237 from onaio/allow-geojson-file-uploads
FrankApiyo 0339ebc
Bump version to 3.0.0
KipSigei ac21106
Move test deps to tests_require
KipSigei 75fae72
Compare with lowercase export_type
ukanga fdb0fcb
Set version in __init__.py
ukanga 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ max-line-length = 88 | |
... | ||
select = C,E,F,W,B,B950 | ||
extend-ignore = E203, E501 | ||
per-file-ignores = __init__.py:F401 |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
|
@@ -82,3 +82,7 @@ tags | |
|
||
.bash_history | ||
.inputrc | ||
|
||
.eggs | ||
sonar-project.properties | ||
.scannerwork |
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,6 @@ | ||
strictness: medium | ||
doc-warnings: false | ||
test-warnings: false | ||
autodetect: true | ||
member-warnings: false | ||
max-line-length: 88 |
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
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
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,12 +1,11 @@ | ||
FROM postgres:9.6 | ||
|
||
MAINTAINER Ukang'a Dickson <[email protected]> | ||
|
||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive \ | ||
apt-get install -y postgresql-9.6-postgis-2.3 \ | ||
postgresql-9.6-postgis-script postgis \ | ||
apt-get install --no-install-recommends -y \ | ||
postgresql-9.6-postgis-2.3=2.3.1+dfsg-2+deb9u2 \ | ||
postgresql-9.6-postgis-2.3-scripts=2.3.1+dfsg-2+deb9u2 \ | ||
postgis=2.3.1+dfsg-2+deb9u2 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
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,39 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
"""API Django admin amendments.""" | ||
from django.contrib import admin | ||
|
||
from onadata.apps.api.models import Team, OrganizationProfile, TempToken | ||
|
||
|
||
class TeamAdmin(admin.ModelAdmin): | ||
# pylint: disable=too-few-public-methods | ||
class FilterSuperuserMixin: | ||
"""Filter by request user and give full access to superuser.""" | ||
|
||
def get_queryset(self, request): | ||
qs = super(TeamAdmin, self).get_queryset(request) | ||
"""Filter by request.user unless is_superuser.""" | ||
queryset = super().get_queryset(request) | ||
if request.user.is_superuser: | ||
return qs | ||
return qs.filter(user=request.user) | ||
return queryset | ||
return queryset.filter(user=request.user) | ||
|
||
|
||
admin.site.register(Team, TeamAdmin) | ||
class TeamAdmin(FilterSuperuserMixin, admin.ModelAdmin): | ||
"""Filter by request.user unless is_superuser.""" | ||
|
||
|
||
class OrganizationProfileAdmin(admin.ModelAdmin): | ||
admin.site.register(Team, TeamAdmin) | ||
|
||
def get_queryset(self, request): | ||
qs = super(OrganizationProfileAdmin, self).get_queryset(request) | ||
if request.user.is_superuser: | ||
return qs | ||
return qs.filter(user=request.user) | ||
|
||
class OrganizationProfileAdmin(FilterSuperuserMixin, admin.ModelAdmin): | ||
"""Filter by request.user unless is_superuser.""" | ||
|
||
admin.site.register(OrganizationProfile, OrganizationProfileAdmin) | ||
|
||
admin.site.register(OrganizationProfile, OrganizationProfileAdmin) | ||
|
||
class TempTokenProfileAdmin(admin.ModelAdmin): | ||
|
||
def get_queryset(self, request): | ||
qs = super(TempTokenProfileAdmin, self).get_queryset(request) | ||
if request.user.is_superuser: | ||
return qs | ||
return qs.filter(user=request.user) | ||
class TempTokenProfileAdmin(FilterSuperuserMixin, admin.ModelAdmin): | ||
"""Filter by request.user unless is_superuser.""" | ||
|
||
|
||
admin.site.register(TempToken, TempTokenProfileAdmin) |
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.
we might not need the
__future__
import