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

Release required to remove warnings when using python 3.12 #814

Open
ngharrington opened this issue Oct 8, 2024 · 0 comments
Open

Release required to remove warnings when using python 3.12 #814

ngharrington opened this issue Oct 8, 2024 · 0 comments

Comments

@ngharrington
Copy link

We need a new release of the master branch.

Steps to reproduce

  1. Create a new python 3.12 environment.
  2. Install pydub from pypi
  3. import AudioSegment
  4. Observe Warnings
$ uv venv --python 3.12 --no-project --seed venv312
$ uv pip install pydub --no-cache

$ python -B -c "import pydub"
/home/neal/workspace/aider-sandbox/venv312/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)
/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/utils.py:301: SyntaxWarning: invalid escape sequence '\('
  m2 = re.match('([su]([0-9]{1,2})p?)( \(default\))?$', token)
/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/utils.py:310: SyntaxWarning: invalid escape sequence '\('
  elif re.match('(flt)p?( \(default\))?$', token):
/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/utils.py:314: SyntaxWarning: invalid escape sequence '\('
  elif re.match('(dbl)p?( \(default\))?$', token):

Run python -B with the -B switch to prevent caching from supressing warnings on subsequent executions of the same command.

Expected behavior

There should be no warnings

Actual behavior

There are warnings as described above. HOWEVER, if I then install pydub from master directly, things work.

$ uv pip install --upgrade --no-cache git+https://github.com/jiaaro/pydub.git
 Updated https://github.com/jiaaro/pydub.git (996cec4)
Resolved 1 package in 2.41s
   Built pydub @ git+https://github.com/jiaaro/pydub.git@996cec42e9621701edb83354232b2c0ca0121560
Prepared 1 package in 650ms
Uninstalled 1 package in 0.51ms
Installed 1 package in 0.64ms
 - pydub==0.25.1 (from git+https://github.com/ngharrington/pydub.git@996cec42e9621701edb83354232b2c0ca0121560)
 + pydub==0.25.1 (from git+https://github.com/jiaaro/pydub.git@996cec42e9621701edb83354232b2c0ca0121560)
(venv312) neal@neal-xps:aider-sandbox$ python -B -c "import pydub"
(venv312) neal@neal-xps:aider-sandbox$ echo $?
0

Your System configuration

  • Python version: 3.12
  • Pydub version: master (github) 0.25.1 (tag/pip)
  • ffmpeg or avlib?: N/A
  • ffmpeg/avlib version: N/A

Is there an audio file you can include to help us reproduce?

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant