Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make nox session=docs fails on darwin #1269

Open
skatromb opened this issue Feb 6, 2025 · 0 comments
Open

make nox session=docs fails on darwin #1269

skatromb opened this issue Feb 6, 2025 · 0 comments
Labels

Comments

@skatromb
Copy link
Contributor

skatromb commented Feb 6, 2025

doctest fails on darwin platform

**********************************************************************
File "../../lib/python3.13/site-packages/pyroute2/ndb/main.py", line ?, in netns
Failed example:
    nslist = ['netns01',
              'netns02',
              'netns03']

    for nsname in nslist:
        ndb.sources.add(netns=nsname)

    report = ndb.addresses.summary()
    report.select_records(target=lambda x: x.startswith('netns'))
    report.select_fields('address', 'ifname', 'target')
    for line in report.format('json'):
        print(line)
Exception raised:
    Traceback (most recent call last):
      File "~/.asdf/installs/python/3.13.1/lib/python3.13/doctest.py", line 1395, in __run
        exec(compile(example.source, filename, "single",
        ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     compileflags, True), test.globs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest netns[0]>", line 6, in <module>
        ndb.sources.add(netns=nsname)
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
      File "/Users/skatromb/code/pyroute2/.nox-skatromb/docs/lib/python3.13/site-packages/pyroute2/ndb/view.py", line 504, in add
        spec = dict(Source.defaults(spec))
                    ~~~~~~~~~~~~~~~^^^^^^
      File "/Users/skatromb/code/pyroute2/.nox-skatromb/docs/lib/python3.13/site-packages/pyroute2/ndb/source.py", line 238, in defaults
        ret['netns'] = netns._get_netnspath(spec['netns'])
                       ^^^^^
    NameError: name 'netns' is not defined. Did you mean: 'NetNS'?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants