#20915: Remove django.test.client dependency on django.contrib.auth (and
.sessions?)
-------------------------------------+-------------------------------------
Reporter: ramiro | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Testing framework | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ramiro):
Replying to [comment:1 mjtamlyn]:
> What would be the proposed solution here? The client should ideally
retain the ability to do most of these things. Unless I'm mistaken,
`contrib.auth` does not need to be installed for the client to function
properly for general requests. I guess these are "optional" features of
the client which are enabled when contrib.auth is available. It would be
pretty awkward if you had to customise the client every time you wanted to
use this functionality.
>
> Obviously if the general functionality of the client doesn't work
without `auth` then we have a problem we should fix. It may also be worth
considering providing an 'auth-less' version of the test client.
I opened the ticket without initially without any solution in mind, just
presenting the "issue". Mainly a place holder to possibly opening a
django-dev discussion about if this is something worth changing in order
to be able to say 'Django core (or non-contrib) has no deps on
django.contrib'
Later, once I looked at the code a bit, second reason was to have an
anchor to associate a PR (see below).
--
Ticket URL: <https://code.djangoproject.com/ticket/20915#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.72aa3d92c11f696b5b1fd06ee951d1a4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.