Skip to content

Patchflows are not recognized #1494

@bbuklov

Description

@bbuklov

Is this a regression?

Yes

Description

I got an error message Patchflow GenerateDocstring not found in deque(['patchwork.patchflows']) after calling command patchwork GenerateDocstring. In fact, the rest of patchflows are also not recognized.

Although, printing a list of availiable patchflows works as expected:

Image

I installed patchwork with command pip install 'patchwork-cli[all]' --upgrade as it was stated in the documentation. I also tried to run patchwork from source code as follows: python3 patchwork/app.py and even cd patchwork && python3 app.py. None of them worked, giving me the same error message.

After a little bit of investigation I've found that the problem is related to import strategies. But I can clearly see GenerateDocstring module under the patchflows directory. Right now I don't know how to fix this problem, that's why I'am creating this issue.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Patchflow GenerateDocstring not found in deque(['patchwork.patchflows'])

Anything else?

My system configuration is:

Image

I have Python 3.12.3 and pip 24.0 installed on this system.

A list of installed Python packages in the environment I used:

Package                      Version
---------------------------- ---------------
agate                        1.13.0
agate-dbf                    0.2.3
agate-excel                  0.4.1
agate-sql                    0.7.2
aiofiles                     24.1.0
annotated-types              0.7.0
anthropic                    0.49.0
anyio                        4.8.0
appdirs                      1.4.4
appthreat-vulnerability-db   5.6.6
attrs                        23.2.0
azure-core                   1.32.0
azure-devops                 7.1.0b4
babel                        2.17.0
backoff                      2.2.1
beautifulsoup4               4.13.3
blinker                      1.9.0
boltons                      21.0.0
bracex                       2.5.post1
browser-use                  0.1.40
cachetools                   5.5.2
certifi                      2025.1.31
cffi                         1.17.1
chardet                      5.2.0
charset-normalizer           3.4.1
chevron                      0.14.0
click                        8.1.8
click-option-group           0.5.6
cohere                       5.14.0
colorama                     0.4.6
colorlog                     6.9.0
cryptography                 44.0.2
csvkit                       2.1.0
cvss                         3.4
dbfread                      2.0.7
defusedxml                   0.7.1
Deprecated                   1.2.18
distro                       1.9.0
eml_parser                   2.0.0
et_xmlfile                   2.0.0
eval_type_backport           0.2.2
exceptiongroup               1.2.2
face                         24.0.0
fastavro                     1.10.0
filelock                     3.17.0
filetype                     1.2.0
Flask                        3.1.0
fsspec                       2025.3.0
gitdb                        4.0.12
GitPython                    3.1.44
giturlparse                  0.12.0
glom                         22.1.0
google-ai-generativelanguage 0.6.16
google-api-core              2.24.2
google-auth                  2.38.0
google-genai                 1.5.0
googleapis-common-protos     1.69.1
greenlet                     3.1.1
griffe                       1.6.0
groq                         0.19.0
grpcio                       1.71.0
grpcio-status                1.71.0
h11                          0.14.0
h2                           4.2.0
hpack                        4.1.0
httpcore                     1.0.7
httpx                        0.28.1
httpx-sse                    0.4.0
huggingface-hub              0.29.3
Hypercorn                    0.17.3
hyperframe                   6.1.0
idna                         3.10
importlib_metadata           8.6.1
isodate                      0.7.2
itsdangerous                 2.2.0
Jinja2                       3.1.6
jiter                        0.9.0
joblib                       1.4.2
json_repair                  0.30.3
jsonpatch                    1.33
jsonpath-python              1.0.6
jsonpointer                  3.0.0
jsonschema                   4.23.0
jsonschema-specifications    2024.10.1
langchain-anthropic          0.3.3
langchain-core               0.3.44
langchain-google-genai       2.1.0
langchain-ollama             0.2.2
langchain-openai             0.3.1
langsmith                    0.3.13
leather                      0.4.0
libcst                       1.1.0
logfire-api                  3.8.0
markdown-it-py               3.0.0
markdownify                  0.14.1
MarkupSafe                   3.0.2
mdurl                        0.1.2
mistralai                    1.5.1
monotonic                    1.6
msgpack                      1.0.5
msrest                       0.7.1
mypy-extensions              1.0.0
numpy                        2.2.3
oauthlib                     3.2.2
olefile                      0.47
ollama                       0.4.7
openai                       1.66.3
openpyxl                     3.1.5
opentelemetry-api            1.31.0
oras                         0.1.30
orjson                       3.10.15
owasp-depscan                5.2.15
packageurl-python            0.15.6
packaging                    24.2
parsedatetime                2.6
patched-code2prompt          0.9.0.dev3
patchwork-cli                0.0.114
pdfkit                       1.0.0
peewee                       3.17.9
pillow                       10.4.0
pip                          24.0
playwright                   1.50.0
posthog                      3.19.1
priority                     2.0.0
prompt_toolkit               3.0.50
proto-plus                   1.26.1
protobuf                     5.29.3
publicsuffixlist             1.0.2.20250312
pyasn1                       0.6.1
pyasn1_modules               0.4.1
pycparser                    2.22
pydantic                     2.10.6
pydantic-ai                  0.0.32
pydantic-ai-slim             0.0.32
pydantic_core                2.27.2
pydantic-graph               0.0.32
pyee                         12.1.1
PyGithub                     2.1.1
Pygments                     2.19.1
PyJWT                        2.10.1
PyNaCl                       1.5.0
pyperclip                    1.9.0
python-dateutil              2.9.0.post0
python-dotenv                1.0.1
python-gitlab                4.13.0
python-magic                 0.4.27
python-slugify               8.0.4
pytimeparse                  1.1.8
PyYAML                       6.0.2
Quart                        0.20.0
referencing                  0.36.2
regex                        2024.11.6
requests                     2.32.3
requests-oauthlib            2.0.0
requests-toolbelt            1.0.0
rich                         13.7.1
rpds-py                      0.23.1
rsa                          4.9
ruamel.yaml                  0.17.40
ruamel.yaml.clib             0.2.12
scikit-learn                 1.6.1
scipy                        1.15.2
semgrep                      1.79.0
semver                       3.0.4
setuptools                   76.0.0
six                          1.17.0
slack_sdk                    3.28.0
smmap                        5.0.2
sniffio                      1.3.1
soupsieve                    2.6
SQLAlchemy                   2.0.39
tabulate                     0.9.0
tenacity                     9.0.0
text-unidecode               1.3
threadpoolctl                3.5.0
tiktoken                     0.8.0
tokenizers                   0.21.1
toml                         0.10.2
tomli                        2.0.2
tqdm                         4.67.1
tree-sitter                  0.21.3
tree-sitter-languages        1.10.2
types-requests               2.32.0.20250306
typing_extensions            4.12.2
typing-inspect               0.9.0
urllib3                      2.3.0
wcmatch                      8.5.2
wcwidth                      0.2.13
websockets                   14.2
Werkzeug                     3.1.3
wrapt                        1.17.2
wsproto                      1.2.0
xlrd                         2.0.1
zipp                         3.21.0
zstandard                    0.23.0

I used main branch to run on raw sources (commit 126f2c5a31e1dbc052235e40c0661e16a615f71b).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions