Berker Peksag added the comment:

Here's an updated patch (based on Vajrasky's patch, thanks!).

Changes:

- Updated deprecation schedule
  1. pending deprecation in 3.5
  2. deprecation in 3.6
  3. removal in 3.7
- Added tests
- Added a whatsnew entry
- Moved warnings import to dist() and linux_distribution() functions
- Used a deprecate-removed directive in the documentation (see also issue 22150)
- Fixed a stacklevel bug. With deprecate_platform_dist_v2.patch the output of 
platform.dist() was:

  >>> import platform as p
  >>> p.dist()
  /home/berker/projects/cpython/default/Lib/platform.py:373: 
PendingDeprecationWarning: The dist()/linux_distribution() function will be 
deprecated in Python 3.5 and removed in Python 3.6
    full_distribution_name=0)
  ('debian', 'wheezy/sid', '')

  With the current patch:

  >>> import platform as p
  >>> p.dist()
  __main__:1: PendingDeprecationWarning: dist() and linux_distribution() 
functions are deprecated in Python 3.5 and will be removed in Python 3.6
  ('debian', 'wheezy/sid', '')

----------
nosy: +berker.peksag
stage:  -> patch review
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file36284/issue1322.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to