Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Add deprecation warning for provide_self=False.
Browse files Browse the repository at this point in the history
  • Loading branch information
groner committed Jan 14, 2016
1 parent d390012 commit 837d951
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jeni.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import functools
import inspect
import re
import warnings
import sys

import six
Expand Down Expand Up @@ -418,6 +419,9 @@ class Injector(BaseInjector):

if provide_self:
self.values['injector'] = self
else:
warnings.warn(
DeprecationWarning('provide_self=False is not supported'))

@classmethod
def provider(cls, note, provider=None, name=False):
Expand Down

0 comments on commit 837d951

Please sign in to comment.