question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix docs to reflect that only Python 3.6.2+ is supported

See original GitHub issue

On Python 3.6.1 nornir import crashes with the following:

Traceback (most recent call last):
  File "test-nornir-01.py", line 3, in <module>
    from nornir.core import InitNornir
  File ".../lib/python3.6/site-packages/nornir/__init__.py", line 1, in <module>
    from nornir.init_nornir import InitNornir
  File ".../lib/python3.6/site-packages/nornir/init_nornir.py", line 4, in <module>
    from nornir.core.connections import Connections
  File ".../lib/python3.6/site-packages/nornir/core/connections.py", line 2, in <module>
    from typing import Any, Dict, NoReturn, Optional, Type
ImportError: cannot import name 'NoReturn'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Dec 3, 2019

on python 3.5.2 (default for ubuntu 16.04) nornir is being installed successfully but then crushes on import nornir.core

$ python3
Python 3.5.2 (default, Oct  8 2019, 13:06:37) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nornir.core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/nornir/__init__.py", line 1, in <module>
    from nornir.init_nornir import InitNornir
  File "/usr/local/lib/python3.5/dist-packages/nornir/init_nornir.py", line 19
    return f"{cls.__module__}.{cls.__name__}"
                                            ^
SyntaxError: invalid syntax

this is because the python version < 3.6 doesn’t support fstrings please add this to your documentation

thx

0reactions
ktbyerscommented, Dec 2, 2020

@sindhujit1 Nornir requires Python 3.6.2+.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog — Python 3.6.15 documentation
This document is for an old version of Python that is no longer supported. You should upgrade, and read the Python documentation for...
Read more >
Changelog — Python 3.11.1 documentation
Patch by Arie Bovenberg. bpo-46278: Reflect context argument in AbstractEventLoop.call_*() methods. Loop implementations already support it.
Read more >
os — Miscellaneous operating system interfaces — Python ...
All functions in this module raise OSError (or subclasses thereof) in the case of invalid or inaccessible file names and paths, or other...
Read more >
Python Documentation contents — Python 3.11.1 documentation
This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed ......
Read more >
What's New In Python 3.9 — Python 3.11.1 documentation
PEP 602, CPython adopts an annual release cycle. You should check for DeprecationWarning in your code¶. When Python 2.7 was still supported, a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found