Bug 1581753

Summary: python-django FTBFS on Python 3.7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-djangoAssignee: Matthias Runge <mrunge>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, jakub.dornak, jal233, mhroncok, michel, mrunge, sgallagh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-11 08:55:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1565020    
Attachments:
Description Flags
build.log from copr none

Description Miro Hrončok 2018-05-23 14:52:28 UTC
Django tests fails on Python 3.7:

======================================================================
ERROR: test_load_empty_dir (migrations.test_loader.LoaderTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Django-2.0.5/tests/migrations/test_loader.py", line 173, in test_load_empty_dir
    loader = MigrationLoader(connection)
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 200, in build_graph
    self.load_disk()
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 99, in load_disk
    directory = os.path.dirname(module.__file__)
  File "/usr/lib64/python3.7/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
======================================================================
ERROR: test_makemigrations_no_init (migrations.test_commands.MakeMigrationsTests)
Migration directories without an __init__.py file are allowed.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Django-2.0.5/tests/migrations/test_commands.py", line 860, in test_makemigrations_no_init
    call_command('makemigrations', stdout=out)
  File "/builddir/build/BUILD/Django-2.0.5/django/core/management/__init__.py", line 141, in call_command
    return command.execute(*args, **defaults)
  File "/builddir/build/BUILD/Django-2.0.5/django/core/management/base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "/builddir/build/BUILD/Django-2.0.5/django/core/management/commands/makemigrations.py", line 78, in handle
    loader = MigrationLoader(None, ignore_no_migrations=True)
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 200, in build_graph
    self.load_disk()
  File "/builddir/build/BUILD/Django-2.0.5/django/db/migrations/loader.py", line 99, in load_disk
    directory = os.path.dirname(module.__file__)
  File "/usr/lib64/python3.7/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
----------------------------------------------------------------------

Version-Release number of selected component: 2.0.5-1.fc29


This one is fixed in https://github.com/django/django/commit/0f0a07ac278dc2be6da81e519188f77e2a2a00cf

3.7 support for Django is tracked in https://code.djangoproject.com/ticket/28814

Comment 1 Matthias Runge 2018-05-29 09:26:59 UTC
Thank you for the report. I would prefer to wait with a rebuild, until a next django version was released. The upstream ticket is still in a "unknown state".

Comment 2 Miro Hrončok 2018-05-29 12:12:28 UTC
There are still other packages blocking Python 3.7. But once those are unblocked, we will need to proceed. This still happens in Copr only so far, but I'd like to continue in Fedora once 3.7.0rc1 is released and important packages are unblocked.

That said, we can wait for now, but when the time comes, we will need to apply the patch anyway

Django 2.1 should be released ~August 1. That's a bit too late (mass rebuild happens 1 month earlier).

Comment 3 Matthias Runge 2018-06-04 10:29:51 UTC
Django just built. I guess, we can close this bug? 

https://koji.fedoraproject.org/koji/buildinfo?buildID=1088523

Comment 4 Miro Hrončok 2018-06-04 11:10:30 UTC
That's still 3.6. I can recheck on 3.7.

Comment 5 Miro Hrončok 2018-06-04 12:07:35 UTC
Created attachment 1447407 [details]
build.log from copr

Still FTFBS.

Comment 6 Miro Hrončok 2018-06-08 10:39:23 UTC
3.7.0c1 is expected in 3 days (2018-06-11, [1]). I'd like to start building stuff in a side tag soon after that. I think we need to patch it.


[1] https://www.python.org/dev/peps/pep-0537/

Comment 7 Miro Hrončok 2018-06-08 19:06:25 UTC
https://src.fedoraproject.org/rpms/python-django/pull-request/6

I don't need a rebuild or release bump.