Skip to content
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

django-extensions: 2.1.4 -> 2.2.1 #68004

Closed
wants to merge 1 commit into from

Conversation

B4dM4n
Copy link
Contributor

@B4dM4n B4dM4n commented Sep 3, 2019

This updates django-extensions to version 2.2.1, which also fixes the pytest5 build failures.

The pipchecker tests all try to execute pip inside the sandbox with either specific version requirements or a git+https repository and are therefore removed because they fail.

nix-review shows two failed pkgs that depend on django-extensions (python3.7-django-q-1.0.1 and python3.7-HyperKitty-1.2.2). They seem to fail due to pytest5 incompatibility.

Motivation for this change

The django-extensions build is currently failing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

@risicle
Copy link
Contributor

risicle commented Sep 7, 2019

On macos 10.13:

=================================== FAILURES ===================================
___________________________ test_with_template_dirs ____________________________

capsys = <_pytest.capture.CaptureFixture object at 0x10b960810>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x10b960b50>
tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0...50>, _basetemp=PosixPath('/private/tmp/nix-build-python3.7-django-extensions-2.2.1.drv-0/pytest-of-nixbld1/pytest-0')))

    def test_with_template_dirs(capsys, settings, tmpdir_factory):
        templates_dirs_path = tmpdir_factory.getbasetemp().strpath
        template_path = os.path.join(templates_dirs_path, 'fixme.html')
        settings.TEMPLATES[0]['DIRS'] = [templates_dirs_path]
        with open(template_path, 'w') as f:
            f.write('''{# FIXME This is a comment. #}
    {# TODO Do not show this. #}''')

        call_command('notes', '--tag=FIXME')
        out, err = capsys.readouterr()

>       assert '{}:\n  * [  1] FIXME This is a comment.'.format(template_path) in out
E       AssertionError: assert '/private/tmp/nix-build-python3.7-django-extensions-2.2.1.drv-0/pytest-of-nixbld1/pytest-0/fixme.html:\n  * [  1] FIXME This is a comment.' in '/private/tmp/nix-build-python3.7-django-extensions-2.2.1.drv-0/source/django_extensions/admin/__init__.py:\n  * [121]...s/management/jobs.py:\n  * [107] FIXME HACK: make sure the project dir is on the path when executed as ./manage.py\n\n'
E        +  where '/private/tmp/nix-build-python3.7-django-extensions-2.2.1.drv-0/pytest-of-nixbld1/pytest-0/fixme.html:\n  * [  1] FIXME This is a comment.' = <built-in method format of str object at 0x109ecdbd0>('/private/tmp/nix-build-python3.7-django-extensions-2.2.1.drv-0/pytest-of-nixbld1/pytest-0/fixme.html')
E        +    where <built-in method format of str object at 0x109ecdbd0> = '{}:\n  * [  1] FIXME This is a comment.'.format

tests/management/commands/test_notes.py:34: AssertionError

seems confused about its working dir etc.

@B4dM4n
Copy link
Contributor Author

B4dM4n commented Sep 9, 2019

@risicle I could reproduce the issue building this on macOS.

One test required localhost networking and an another issue is now reported upstream:
django-extensions/django-extensions#1417

I included the proposed upstream patch in this PR to fix the test failure.

@risicle
Copy link
Contributor

risicle commented Sep 9, 2019

Neat! Afraid I can't test myself till the weekend but you seem to have it under control.

@B4dM4n
Copy link
Contributor Author

B4dM4n commented Sep 10, 2019

The upstream patch is already merged, so I replaced the file with a fetchpatch.

@lheckemann lheckemann added this to the 19.09 milestone Sep 10, 2019
@FRidh
Copy link
Member

FRidh commented Sep 10, 2019

please rebase and test again

@B4dM4n B4dM4n force-pushed the django-extensions-pytest5 branch 2 times, most recently from 9c7fbd0 to c821a6a Compare September 10, 2019 20:29
@B4dM4n
Copy link
Contributor Author

B4dM4n commented Sep 10, 2019

Rebase is done.

Only paperless is failing now as it was before.

@disassembler
Copy link
Member

@FRidh can this be merged and cherry picked into release now?

@B4dM4n
Copy link
Contributor Author

B4dM4n commented Nov 4, 2019

Closing as superseded by #72632

@B4dM4n B4dM4n closed this Nov 4, 2019
@B4dM4n B4dM4n deleted the django-extensions-pytest5 branch November 4, 2019 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants