Bug 227319 - [NEW PORT] www/py-djangorestframework38: Django REST framework - 3.8.x branch
Summary: [NEW PORT] www/py-djangorestframework38: Django REST framework - 3.8.x branch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL: https://pypi.python.org/pypi/djangore...
Keywords:
Depends on:
Blocks: 227344
  Show dependency treegraph
 
Reported: 2018-04-06 11:55 UTC by Kai Knoblich
Modified: 2018-05-21 16:24 UTC (History)
3 users (show)

See Also:


Attachments
py-djangorestframework38.shar (2.53 KB, text/plain)
2018-04-06 11:55 UTC, Kai Knoblich
no flags Details
adds new DRF and moves old DRF - version 1 (5.83 KB, patch)
2018-04-06 14:05 UTC, Kai Knoblich
no flags Details | Diff
adds new DRF and moves old DRF - version 2 (5.24 KB, patch)
2018-04-16 20:46 UTC, Kai Knoblich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Knoblich freebsd_committer 2018-04-06 11:55:53 UTC
Created attachment 192282 [details]
py-djangorestframework38.shar

Hello,

attached is the shar file of the Python package py-djangorestframework38, the 3.8.x branch of the Django REST framework.

Normally I would have sent a patch to update the existing www/py-djangorestframework port from 3.6.4 to v3.8.1 but this would break ports that depends on Django v1.8 (see also: https://svnweb.freebsd.org/ports?view=revision&revision=457543).

At the moment only three ports depends on www/py-djangorestframework:

- www/seahub (depends on Django 1.8 at the moment, no support for Django 1.11 from upstream)
- www/py-django-filter (works for Django v1.8+)
- www/py-django-rest-swagger (works for Django v1.8+)


There might be two approaches to add the latest Django REST framework to the ports tree:

Option A (easiest, but might not be the preferred method, I assume):
- create the www/py-djangorestframework38 port with the attached shar file
- Django v1.11+ ports will use then the newly created port

Option B (more work required, but the outcome might be better):
- rename www/py-djangorestframework to www/py-djangorestframework36
- create then the Django REST framework v3.8.1 as www/py-djangorestframework  
- set the dependencies of the of three ports listed above accordingly


QA (for option A as described above):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- poudriere (11.1-RELEASE amd64 + i386) for each py27 and py36 flavor -> OK
- portlint -> OK


Please let me know, which method will suit best for the ports tree. I would supply further patches if required.
Comment 1 Antoine Brodin freebsd_committer 2018-04-06 11:58:42 UTC
(In reply to Kai from comment #0)
I would opt for option B,  since there will probably be version 4.0, 4.1 etc.
Comment 2 Sunpoet Po-Chuan Hsieh freebsd_committer 2018-04-06 11:59:28 UTC
I vote for option B.
Comment 3 Kai Knoblich freebsd_committer 2018-04-06 14:05:24 UTC
Created attachment 192288 [details]
adds new DRF and moves old DRF - version 1

Thank you for your feedback. I created a patch for option B that does following:

- copy www/py-djangorestframework to www/py-djangorestframework36
- add new www/py-djangorestframework (v3.8.1)
- modify dependencies for ports www/py-django-annotations and www/seahub

QA:
~~~
- poudriere (11.1-RELEASE amd64 + i386) for each py27 and py36 flavor -> OK
Comment 4 Kai Knoblich freebsd_committer 2018-04-16 20:46:36 UTC
Created attachment 192570 [details]
adds new DRF and moves old DRF - version 2

Meanwhile the Django REST Framework has been updated to 3.8.2 and the PORTREVISION of www/seahub has increased. 

The revised patch supplies the new DRF version (with some optional dependencies removed) and sets the PORTREVISION for seahub accordingly. 

The rest is the same as in v1 of the now obsoleted patch.

QA:
~~~
- poudriere (11.1-RELEASE amd64 + i386) for each py27 and py36 flavor -> OK
Comment 5 Kurt Jaeger freebsd_committer 2018-04-17 17:50:28 UTC
testbuilds@work
Comment 6 Kurt Jaeger freebsd_committer 2018-04-17 19:25:46 UTC
Committed, thanks. I'll keep it open for a few days in case some problem pops up.
Comment 7 commit-hook freebsd_committer 2018-04-17 19:26:09 UTC
A commit references this bug:

Author: pi
Date: Tue Apr 17 19:25:06 UTC 2018
New revision: 467652
URL: https://svnweb.freebsd.org/changeset/ports/467652

Log:
  New port: www/py-djangorestframework as version 3.8.x

  - py-djangorestframework 3.6.x lives on as py-djangorestframework36
  - seahub and django-annotations stay on -36

  PR:		227319
  Submitted by:	Kai <freebsd_ports@k-worx.org>
  Reviewed by:	antoine, sunpoet

Changes:
  head/www/Makefile
  head/www/py-django-annotations/Makefile
  head/www/py-djangorestframework/Makefile
  head/www/py-djangorestframework/distinfo
  head/www/py-djangorestframework/pkg-descr
  head/www/py-djangorestframework36/
  head/www/py-djangorestframework36/Makefile
  head/www/seahub/Makefile
Comment 8 Kai Knoblich freebsd_committer 2018-04-17 20:04:38 UTC
(In reply to Kurt Jaeger from comment #6)

Thank you very much for committing this small but rather extensive patch. Thanks also to antoine and sunpoet for the feedback that led to this diff.

Well, let's see and wait what will happen in the next few days then.
Comment 9 rozhuk.im 2018-04-25 11:47:08 UTC
This update brokes www/py-django18
restframework fail to import django.urls, prev was django.conf.urls, also functions names changed in urls.
Comment 10 rozhuk.im 2018-04-25 12:13:21 UTC
Switch to www/py-djangorestframework36 fix issue with import urls
Comment 11 Kai Knoblich freebsd_committer 2018-04-25 12:22:46 UTC
(In reply to rozhuk.im from comment #10)

That was expected because the latest version of DRF is no longer compatible with Django v1.8. Thus the previous version (v3.6.4) has been repo-copied to www/py-djangorestframework36 for backward compatibility.

Edit: 
Mid air collision while I was trying to send my comment. You were faster and found it out yourself. :-)
Comment 12 Kurt Jaeger freebsd_committer 2018-05-07 09:45:51 UTC
(In reply to rozhuk.im from comment #10)

I'm in no way familiar with django, please explain ?

django18 does not depend on djangorestframework ? How would a patch look like to fix the broken django18 ?
Comment 13 rozhuk.im 2018-05-07 19:33:05 UTC
(In reply to Kurt Jaeger from comment #12)

We have some product with web GUI based on django 1.8 and some set of additional staff, like py-djangorestframework.
I am not python dev so I know nothing, but django 1.8 and py-djangorestframework38 incompatible.

Ask Kai, looks like he can tell you more details.
Comment 14 Kai Knoblich freebsd_committer 2018-05-07 20:09:46 UTC
(In reply to rozhuk.im from comment #13)

Hello Rozhuk,

that's right as already stated in comment #11. Django v1.8 is not compatible with DRF v3.8.x and thus Django v1.8 systems must use the www/py-djangorestframework36 port.

Are there any issues still open in your Django v1.8 environment or have you already solved your initial reported problem by switching from www/py-djangorestframework to www/py-djangorestframework36 ?
Comment 15 rozhuk.im 2018-05-07 22:26:26 UTC
(In reply to Kai from comment #14)

We are switch www/py-djangorestframework36 and no problem.
Comment 16 Martin Wilke freebsd_committer 2018-05-21 16:24:16 UTC
Close, this has been sorted.