question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move from optparse to argparse

See original GitHub issue

The optparse module has been deprecated since 3.2 in lieu of argparse.

At the time of this writing, we only have 3 modules that use it directly:

I’m filing this ticket to keep track of this task. In addition there were several attempts on this in the past that hasn’t pushed through:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wRARcommented, Jan 15, 2022

@kawishqayyum @LusiferAjay you don’t need a permission to work on any issue

0reactions
bryangatorscommented, Jan 28, 2022

I created a pull request #5382 to solve this. It is very similar to #5374 above but this commit solves the issue in scrapy/commands/view.py where “–header” option is to be removed. Still need an admin to approve workflows for codecov to run coverage tests. This is my first commit to open source and look forward to hearing any feedback. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting optparse to argparse - python
Fire up an interactive shell, define a couple of parsers, and play with the different arguments. And of course print the outputs ('opts','args', ......
Read more >
Migration to argparse from optparse #5392 - PyCQA/pylint
To do this I think it makes the most sense to do some initial preparation, namely convert all options to a new class...
Read more >
Easily Convert Optparse to Argparse Python - YouTube
Optparse is deprecated, learn how to switch to argparse (which is the standard) with minimal code edits. This is useful for legacy projects ......
Read more >
optparse — Parser for command line options
When optparse sees the option string -f , it consumes the next argument, foo.txt , and stores it in options.filename . So, after...
Read more >
441 Move from "optparse" to "argparse". - Docutils
Deprecated since version 3.2: The optparse module is deprecated and will not be developed further; development will continue with the argparse ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found