Skip to content
Myr

Merge pull request #728 from jhwgh1968/ironpython_support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Disabled sys._getframe() on Python interpreters that don't support it

authored by Markus Unterwaditzer · committed by GitHub · parents df0e37d, 1d5aa25 · Browse files · 3 files+15 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+15 added−1 removed

  • other:+15 added−1 removed

3 files+15 added−1 removed

modified:click/_unicodefun.py+2 added
12 unmodified lines
131415def _find_unicode_literals_frame():16 import __future__17 if not hasattr(sys, '_getframe'): # not all Python implementations have it18 return 019 frm = sys._getframe(1)20 idx = 121 while frm is not None:22 if frm.f_globals.get('__name__', '').startswith('click.'):
98 unmodified lines
modified:click/decorators.py+5 added-1 removed
233 unmodified lines
234 (``'%(prog)s, version %(version)s'``)235 :param others: everything else is forwarded to :func:`option`.236 """237 if version is None:238 if hasattr(sys, '_getframe'):238 module = sys._getframe(1).f_globals.get('__name__')239 module = sys._getframe(1).f_globals.get('__name__')240 else:241 module = ''242243 def decorator(f):244 prog_name = attrs.pop('prog_name', None)245 message = attrs.pop('message', '%(prog)s, version %(version)s')246
62 unmodified lines
modified:CHANGES+8 added
1 unmodified line
2===============34This contains all major version changes between Click releases.56Version 6.87-----------89(bugfix release; yet to be released)1011- Disabled sys._getframes() on Python interpreters that don't support it. See12 #728.1314Version 6.715-----------1617(bugfix release; released on January 6th 2017)
342 unmodified lines