diff --git a/CHANGES.md b/CHANGES.md index 0444b9b3..326ea714 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,8 +3,15 @@ The release versions are PyPi releases. ## Version 3.5 (as yet unreleased) -This version of pyfakefs does not support Python 3.3. Python 3.3 users shall -keep using pyfakefs 3.4.3, or upgrade to a newer Python version. +#### Changes + * This version of pyfakefs does not support Python 3.3. Python 3.3 users + must keep using pyfakefs 3.4.3, or upgrade to a newer Python version. + * The deprecation warnings for the old API are now switched on by default. + To switch them off for legacy code, use: + ```python + from pyfakefs.deprecator import Deprecator + Deprecator.show_warnings = False + ``` #### New Features * a module imported as another name (`import os as _os`) is now correctly @@ -21,8 +28,6 @@ keep using pyfakefs 3.4.3, or upgrade to a newer Python version. ([#423](../../issues/423)) * added support for null device ([#418](../../issues/418)) -#### Infrastructure - #### Fixes * file timestamps are now updated more according to the real behavior ([#435](../../issues/435)) diff --git a/README.md b/README.md index a32200e2..6726482b 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,6 @@ pyfakefs is currently automatically tested: on Linux, with Python 2.7, and 3.4 to 3.7, using [Travis](https://travis-ci.org/jmcgeheeiv/pyfakefs) * [![Build Status](https://travis-ci.org/jmcgeheeiv/pyfakefs.svg)](https://travis-ci.org/jmcgeheeiv/pyfakefs) on MacOS, with Python 2.7, 3.6 and 3.7, using [Travis](https://travis-ci.org/jmcgeheeiv/pyfakefs) - [![Build Status](https://travis-ci.org/jmcgeheeiv/pyfakefs.svg)](https://travis-ci.org/jmcgeheeiv/pyfakefs) * [![Build status](https://ci.appveyor.com/api/projects/status/4o8j21ufuo056873/branch/master?svg=true)](https://ci.appveyor.com/project/jmcgeheeiv/pyfakefs/branch/master) on Windows, with Python 2.7, and 3.4 to 3.7 using [Appveyor](https://ci.appveyor.com/project/jmcgeheeiv/pyfakefs) diff --git a/pyfakefs/deprecator.py b/pyfakefs/deprecator.py index 2229f3df..ad7a5985 100644 --- a/pyfakefs/deprecator.py +++ b/pyfakefs/deprecator.py @@ -18,15 +18,15 @@ class Deprecator(object): """Decorator class for adding deprecated functions. - Warnings are switched off by default. - To enable deprecation warnings, use: + Warnings are switched on by default. + To disable deprecation warnings, use: >>> from pyfakefs.deprecator import Deprecator >>> - >>> Deprecator.show_warnings = True + >>> Deprecator.show_warnings = False """ - show_warnings = False + show_warnings = True def __init__(self, use_instead=None, func_name=None): self.use_instead = use_instead