Upgrade to Django 2.2. #1830
Upgrade to Django 2.2. #1830
Conversation
580250d
to
d302197
@berinhard @ewdurbin I have no idea the cause of this error. https://app.travis-ci.com/github/python/pythondotorg/builds/234219521#L1327-L1429 |
@luzfcb thanks again for opening such an important PR. I noticed that there are 3 tests failing but I didn't have the opportunity to run then locally to investigate the problem. As soon as I finish with other priorities, I'll investigate them. If you want to pair on them, I'll be happy to do so. I'm usually available during morning time. |
xhtml2pdf==0.2.5 | ||
django-easy-pdf==0.1.1 | ||
django-easy-pdf@https://github.com/labcodes/django-easy-pdf/archive/60f2a70a056655d271a215ceded57f97ffaa4fea.zip |
luzfcb
Aug 10, 2021
Author
Is only this change:
labcodes/django-easy-pdf@60f2a70
Was required to replace
from django.utils.six import BytesIO
by
from io import BytesIO
because the django.utils.six
is deprecated.
Anyway, django-easy-pdf seems unmaintained project
@berinhard I updated the description, made some requested changes, and rebased with the main branch. Can review again? |
I created a separate pull-request for this issue #1839 |
0ba20dc
to
7785b5d
Update dependencies for django 2.2 compatibility
|
||
{% elif URL_NAME %} | ||
{% sitetree_tree from URL_NAME template "sitetree/sidebar_menu_root.html" %} | ||
{% endif %} |
luzfcb
Aug 21, 2021
Author
In theory, this makes the 3 tests start to pass
https://app.travis-ci.com/github/python/pythondotorg/builds/235762782#L1343-L1648
I'm not sure this is the correct way to fix this.
Anyway, thanks @lucianoratamero for helping me debug this error.
@berinhard @ewdurbin this pull request is ready for review. |
Fix #1819
env_sample
file with the environment variables that is available to use. If a file named.env
exists on the project root path, the python-decouple will read. Note: Environment variables have precedence over the python-decouple config files.apps.py
files for all modules that have migrations, template tags, or management commandspath()
orre_path()
instead ofurl()
gettext_lazy
instead ofugettext_lazy
filter_fields
tofilterset_fields
andfilter_class
tofilterset_class
to be compatible with the new version of django-filterW605 invalid escape sequence \
in events/tests/test_importer.py (related to https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior)url_name
function shadowing on pydotorg/context_processors.pyFORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
topydotorg/settings/base.py
obj=None
argument onsponsors.admin.SponsorBenefitInline.has_add_permission
methodbase_name
tobasename
onpydotorg/urls_api.py
to be compatible with the new version of django-restframeworkadded_by_user
field ofSponsorBenefit
model that that Django <=2.0 cannot detect. This migration only includesblank=True
in the migration and does not touch the database, which means do NOT generate SQL.static
templatetag instead ofadmin_static
.static
templatetag instead ofstaticfiles
.NullBooleanField()
byBooleanField(null=True)
. Note: The migration will not generate an SQL. Django 2.1 release notes recommend this change but only in Django 3.1NullBooleanField
is effectively marked as deprecated.BytesIO
fromio
and not fromsix
TODO:
Django 3.2 TODO:
Note: The code as it is in this pull-request is already capable of running the test suite with Django 3.2
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
topydotorg/settings/base.py
to avoid unwanted migrationsfrom django.contrib.postgres.fields import JSONField
byfrom django.db.models import JSONField
oncommunity/models.py
and deal with the migrations.default_app_config
variable from all__init__.py
files of all apps.Note:
Since there are many changes, I will redo the commits and break them down into smaller changes. (or maybe create multiple pull-requests)