Skip to content

Python 3.8 support #18

@jtran

Description

@jtran

I'm getting an error running this. Seems to work fine on Python 3.7, but on 3.8, I get the following.

Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/user/.pyenv/versions/my-venv-3.8.2/lib/python3.8/site-packages/flamegraph/__main__.py", line 4, in <module>
    flamegraph.main()
  File "/Users/user/.pyenv/versions/my-venv-3.8.2/lib/python3.8/site-packages/flamegraph/flamegraph.py", line 146, in main
    start_time = time.clock()
AttributeError: module 'time' has no attribute 'clock'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/my-venv-3.8.2/lib/python3.8/site-packages/flamegraph/flamegraph.py", line 99, in stop
    self.join()
  File "/Users/user/.pyenv/versions/3.8.2/lib/python3.8/threading.py", line 1006, in join
    raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started

At least for time.clock(), it seems like there are alternatives in 3.8.

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