Issue2184

classification
Title: inspect.getcallargs is not available
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: beachmachine, pitchblack, zyasoft
Priority: Keywords: patch

Created on 2014-07-29.15:55:37 by beachmachine, last changed 2014-09-18.02:26:37 by zyasoft.

Files
File name Uploaded Description Edit Remove
inspect_getcallargs_v1.patch beachmachine, 2014-08-01.07:20:16
Messages
msg8897 (view) Author: Andreas Stocker (beachmachine) Date: 2014-07-29.15:57:25
Jython 2.7b3+ (default:744d673392b4+, Jul 27 2014, 10:55:20) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> from inspect import getcallargs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name getcallargs
>>>

Python 2.7.5 (default, Jun 25 2014, 10:19:55) 
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from inspect import getcallargs
>>>
msg8899 (view) Author: Andreas Stocker (beachmachine) Date: 2014-08-01.07:20:16
Attached is an implementation of ``getcallargs``.
msg8915 (view) Author: Jim Baker (zyasoft) Date: 2014-08-12.15:19:15
@Andreas, looks straightforward. I see you had to workaround this issue in https://github.com/beachmachine/django/commit/1c6104cb8f395bfa344da035b5b78c30a6037a9d, so we really should make this fix.

Target beta 4
msg8962 (view) Author: Michael (pitchblack) Date: 2014-09-07.18:01:02
This issue shouldn't be marked as resolved.  Django uses getcallargs to pass django debugging information back the developer.  If you comment out getcallargs then Django is unable to give you exception details to help you resolve any issues you encounter developing on Django.  The exception that you end up getting provides no details about Django error and only displays that the Jython getcallargs is not defined.  I would like help to get this resolved.


[07/Sep/2014 10:47:18] "GET /admin/ HTTP/1.1" 200 3505
Traceback (most recent call last):
  File "C:\jython2.7b2\Lib\wsgiref\handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\contrib\staticfiles\handlers.py", line 64, in __call__
    return self.application(environ, start_response)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\wsgi.py", line 187, in __call__
    response = self.get_response(request)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\base.py", line 199, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\base.py", line 236, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\views\debug.py", line 91, in technical_500_response
    html = reporter.get_traceback_html()
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\views\debug.py", line 350, in get_traceback_html
    return t.render(c)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 149, in render
    return self._render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 143, in _render
    return self.nodelist.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 845, in render
    bit = self.render_node(node, context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 80, in render_node
    return node.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\defaulttags.py", line 312, in render
    return nodelist.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 845, in render
    bit = self.render_node(node, context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 80, in render_node
    return node.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\defaulttags.py", line 201, in render
    nodelist.append(node.render(context))
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 90, in render
    output = self.filter_expression.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 597, in resolve
    obj = self.var.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 597, in resolve
    obj = self.var.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 735, in resolve
    value = self._resolve_lookup(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 792, in _resolve_lookup
    getcallargs(current)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 792, in _resolve_lookup
    getcallargs(current)
NameError: global name 'getcallargs' is not defined
msg8968 (view) Author: Jim Baker (zyasoft) Date: 2014-09-07.23:27:49
This issue is not yet resolved, it has simply been accepted as a problem.

The fix is of course very straightforward, so we should apply this ASAP.
msg8989 (view) Author: Jim Baker (zyasoft) Date: 2014-09-10.05:15:06
Fixed as of http://hg.python.org/jython/rev/68aaff268c3c
History
Date User Action Args
2014-09-18 02:26:37zyasoftsetstatus: pending -> closed
2014-09-10 05:15:07zyasoftsetstatus: open -> pending
assignee: zyasoft
resolution: accepted -> fixed
messages: + msg8989
2014-09-07 23:27:49zyasoftsetmessages: + msg8968
2014-09-07 18:01:03pitchblacksetnosy: + pitchblack
messages: + msg8962
2014-08-12 15:19:15zyasoftsetresolution: accepted
messages: + msg8915
nosy: + zyasoft
2014-08-01 07:20:17beachmachinesetfiles: + inspect_getcallargs_v1.patch
keywords: + patch
messages: + msg8899
2014-07-29 15:57:26beachmachinesetmessages: + msg8897
2014-07-29 15:55:37beachmachinecreate