Skip to content

Source Code Strings Empty #125

@jdeinum

Description

@jdeinum

Description

When using the following example after installation:

import hunter
hunter.trace(module='posixpath', action=hunter.CallPrinter)

import os
os.path.join('a', 'b')

I get the following output:

  <frozen posixpath>:71    call      => join(a='a', *p=('b',))
  <frozen posixpath>:76    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:77    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:41    call         => _get_sep(path='a')
  <frozen posixpath>:42    line            ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:45    line            ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:45    return       <= _get_sep: '/'
  <frozen posixpath>:78    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:79    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:80    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:82    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:83    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:85    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:88    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:82    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:92    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:92    return    <= join: 'a/b'

Additional Info

Related to #112, but since this doesn't involve importlib, I think it may be a different issue. If it's the same issue then I can close this and add it as a comment on that issue :)

Python Version: Python 3.12.7
Linux Version: 6.11.3-arch1-1
Hunter Version for Both: 3.7.0

I tried with both the pip version inside a venv, as well as installing thepython-hunter-3.7.0-1 from the arch repositories. Both give me the same output.

Steps to Reproduce

Method 1 - Arch

  1. Run pacman -S extra-testing/python-hunter
  2. Create a main.py file with the code above
  3. Run python3 main.py

Method 2 - Sandbox

  1. Run python3 -m venv sandbox
  2. Run source sandbox/bin/activate
  3. Run pip install hunter
  4. Create a main.py file with the code above
  5. Run python3 main.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions