Giter Club home page Giter Club logo

Comments (4)

AA-Turner avatar AA-Turner commented on June 15, 2024

cc: @mansenfranzen

We can make a patch release to reinstate py_sig_re. I would note, though, that it is a private object, and thus is not subject to any deprecation policies -- it is not documented anywhere and the regular expression contained therein is subject to change without notice (and indeed, has done so).

It would be better to find a supported and documented method for autodoc_pydantic to achieve the same outcome.

A

from sphinx.

mansenfranzen avatar mansenfranzen commented on June 15, 2024

@j-carson thanks for taking care with this issue!

@AA-Turner it would be great if you could re-import the regular expression to allow older versions of autodoc_pydantic to work with the newest sphinx versions.

For the future, I would also like to rely on a public function/API instead of using the private regex. Are you aware of any? If not, I would be willing to provide a PR adding the rather narrow functionality wrapped in a publicly facing function.

from sphinx.

AA-Turner avatar AA-Turner commented on June 15, 2024

62c3bad will be included in Sphinx 7.3.7.

For the second, I will have a think. Perhaps it could be as simple as splitting the first few lines from handle_signature and returning some custom type:

def split_object_signature(sig: str) -> _SigType:
    m = py_sig_re.match(sig)
    if m is None:
        raise ValueError
    prefix, name, tp_list, arglist, retann = m.groups()
    return _SigType(...)

from sphinx.

AA-Turner avatar AA-Turner commented on June 15, 2024

Sphinx 7.3.7 has been released with fixes.

A

from sphinx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.