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

Properties parameter to the configure API has become required in 1.6.1 #975

Closed
kcuzner opened this issue Jul 7, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@kcuzner
Copy link

kcuzner commented Jul 7, 2022

Environment data

  • debugpy version: 1.6.1 (run import debugpy; print(debugpy.__version__) if uncertain)
  • OS and version: Windows 10 / CentOS 7 (fails on both)
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.2 via pyenv
  • Using VS Code or Visual Studio: No

Actual behavior

I am doing the following in my module, which worked in 1.6.0:

debugpy.configure(python=_path_to_any_working_python3())
debugpy.listen(5678)

Upon running my script, which has debugpy.configure executing as the module is importing, I get the following stack dump:

#                        File "<snip>", line 89, in <module>
#
#                          debugpy.configure(python=_path_to_any_working_python3())
#
#                        File "<snip>\lib\site-packages\debugpy\public_api.py", line 31, in wrapper
#
#                          return wrapped(*args, **kwargs)
#
#                      TypeError: configure() missing 1 required positional argument: 'properties'

It would appear that the properties argument to configure suddenly became required. Was this intentional? Or was I perhaps using it wrong in the first place?

Expected behavior

No errors

Steps to reproduce:

  1. Install debugpy 1.6.1
  2. Use the configure function in the same manner as worked in 1.6.0
  3. ...
  4. Profit!
@kcuzner kcuzner changed the title Properties parameter to the configure API has become required in 1.6.1, a breaking change Properties parameter to the configure API has become required in 1.6.1 Jul 7, 2022
@fabioz
Copy link
Collaborator

fabioz commented Jul 7, 2022

This really seems like some unintended change in the debugpy api.

@int19h would you like to take a look at that or do you want me to check it?

@kcuzner the workaround until this is fixed is doing one of the calls below:

debugpy.configure({'python':_path_to_any_working_python3()})
debugpy.configure({}, python=_path_to_any_working_python3())

@int19h int19h self-assigned this Jul 7, 2022
@int19h int19h added the bug Something isn't working label Jul 7, 2022
@int19h
Copy link
Contributor

int19h commented Jul 7, 2022

This is a regression from the refactoring that added type signatures. I'll address this ASAP. As it is a breaking API change, the fix warrants a point release.

int19h pushed a commit to int19h/debugpy that referenced this issue Jul 7, 2022
@int19h int19h closed this as completed in 5da7721 Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants