Minimal reproducible example for `mkdocstrings` Python handler issue

Overview

Requirements

  1. python=^3.10
  2. poetry

Example

sys.exit(cli()) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/__main__.py", line 177, in serve_command serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 54, in serve config = builder() File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 49, in builder build(config, live_server=live_server, dirty=dirty) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 314, in build _build_page(file.page, config, doc_files, nav, env, dirty) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 220, in _build_page output = config['plugins'].run_event( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 102, in run_event result = method(item, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 197, in on_post_page fixed_output, unmapped = fix_refs(output, url_mapper) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 186, in fix_refs html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 156, in inner url = url_mapper(unescape(identifier)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 94, in get_item_url new_identifiers = fallback(identifier) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 408, in get_anchors anchors = handler.renderer.get_anchors(handler.collector.collect(identifier, fallback_config)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings_handlers/python/collector.py", line 69, in collect loader.load_module(module_name) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 131, in load_module top_module = self._load_module_path(package.name, package.path, submodules=submodules) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 287, in _load_module_path self._load_submodules(module) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 292, in _load_submodules self._load_submodule(module, subparts, subpath) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 303, in _load_submodule member_parent[subparts[-1]] = self._load_module_path( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 285, in _load_module_path module = self._inspect_module(module_name, module_path, parent) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 347, in _inspect_module module = inspect( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 92, in inspect ).get_module(import_paths) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 206, in get_module value = dynamic_import(import_path, import_paths) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/importer.py", line 67, in dynamic_import value = getattr(value, part) AttributeError: module 'pydantic' has no attribute '_hypothesis_plugin'">
# Install Dependencies
$ poetry install

# Enter Shell
$ poetry shell

# Serve Docs
$ mkdocs serve
INFO     -  Building documentation...
INFO     -  Cleaning site directory
ERROR    -  Error building page 'index.md': module 'pydantic' has no attribute '_hypothesis_plugin'
Traceback (most recent call last):
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 88, in get_item_url
    url = self._url_map[identifier]
KeyError: 'pydantic'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fakeusername/Desktop/example/.venv/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/__main__.py", line 177, in serve_command
    serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 54, in serve
    config = builder()
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 49, in builder
    build(config, live_server=live_server, dirty=dirty)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 314, in build
    _build_page(file.page, config, doc_files, nav, env, dirty)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 220, in _build_page
    output = config['plugins'].run_event(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 102, in run_event
    result = method(item, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 197, in on_post_page
    fixed_output, unmapped = fix_refs(output, url_mapper)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 186, in fix_refs
    html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 156, in inner
    url = url_mapper(unescape(identifier))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 94, in get_item_url
    new_identifiers = fallback(identifier)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 408, in get_anchors
    anchors = handler.renderer.get_anchors(handler.collector.collect(identifier, fallback_config))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings_handlers/python/collector.py", line 69, in collect
    loader.load_module(module_name)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 131, in load_module
    top_module = self._load_module_path(package.name, package.path, submodules=submodules)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 287, in _load_module_path
    self._load_submodules(module)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 292, in _load_submodules
    self._load_submodule(module, subparts, subpath)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 303, in _load_submodule
    member_parent[subparts[-1]] = self._load_module_path(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 285, in _load_module_path
    module = self._inspect_module(module_name, module_path, parent)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 347, in _inspect_module
    module = inspect(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 92, in inspect
    ).get_module(import_paths)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 206, in get_module
    value = dynamic_import(import_path, import_paths)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/importer.py", line 67, in dynamic_import
    value = getattr(value, part)
AttributeError: module 'pydantic' has no attribute '_hypothesis_plugin'
Owner
Hayden Richards
Yes, that is my sausage dog
Hayden Richards
Documentation for the lottie file format

Lottie Documentation This repository contains both human-readable and machine-readable documentation about the Lottie format The documentation is avai

LottieFiles 25 Jan 05, 2023
advance python series: Data Classes, OOPs, python

Working With Pydantic - Built-in Data Process ========================== Normal way to process data (reading json file): the normal princiople, it's f

Phung Hưng Binh 1 Nov 08, 2021
Leetcode Practice

LeetCode Practice Description This is my LeetCode Practice. Visit LeetCode Website for detailed question description. The code in this repository has

Leo Hsieh 75 Dec 27, 2022
Numpy's Sphinx extensions

numpydoc -- Numpy's Sphinx extensions This package provides the numpydoc Sphinx extension for handling docstrings formatted according to the NumPy doc

NumPy 234 Dec 26, 2022
Mkdocs obsidian publish - Publish your obsidian vault through a python script

Mkdocs Obsidian Mkdocs Obsidian is an association between a python script and a

Mara 49 Jan 09, 2023
Rust Markdown Parsing Benchmarks

Rust Markdown Parsing Benchmarks This repo tries to assess Rust markdown parsing

Ed Page 1 Aug 24, 2022
k3heap is a binary min heap implemented with reference

k3heap k3heap is a binary min heap implemented with reference k3heap is a component of pykit3 project: a python3 toolkit set. In this module RefHeap i

pykit3 1 Nov 13, 2021
A document format conversion service based on Pandoc.

reformed Document format conversion service based on Pandoc. Usage The API specification for the Reformed server is as follows: GET /api/v1/formats: L

David Lougheed 3 Jul 18, 2022
Exercism exercises in Python.

Exercism exercises in Python.

Exercism 1.3k Jan 04, 2023
Cleaner script to normalize knock's output EPUBs

clean-epub The excellent knock application by Benton Edmondson outputs EPUBs that seem to be DRM-free. However, if you run the application twice on th

2 Dec 16, 2022
Toolchain for project structure and documents optimisation

ritocco Toolchain for project structure and documents optimisation

Harvey Wu 1 Jan 12, 2022
💯 Coolest snippets

nvim-snippets This was originally included in my personal Neovim setup, but I didn't like having all the snippets there so I decided to have them sepa

Eliaz Bobadilla 6 Aug 31, 2022
Python Deep Dive Course - Accompanying Materials

Python Deep Dive Various Jupyter notebooks and Python sources associated with my Udemy Python 3 Deep Dive course series: Part 1: Mainly functional pro

Fred Baptiste 1.1k Dec 30, 2022
Plover jyutping - Plover plugin for Jyutping input

Plover plugin for Jyutping Installation Navigate to the repo directory: cd plove

Samuel Lo 1 Mar 17, 2022
DocumentPy is a Python application that runs in a command-line interface environment, made for creating HTML documents.

DocumentPy DocumentPy is a Python application that runs in a command-line interface environment, made for creating HTML documents. Usage DocumentPy, a

Lotus 0 Jul 15, 2021
A course-planning, course-map rendering and GPA-calculation web service, designed for the SFU (Simon Fraser University) student.

SFU Course Planner What is the overall goal of the project (i.e. what does it do, or what problem is it solving)? As the title suggests, this project

Ash Peng 1 Oct 21, 2021
A Python Package To Generate Strong Passwords For You in Your Projects.

shPassGenerator Version 1.0.6 Ready To Use Developed by Shervin Badanara (shervinbdndev) on Github Language and technologies used in This Project Work

Shervin 11 Dec 19, 2022
NetBox plugin that stores configuration diffs and checks templates compliance

Config Officer - NetBox plugin NetBox plugin that deals with Cisco device configuration (collects running config from Cisco devices, indicates config

77 Dec 21, 2022
The Python Dict that's better than heroin.

addict addict is a Python module that gives you dictionaries whose values are both gettable and settable using attributes, in addition to standard ite

Mats Julian Olsen 2.3k Dec 22, 2022
script to calculate total GPA out of 4, based on input gpa.csv

gpa_calculator script to calculate total GPA out of 4 based on input gpa.csv to use, create a total.csv file containing only one integer showing the t

Mohamad Bastin 1 Feb 07, 2022