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

DeprecationWarning: use poll_interval instead of poll_intervall #2236

Closed
fungi opened this issue Nov 18, 2021 · 2 comments
Closed

DeprecationWarning: use poll_interval instead of poll_intervall #2236

fungi opened this issue Nov 18, 2021 · 2 comments
Labels

Comments

@fungi
Copy link

fungi commented Nov 18, 2021

Issue

The filelock library deprecated poll_intervall in favor of poll_interval (one l instead of two) in its 3.4.0 release earlier this week. Now all tox invocations with latest filelock raise a DeprecationWarning, and terminate in a rather opaque manner if PYTHONWARNINGS is set to error (--with-traceback helps, but is usually not set when calling virtualenv from, e.g., tox).

Environment

Provide at least:

  • OS: Debian sid with manually compiled Python 3.10.0

  • pip list of the host python where virtualenv is installed:

    backports.entry-points-selectable 1.1.1
    distlib                           0.3.3
    filelock                          3.4.0
    packaging                         21.2
    pip                               21.3.1
    platformdirs                      2.4.0
    pluggy                            1.0.0
    py                                1.11.0
    pyparsing                         2.4.7
    setuptools                        59.1.1
    six                               1.16.0
    toml                              0.10.2
    tox                               3.24.4
    virtualenv                        20.10.0
    wheel                             0.37.0

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

$ PYTHONWARNINGS=error lib/tox/bin/virtualenv -vvv --with-traceback foo

498 setup logging to NOTSET [DEBUG report:39]
522 find interpreter for spec PythonSpec(path=/home/fungi/lib/tox/bin/python3) [INFO builtin:62]
523 discover exe for PythonInfo(spec=CPython3.10.0.final.0-64, exe=/home/fungi/lib/tox/bin/python3, platform=linux, version='3.10.0 (tags/v3.10.0:b494f5935c, Oct  4 2021, 22:28:32) [GCC 10.3.0]', encoding_fs_io=utf-8-utf-8) in /home/fungi/lib/cpython/3.10.0 [DEBUG py_info:399]
525 filesystem is case-sensitive [DEBUG info:29]
Traceback (most recent call last):
  File "/home/fungi/lib/tox/bin/virtualenv", line 8, in <module>
    sys.exit(run_with_catch())
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/__main__.py", line 65, in run_with_catch
    run(args, options, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/__main__.py", line 18, in run
    session = cli_run(args, options, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/run/__init__.py", line 30, in cli_run
    of_session = session_via_cli(args, options, setup_logging, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/run/__init__.py", line 48, in session_via_cli
    parser, elements = build_parser(args, options, setup_logging, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/run/__init__.py", line 70, in build_parser
    parser._interpreter = interpreter = discover.interpreter
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/discover.py", line 45, in interpreter
    self._interpreter = self.run()
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/builtin.py", line 47, in run
    result = get_interpreter(python_spec, self.try_first_with, self.app_data, self._env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/builtin.py", line 65, in get_interpreter
    for interpreter, impl_must_match in propose_interpreters(spec, try_first_with, app_data, env):
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/builtin.py", line 96, in propose_interpreters
    yield PythonInfo.from_exe(os.path.abspath(spec.path), app_data, env=env), True
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 351, in from_exe
    raise exception
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 348, in from_exe
    proposed = proposed._resolve_to_system(app_data, proposed)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 386, in _resolve_to_system
    target = target.discover_exe(app_data, prefix=prefix, exact=False)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 407, in discover_exe
    info = self._check_exe(app_data, folder, name, exact, discovered, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 424, in _check_exe
    info = self.from_exe(exe_path, app_data, resolve_to_host=False, raise_on_error=False, env=env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/py_info.py", line 344, in from_exe
    proposed = from_exe(cls, app_data, exe, env=env, raise_on_error=raise_on_error, ignore_cache=ignore_cache)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/cached_py_info.py", line 28, in from_exe
    result = _get_from_cache(cls, app_data, exe, env, ignore_cache=ignore_cache)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/cached_py_info.py", line 45, in _get_from_cache
    py_info = _get_via_file_cache(cls, app_data, exe_path, exe, env)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/discovery/cached_py_info.py", line 62, in _get_via_file_cache
    with py_info_store.locked():
  File "/home/fungi/lib/cpython/3.10.0/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/app_data/via_disk_folder.py", line 154, in locked
    with self.in_folder.lock_for_key(self.key):
  File "/home/fungi/lib/cpython/3.10.0/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/util/lock.py", line 137, in lock_for_key
    self._lock_file(lock, no_block)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/util/lock.py", line 120, in _lock_file
    lock.acquire(0.0001)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/virtualenv/util/lock.py", line 31, in acquire
    super(_CountedFileLock, self).acquire(timeout=timeout, poll_intervall=poll_intervall)
  File "/home/fungi/lib/tox/lib/python3.10/site-packages/filelock/_api.py", line 151, in acquire
    warnings.warn(msg, DeprecationWarning)
DeprecationWarning: use poll_interval instead of poll_intervall
@fungi fungi added the bug label Nov 18, 2021
@gaborbernat
Copy link
Contributor

A PR for this is welcome 👍

@fungi
Copy link
Author

fungi commented Nov 21, 2021

looks like someone already beat me to it. This should be fixed by #2237.

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

No branches or pull requests

2 participants