[Django] #27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)

10 views
Skip to first unread message

Django

unread,
Jan 3, 2017, 4:33:55 PM1/3/17
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
------------------------------------------------+--------------------------
Reporter: Ed Morley | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Packaging | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+--------------------------
There are several optional Django features that require third-party Python
packages that (intentionally) aren't specified as `install_requires`
dependencies in setup.py, since not everyone would want them installed.

For example:
* PyYAML for the yaml serializer
* sqlparse for multi-line SQL statements for migrations `RunSQL`
* Database drivers

Adding these as `extras_require` [*] entries has the following advantages:

1) The reason for the packages is now self-documenting. eg:
{{{
Django[sqlparse,yaml]
}}}
...instead of:
{{{
Django

# Required by Django's migration system for RunSQL commands.
sqlparse

# Required by Django's YAML serializer.
PyYAML
}}}

2) Django could in the future manage the preferred package for a
particular feature in cases where there is a choice (eg mysqlclient vs
MySQL-python). Users can still override by not using the `extras_require`
alias (or there could even be multiple aliases).

3) If a new major version of Django stops requiring a particular
`extras_require` dependency, users will know to remove it from their
requirements files, since pip will warn there is no such extra listed.


[*] http://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-
extras-optional-features-with-their-own-dependencies

--
Ticket URL: <https://code.djangoproject.com/ticket/27682>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 3, 2017, 4:34:36 PM1/3/17
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
-------------------------------------+-------------------------------------
Reporter: Ed Morley | Owner: Ed Morley
Type: | Status: assigned
Cleanup/optimization |
Component: Packaging | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ed Morley):

* owner: nobody => Ed Morley


--
Ticket URL: <https://code.djangoproject.com/ticket/27682#comment:1>

Django

unread,
Jan 3, 2017, 5:05:54 PM1/3/17
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
-------------------------------------+-------------------------------------
Reporter: Ed Morley | Owner: Ed Morley
Type: | Status: assigned
Cleanup/optimization |
Component: Packaging | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Josh Smeaton):

I think I like this idea, but it's probably a change sufficient enough to
bring up on the mailing list https://groups.google.com/forum/#!forum
/django-developers

--
Ticket URL: <https://code.djangoproject.com/ticket/27682#comment:2>

Django

unread,
Jan 4, 2017, 9:48:49 AM1/4/17
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
-------------------------------------+-------------------------------------
Reporter: Ed Morley | Owner: Ed Morley
Type: | Status: assigned
Cleanup/optimization |
Component: Packaging | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Someday/Maybe


--
Ticket URL: <https://code.djangoproject.com/ticket/27682#comment:3>

Django

unread,
Jun 13, 2017, 3:16:02 PM6/13/17
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
-------------------------------------+-------------------------------------
Reporter: Ed Morley | Owner: Ed Morley
Type: | Status: assigned
Cleanup/optimization |
Component: Packaging | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Connor Osborn):

* cc: cdosborn@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27682#comment:4>

Django

unread,
Feb 12, 2018, 5:30:41 AM2/12/18
to django-...@googlegroups.com
#27682: Add more dependencies to extras_require (eg sqlparse, PyYAML)
-------------------------------------+-------------------------------------
Reporter: Ed Morley | Owner: Ed Morley
Type: | Status: closed
Cleanup/optimization |
Component: Packaging | Version: master
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: assigned => closed
* resolution: => duplicate


Comment:

I'm going to resolve this as a duplicate of #28905. Whilst this issue was
prior, #28905 is further along. (It has a PR)

--
Ticket URL: <https://code.djangoproject.com/ticket/27682#comment:5>

Reply all
Reply to author
Forward
0 new messages