Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: TAG 2021/22 Winter Sprint
    • Fix Version/s: None
    • Component/s: OIOIOI
    • Labels:
      None
    • Sprint:
      TAG 2021/22 Summer Sprint 1

      Description

      Wsparcie do 2.2 kończy się 2022-04-01.
      Obecna wersja LTS to 3.2.

      Release notes 3.2:
      - https://docs.djangoproject.com/en/3.2/releases/3.2/

      Wersja minimalna: to rozpoznanie niekomatybilności i dokładne oszacowanie złożoności migracji

      Przydatne linki:
      - https://theorangeone.net/posts/django-32/

      Dodatkowy problem, który trzeba będzie rozwiązać to upgrade wersji Pythona na maszynie ripper.
      Obecnie do testów w Hudson używany jest Python 3.5 a Django 3.2 wymaga Pythona 3.6 lub lepszego.
      (być może da się wykorzystać ~/.pyenv/versions/3.7.10/bin/python)

        Activity

        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 1
        https://gerrit.sio2project.mimuw.edu.pl/3810

        SIO-2462 (wersja robocza)

        Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/3810 SIO-2462 (wersja robocza) Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 2
        https://gerrit.sio2project.mimuw.edu.pl/3810

        SIO-2462 Django upgrade to 3.0 (wersja robocza)

        Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 2 https://gerrit.sio2project.mimuw.edu.pl/3810 SIO-2462 Django upgrade to 3.0 (wersja robocza) Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 3
        https://gerrit.sio2project.mimuw.edu.pl/3810

        SIO-2462 Django upgrade to 3.0 (wersja robocza)

        Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 3 https://gerrit.sio2project.mimuw.edu.pl/3810 SIO-2462 Django upgrade to 3.0 (wersja robocza) Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Hide
        Mieszko Grodzicki added a comment -
        Zmiany, które wprowadziłem w https://gerrit.sio2project.mimuw.edu.pl/#/c/3810/ :
        1. Zastąpienie ugettext, ugettext_lazy,... (deprecated od 3.0) przez gettext, gettext_lazy,... - te pierwsze to tylko aliasy na drugie.
        2. Zastąpienie django.conf.urls.url (deprecated od 3.1), django.conf.urls.include przez django.urls.re_path, django.urls.include - znowu, te pierwsze to tylko aliasy na drugie.
        3. Zastąpienie force_text (deprecated od 3.0) przez force_str - tutaj uwaga: ich zachowanie jest identyczne w Pythonie 3, ale różne w Pythonie 2. Jeżeli nie chcielibyśmy na razie rezygnować z Pythona 2, to trzeba przyjrzeć się temu dokładniej.
        4. Zastąpienie request.is_ajax() (deprecated od 3.1) przez request.headers.get('x-requested-with') == 'XMLHttpRequest' - było to niezbędne w 4 miejscach - może warto byłoby zrobić pomocniczą funkcję?
        5. W testach sprawdzających, czy strona zawiera apostrof, zastąpienie wyszukiwanego "'" przez "'" - czy to najlepszy sposób? Może można te testy zrobić mądrzej?
        6. Zastąpienie is_safe_url przez url_has_allowed_host_and_scheme - zmieniono nazwę w 3.0.
        7. Zastąpienie "from django.utils import six" (deprecated od 3.0) w pliku problems/problem_site.py przez "import six".
        Show
        Mieszko Grodzicki added a comment - Zmiany, które wprowadziłem w https://gerrit.sio2project.mimuw.edu.pl/#/c/3810/ : 1. Zastąpienie ugettext, ugettext_lazy,... (deprecated od 3.0) przez gettext, gettext_lazy,... - te pierwsze to tylko aliasy na drugie. 2. Zastąpienie django.conf.urls.url (deprecated od 3.1), django.conf.urls.include przez django.urls.re_path, django.urls.include - znowu, te pierwsze to tylko aliasy na drugie. 3. Zastąpienie force_text (deprecated od 3.0) przez force_str - tutaj uwaga: ich zachowanie jest identyczne w Pythonie 3, ale różne w Pythonie 2. Jeżeli nie chcielibyśmy na razie rezygnować z Pythona 2, to trzeba przyjrzeć się temu dokładniej. 4. Zastąpienie request.is_ajax() (deprecated od 3.1) przez request.headers.get('x-requested-with') == 'XMLHttpRequest' - było to niezbędne w 4 miejscach - może warto byłoby zrobić pomocniczą funkcję? 5. W testach sprawdzających, czy strona zawiera apostrof, zastąpienie wyszukiwanego "'" przez "'" - czy to najlepszy sposób? Może można te testy zrobić mądrzej? 6. Zastąpienie is_safe_url przez url_has_allowed_host_and_scheme - zmieniono nazwę w 3.0. 7. Zastąpienie "from django.utils import six" (deprecated od 3.0) w pliku problems/problem_site.py przez "import six".
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~Id0aaeee56572f534a72d88cff68e1115722068a6, patchset 1
        https://gerrit.sio2project.mimuw.edu.pl/3811

        SIO-2462 Django upgrade to 3.1

        While repairing the tests for django 2.2.26 in the ticket SIO-2484,
        dictsort:"value.order" is used. Apparently, from django 3.1 in order to
        sort elements, comparator is based on _eq_ function (there's no default
        ordering), so _eq_ func from FakeOriginInfoValue is used while performing query.

        Unfortunately, in some queries it's possible that FakeOriginInfoValue objects
        are among OriginInfoValue objects, but OriginInfoValue class doesn't have cat
        variable.

        Change-Id: Id0aaeee56572f534a72d88cff68e1115722068a6
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~Id0aaeee56572f534a72d88cff68e1115722068a6, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/3811 SIO-2462 Django upgrade to 3.1 While repairing the tests for django 2.2.26 in the ticket SIO-2484 , dictsort:"value.order" is used. Apparently, from django 3.1 in order to sort elements, comparator is based on _eq_ function (there's no default ordering), so _eq_ func from FakeOriginInfoValue is used while performing query. Unfortunately, in some queries it's possible that FakeOriginInfoValue objects are among OriginInfoValue objects, but OriginInfoValue class doesn't have cat variable. Change-Id: Id0aaeee56572f534a72d88cff68e1115722068a6
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 4
        https://gerrit.sio2project.mimuw.edu.pl/3810

        SIO-2462 Django upgrade to 3.0

        Changes:
         - Replace deprecated ugettext, ugettext_lazy, ... with gettext, gettext_lazy, etc.
         - Replace deprecated django.conf.urls.url and django.conf.urls.include aliases with django.urls.re_path, django.urls.include.
         - Replace deprecated force_text with force_str.
         - Replace removed request.is_ajax() with new is_ajax function in oioioi.base.utils.
         - Replace "'" in tests with "'" where possible and "'" in other cases.
         - Replace is_safe_url with its new name url_has_allowed_host_and_scheme.
         - Replace deprecated import of django.utils.six with just import of six.
         - Update django and django-two-factor-auth versions in setup.py.

        Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 4 https://gerrit.sio2project.mimuw.edu.pl/3810 SIO-2462 Django upgrade to 3.0 Changes:  - Replace deprecated ugettext, ugettext_lazy, ... with gettext, gettext_lazy, etc.  - Replace deprecated django.conf.urls.url and django.conf.urls.include aliases with django.urls.re_path, django.urls.include.  - Replace deprecated force_text with force_str.  - Replace removed request.is_ajax() with new is_ajax function in oioioi.base.utils.  - Replace "'" in tests with "'" where possible and "'" in other cases.  - Replace is_safe_url with its new name url_has_allowed_host_and_scheme.  - Replace deprecated import of django.utils.six with just import of six.  - Update django and django-two-factor-auth versions in setup.py. Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 5
        https://gerrit.sio2project.mimuw.edu.pl/3810

        SIO-2462 Django upgrade to 3.0

        Changes:
         - Replace deprecated ugettext, ugettext_lazy, ... with gettext, gettext_lazy, etc.
         - Replace deprecated django.conf.urls.url and django.conf.urls.include aliases with django.urls.re_path, django.urls.include.
         - Replace deprecated force_text with force_str.
         - Replace removed request.is_ajax() with new is_ajax function in oioioi.base.utils.
         - Replace "'" in tests with "'" where possible and "'" in other cases.
         - Replace is_safe_url with its new name url_has_allowed_host_and_scheme.
         - Replace deprecated import of django.utils.six with just import of six.
         - Update django and django-two-factor-auth versions in setup.py.
         - Remove redundant uses of gettext_lazy from TestPortalViews.

        Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I481b842dda635e4b64f6dc2f1a92d22db34c5541, patchset 5 https://gerrit.sio2project.mimuw.edu.pl/3810 SIO-2462 Django upgrade to 3.0 Changes:  - Replace deprecated ugettext, ugettext_lazy, ... with gettext, gettext_lazy, etc.  - Replace deprecated django.conf.urls.url and django.conf.urls.include aliases with django.urls.re_path, django.urls.include.  - Replace deprecated force_text with force_str.  - Replace removed request.is_ajax() with new is_ajax function in oioioi.base.utils.  - Replace "'" in tests with "'" where possible and "'" in other cases.  - Replace is_safe_url with its new name url_has_allowed_host_and_scheme.  - Replace deprecated import of django.utils.six with just import of six.  - Update django and django-two-factor-auth versions in setup.py.  - Remove redundant uses of gettext_lazy from TestPortalViews. Change-Id: I481b842dda635e4b64f6dc2f1a92d22db34c5541
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I856c07af5d30de3f3ed34186c1a097128dc2f42e, patchset 1
        https://gerrit.sio2project.mimuw.edu.pl/3815

        SIO-2462 Django upgrade to 3.1

        While repairing the tests for django 2.2.26 in the ticket
        SIO-2484, dictsort:"value.order" is used. Apparently,
        from django 3.1 in order to sort elements, comparator
        is based on _eq_ function (there's no default ordering),
        so _eq_ func from FakeOriginInfoValue is used while
        performing query.

        Unfortunately, in some queries it's possible that
        FakeOriginInfoValue objects are among OriginInfoValue
        objects, but OriginInfoValue class doesn't have the: cat variable.

        Change-Id: I856c07af5d30de3f3ed34186c1a097128dc2f42e
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I856c07af5d30de3f3ed34186c1a097128dc2f42e, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/3815 SIO-2462 Django upgrade to 3.1 While repairing the tests for django 2.2.26 in the ticket SIO-2484 , dictsort:"value.order" is used. Apparently, from django 3.1 in order to sort elements, comparator is based on _eq_ function (there's no default ordering), so _eq_ func from FakeOriginInfoValue is used while performing query. Unfortunately, in some queries it's possible that FakeOriginInfoValue objects are among OriginInfoValue objects, but OriginInfoValue class doesn't have the: cat variable. Change-Id: I856c07af5d30de3f3ed34186c1a097128dc2f42e
        Hide
        Gerrit Gerrit added a comment -
        Change oioioi~master~I883adb54404d1254b0ec51120d1f13a9bbc2fc45, patchset 1
        https://gerrit.sio2project.mimuw.edu.pl/3822

        SIO-2462 Django update to 3.2

        Url changed from "admin" to "admin_profile", problems with verbose_name_plural solved.

        Change-Id: I883adb54404d1254b0ec51120d1f13a9bbc2fc45
        Show
        Gerrit Gerrit added a comment - Change oioioi~master~I883adb54404d1254b0ec51120d1f13a9bbc2fc45, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/3822 SIO-2462 Django update to 3.2 Url changed from "admin" to "admin_profile", problems with verbose_name_plural solved. Change-Id: I883adb54404d1254b0ec51120d1f13a9bbc2fc45

          People

          • Assignee:
            Joanna Wojciechowska
            Reporter:
            Tomek Waleń
            TAG Developer:
            Joanna Wojciechowska
            TAG Reviewer:
            Tomasz Waleń
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile