Re: Vendoring multipledispatch
Hi, > Anyway as long as Django is installed in a virtualenv this shouldn't be > too much of an issue, but I think we should expect some issues from the > users and these should be documented otherwise people might get > frustrated. It can still be an issue for things that share the same virtualenv with Django, i.e. Django apps and projects. Any library that Django depends on imposes a restriction on which version of this library user code can use. For example, if Django requires `requests>=2.9,<3.0`, this means that Django-based apps and projects cannot use requests 3.0+ in their code (at least not easily). For this reason, I believe that Django should be very conservative about introducing new dependencies, but maybe not outrule them completely. -- René -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1793582.LYRaI3gUmN%40rex. For more options, visit https://groups.google.com/d/optout.
Re: A helpful ImportError for manage.py when Django isn't installed/available
I implemented Shai's suggestion here: https://github.com/django/django/pull/6438 I think we can drop that extra complication when dropping Python 2. On Friday, April 1, 2016 at 6:23:55 AM UTC-4, Shai Berger wrote: > > An idea: Catch the exception; in the handler, try to simply "import > django". > If this works, reraise, if it fails, print helpful message. > > On Thursday 31 March 2016 20:15:05 Tim Graham wrote: > > Ben Welsh (palewire) raised a proposal on a GitHub pull request [0]: > > > > I've seen newbies flounder when they receive this error after running > > manage.py. > > > > $ python manage.py > > Traceback (most recent call last): > > File "manage.py", line 7, in > > from django.core.management import execute_from_command_line > > ImportError: No module named django.core.management > > > > The root cause is almost always simple, like forgetting install Django > with > > pip or neglecting to "activate" a virtual environment. But the Python > > jargon doesn't do much to help people new to our world connect the dots. > > > > My proposal: Catch that error and print out a more verbose message that > > explains to the user exactly what's wrong. Here's my draft. I'd welcome > any > > changes, but I think something along these lines could better welcome > new > > people into Django. > > > > Traceback (most recent call last): > > File "manage.py", line 11, in > > installed and available on your PATH variable?") > > ImportError: Couldn't import Django. Are you sure it's installed and > > available on your PYTHONPATH environment variable? Did you forget to > > activate a virtual environment? > > > > > > > > - > > Claude says, "I'm not convinced about this. Aren't we hiding other > possibly > > helpful import errors (at least on Python 2)?" > > Aymeric says, "I share Claude's concern. We've been constantly removing > > that sort of "helpful" exception wrapping from Django" > > Aymeric again, after further investigation, "Importing > > django.core.management doesn't ripple too far. Specifically it doesn't > > import any of the user's code. This reduces the likelihood of masking > > useful errors. It will mask exception info if Django is installed > > incorrectly, for instance because two installs happened in the same > > location (but I think that's less likely since pip/virtualenv became > > mainstream and since we added code to setup.py to detect existing > > installs). > > > > Does anyone else have opinions on the change? I suppose another option > > could be to try to reraise the original exception with the "helpful > > message" added. > > > > > > [0] https://github.com/django/django/pull/6314 > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f3c19c33-fa3f-4bb3-8d12-859186f4ba93%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Fellow Report - April 9, 2016
Triaged --- https://code.djangoproject.com/ticket/26456 - Document formfield_callback attribute in ModelForm (wontfix) https://code.djangoproject.com/ticket/26463 - Allowing Callbacks/Handlers to be called on Cache entry Expiration (wontfix) https://code.djangoproject.com/ticket/26459 - Allow providing DecimalField with a custom context (accepted) https://code.djangoproject.com/ticket/26469 - FieldFile.open() does not properly set mode when opening file (duplicate) https://code.djangoproject.com/ticket/26472 - allow model field level silencing of system checks (accepted) https://code.djangoproject.com/ticket/26481 - Add a "strict mode" for defer()/only() (accepted) https://code.djangoproject.com/ticket/26482 - pretty-print json in JSONField form field (wontfix) https://code.djangoproject.com/ticket/26480 - Allow sensitive_variables() to preserve the signature of its decorated function (accepted) Authored https://github.com/django/djangoproject.com/pull/655 - Fixed #647 -- Fixed djangoproject.com registration email by disabling HTML template. Reviewed/committed -- https://github.com/django/django/pull/6408 - Refs #21608 -- Fixed incorrect cache key in cache session backend's save(). https://github.com/django/django/pull/6400 - Fixed #26452 -- Loaded middleware on server start rather than on first request. https://github.com/django/django/pull/5977 - Fixed #25850 -- Made migrate/makemigrations error on inconsistent history. https://github.com/django/django/pull/6391 - Fixed #26201 -- Documented the consequences of rotating the CSRF token on login. https://github.com/django/django/pull/6415 - Fixed #26462 -- Fixed Python 2 UnicodeEncodeError when warning about long cache keys. https://github.com/django/django/pull/6412 - Fixed #26455 -- Allowed filtering and repairing invalid geometries. https://github.com/django/django/pull/6406 - Fixed #25856 -- Added %B support to Date.strftime. https://github.com/django/django/pull/6373 - Fixed #26037 -- Documented precedence of USE_X_FORWARDED_HOST/PORT settings. https://github.com/django/django/pull/6386 - Fixed #26403 -- Removed translated content in "Invalid block tag" message. https://github.com/django/django/pull/6423 - Fixed #26466 -- Added HTTP_REFERER decoding to i18n set_language() view. https://github.com/django/django/pull/6435 - Fixed #26145 -- Made debug context processor return queries for all databases. https://github.com/django/django/pull/6436 - Fixed #26479 -- Added 'is not' operator to the if tag. https://github.com/django/django/pull/6376 - Fixed #25847 -- Made User.is_(anonymous|authenticated) properties. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/018745bc-af11-4141-bc8e-31b84924cc71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.