[issue45224] Argparse shows required arguments as optional

2021-09-16 Thread Khalid Mammadov


New submission from Khalid Mammadov :

Currently argparse module shows all optional arguments under "optional 
arguments" section of the help.
It also includes those flags/arguments that are required as well. 
This add confusion to a user and does not properly show intention

--
components: Library (Lib)
messages: 401969
nosy: khalidmammadov
priority: normal
severity: normal
status: open
title: Argparse shows required arguments as optional
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue45224>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45224] Argparse shows required arguments as optional

2021-09-16 Thread Khalid Mammadov


Khalid Mammadov  added the comment:

May I suggest to change it again so we two sections: required and optional? 
This can help to be more clear from usage perspective. I have changed it 
locally and it looks like below:

usage: myprogram.py [-h] [--foo FOO] --bar BAR

required arguments:
  --bar BAR   foo help

optional arguments:
  -h, --help  show this help message and exit
  --foo FOO   foo help

--

___
Python tracker 
<https://bugs.python.org/issue45224>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45224] Argparse shows required arguments as optional

2021-09-16 Thread Khalid Mammadov


Khalid Mammadov  added the comment:

This is another, larger example, where I actually stumbled on this when looking 
into Apache Airflow project. Below makes it confusing to see what is actually 
required and what not. Unless you look for square brackets. Would be it much 
nicer to list required ones explicitly rather than looking into options and 
figuring out which one is a must?

usage: airflow users create [-h] -e EMAIL -f FIRSTNAME -l LASTNAME [-p 
PASSWORD] -r ROLE [--use-random-password] -u USERNAME

Create a user

optional arguments:
  -h, --helpshow this help message and exit
  -e EMAIL, --email EMAIL
Email of the user
  -f FIRSTNAME, --firstname FIRSTNAME
First name of the user
  -l LASTNAME, --lastname LASTNAME
Last name of the user
  -p PASSWORD, --password PASSWORD
Password of the user, required to create a user without 
--use-random-password
  -r ROLE, --role ROLE  Role of the user. Existing roles include Admin, User, 
Op, Viewer, and Public
  --use-random-password
Do not prompt for password. Use random string instead. 
Required to create a user without --password 
  -u USERNAME, --username USERNAME
Username of the user

examples:
To create an user with "Admin" role and username equals to "admin", run:

$ airflow users create \
  --username admin \
  --firstname FIRST_NAME \
  --lastname LAST_NAME \
  --role Admin \
  --email ad...@example.org

airflow users create command error: the following arguments are required: 
-e/--email, -f/--firstname, -l/--lastname, -r/--role, -u/--username, see help 
above.

--

___
Python tracker 
<https://bugs.python.org/issue45224>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39130] Dict is reversable from v3.8 and should say that in the doc

2019-12-24 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
assignee: docs@python
components: Documentation
nosy: docs@python, khalidmammadov
priority: normal
severity: normal
status: open
title: Dict is reversable from v3.8 and should say that in the doc
type: enhancement
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39130>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39130] Dict is reversable from v3.8 and should say that in the doc

2019-12-24 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
keywords: +patch
pull_requests: +17148
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17694

___
Python tracker 
<https://bugs.python.org/issue39130>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39139] Reference to depricated collections.abc class in collections is unnecessary and confusing

2019-12-26 Thread Khalid Mammadov


New submission from Khalid Mammadov :

"Deprecated since version 3.3, will be removed in version 3.9: Moved 
Collections Abstract Base Classes to the collections.abc module. For backwards 
compatibility, they continue to be visible in this module through Python 3.8." 
on the overview is confusing as it's not listed on that page and explained on 
the next one.

--
assignee: docs@python
components: Documentation
messages: 358889
nosy: docs@python, khalidmammadov
priority: normal
severity: normal
status: open
title: Reference to depricated collections.abc class in collections is 
unnecessary and confusing
type: enhancement
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39139>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39139] Reference to depricated collections.abc class in collections is unnecessary and confusing

2019-12-26 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
keywords: +patch
pull_requests: +17153
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17707

___
Python tracker 
<https://bugs.python.org/issue39139>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39180] Missing getlines func documentation from linecache module

2020-01-01 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
assignee: docs@python
components: Documentation
nosy: docs@python, khalidmammadov
priority: normal
severity: normal
status: open
title: Missing getlines func documentation from linecache module
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39180] Missing getlines func documentation from linecache module

2020-01-01 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
keywords: +patch
pull_requests: +17216
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17784

___
Python tracker 
<https://bugs.python.org/issue39180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39130] Dict is reversable from v3.8 and should say that in the doc

2020-02-22 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39130>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39180] Missing getlines func documentation from linecache module

2020-02-22 Thread Khalid Mammadov


Khalid Mammadov  added the comment:

How to find if it was intentional or over-site?

--

___
Python tracker 
<https://bugs.python.org/issue39180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39180] Missing getlines func documentation from linecache module

2020-02-22 Thread Khalid Mammadov


Khalid Mammadov  added the comment:

Looks like it's not meant to be made public as the module is meant to be 
working on a single line. So closing the issue and PR

--
nosy:  -ammar2
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39139] Reference to depricated collections.abc class in collections is unnecessary and confusing

2020-02-22 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
resolution:  -> duplicate

___
Python tracker 
<https://bugs.python.org/issue39139>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39139] Reference to depricated collections.abc class in collections is unnecessary and confusing

2020-02-22 Thread Khalid Mammadov


Khalid Mammadov  added the comment:

Looks like this is covered in greater detail in the other PRs. So, closing the 
PR and the issue

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39139>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39180] Missing getlines func documentation from linecache module

2020-02-22 Thread Khalid Mammadov


Change by Khalid Mammadov :


--
resolution:  -> duplicate

___
Python tracker 
<https://bugs.python.org/issue39180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com