{"action":"created","issue":{"url":"https://api.github.com/repos/Pylons/pyramid/issues/2808","repository_url":"https://api.github.com/repos/Pylons/pyramid","labels_url":"https://api.github.com/repos/Pylons/pyramid/issues/2808/labels{/name}","comments_url":"https://api.github.com/repos/Pylons/pyramid/issues/2808/comments","events_url":"https://api.github.com/repos/Pylons/pyramid/issues/2808/events","html_url":"https://github.com/Pylons/pyramid/issues/2808","id":188043726,"number":2808,"title":"Deprecation Warnings are not displayed by default","user":{"login":"hyperknot","id":494223,"avatar_url":"https://avatars.githubusercontent.com/u/494223?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperknot","html_url":"https://github.com/hyperknot","followers_url":"https://api.github.com/users/hyperknot/followers","following_url":"https://api.github.com/users/hyperknot/following{/other_user}","gists_url":"https://api.github.com/users/hyperknot/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperknot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperknot/subscriptions","organizations_url":"https://api.github.com/users/hyperknot/orgs","repos_url":"https://api.github.com/users/hyperknot/repos","events_url":"https://api.github.com/users/hyperknot/events{/privacy}","received_events_url":"https://api.github.com/users/hyperknot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-08T16:47:07Z","updated_at":"2016-11-08T18:22:44Z","closed_at":null,"body":"Deprecation Warnings are not displayed by default, at least on Python 2.7.\r\n\r\nThere is a hidden [section](http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/upgrading.html#my-application-doesn-t-have-any-tests-or-has-few-tests) in the docs, mentioning that it can be manually enabled by\r\n\r\n```\r\nPYTHONWARNINGS=default $VENV/bin/pserve development.ini\r\n```\r\n\r\nThere are two problems with this:\r\n\r\n1. As it's silenced by default, this is not functioning as a warning. The user would actively need to look and seek for clues how to manually enable those warnings, which I guess results in 99% of the users not seeing any of those warnings.\r\n\r\n2. The following 3 lines are always displayed when warnings are enabled, 2x when using `--reload`:\r\n\r\n```\r\n/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/Users/user/.virtualenvs/gigamacro_web/lib/python2.7/site-packages/zope': missing __init__.py\r\n  file, filename, etc = imp.find_module(subname, path)\r\n/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/Users/user/.virtualenvs/gigamacro_web/lib/python2.7/site-packages/repoze': missing __init__.py\r\n  file, filename, etc = imp.find_module(subname, path)\r\n/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/Users/user/.virtualenvs/gigamacro_web/lib/python2.7/site-packages/paste': missing __init__.py\r\n  file, filename, etc = imp.find_module(subname, path)\r\n```\r\n\r\nI _think_ Django has the warnings enabled by default in Python 2.7, but I didn't find the code, only the result (it is displayed for all users on all platforms by default)."},"comment":{"url":"https://api.github.com/repos/Pylons/pyramid/issues/comments/259216969","html_url":"https://github.com/Pylons/pyramid/issues/2808#issuecomment-259216969","issue_url":"https://api.github.com/repos/Pylons/pyramid/issues/2808","id":259216969,"user":{"login":"hyperknot","id":494223,"avatar_url":"https://avatars.githubusercontent.com/u/494223?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperknot","html_url":"https://github.com/hyperknot","followers_url":"https://api.github.com/users/hyperknot/followers","following_url":"https://api.github.com/users/hyperknot/following{/other_user}","gists_url":"https://api.github.com/users/hyperknot/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperknot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperknot/subscriptions","organizations_url":"https://api.github.com/users/hyperknot/orgs","repos_url":"https://api.github.com/users/hyperknot/repos","events_url":"https://api.github.com/users/hyperknot/events{/privacy}","received_events_url":"https://api.github.com/users/hyperknot/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T18:22:44Z","updated_at":"2016-11-08T18:22:44Z","body":"It seems it's not initialised early on, but only after some kind of setup process has completed.\r\n\r\n```\r\npip install \"django<1.9\"\r\ndjango-admin startproject project\r\n\r\ncd project\r\n./manage.py startapp app\r\necho \"import django.contrib.admin.util\" > app/__init__.py\r\necho \"INSTALLED_APPS += ('app',)\" >> project/settings.py\r\n\r\n./manage.py runserver\r\n```\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"hyperknot"}}