danielmiessler / fabric

fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere.
https://danielmiessler.com/p/fabric-origin-story
21.79k stars 2.28k forks source link

[Bug]: (Dependency)`pydub` warnings on python-3.12 #719

Closed mikewaters closed 2 weeks ago

mikewaters commented 1 month ago

What happened?

Upon first use (fabric -h) on Python 3.12.3/darwin I received the following warnings:

/Users/mike/Develop/MeatAug/fabric/.venv/lib/python3.12/site-packages/pydub/utils.py:300: SyntaxWarning: invalid escape sequence '\('
  m = re.match('([su]([0-9]{1,2})p?) \(([0-9]{1,2}) bit\)$', token)
/Users/mike/Develop/MeatAug/fabric/.venv/lib/python3.12/site-packages/pydub/utils.py:301: SyntaxWarning: invalid escape sequence '\('
  m2 = re.match('([su]([0-9]{1,2})p?)( \(default\))?$', token)
/Users/mike/Develop/MeatAug/fabric/.venv/lib/python3.12/site-packages/pydub/utils.py:310: SyntaxWarning: invalid escape sequence '\('
  elif re.match('(flt)p?( \(default\))?$', token):
/Users/mike/Develop/MeatAug/fabric/.venv/lib/python3.12/site-packages/pydub/utils.py:314: SyntaxWarning: invalid escape sequence '\('
  elif re.match('(dbl)p?( \(default\))?$', token):
usage: fabric [-h] [--text TEXT] ...

This is an issue with the pydub dependency (pydub-0.25.1), which was fixed and merged a few years back but hasn't made it into pypi. Related issue: test failures on python 3.12

Attached is a patch to run against your Python 3.12 venv after installing fabric:

patch -i pydub-e9ce529.patch "/where/you/keep/code/fabric/.venv/lib/python3.12/site-packages/pydub/utils.py"

Obviously this is not under your control, and the Pydub project looks like it needs some love.

Version check

Relevant log output

No response

Relevant screenshots (optional)

No response

mikewaters commented 1 month ago

I haven't observed it impacting anything, so maybe it's a big nothingburger.