[issue40084] HTTPStatus has incomplete dir() listing

2020-12-14 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-12-14 Thread miss-islington


miss-islington  added the comment:


New changeset 33cbb04986d0dabb9c542edc52bb4ea6106d3a81 by Miss Islington (bot) 
in branch '3.9':
bpo-40084: Enum - dir() includes member attributes (GH-19219)
https://github.com/python/cpython/commit/33cbb04986d0dabb9c542edc52bb4ea6106d3a81


--

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-12-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22604
pull_request: https://github.com/python/cpython/pull/23746

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset f6d1520219899874d78e7710934c9b21af880f9a by Miss Islington (bot) 
in branch '3.8':
bpo-40084: [Enum] dir() includes member attributes (GH-19219) (GH-22853)
https://github.com/python/cpython/commit/f6d1520219899874d78e7710934c9b21af880f9a


--

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21798
pull_request: https://github.com/python/cpython/pull/22854

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21797
pull_request: https://github.com/python/cpython/pull/22853

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-09-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +21383
pull_request: https://github.com/python/cpython/pull/22338

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-09-21 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 68526fe258da8c01196fd7cf48e8e5f1280bf8fd by Angelin BOOZ in 
branch 'master':
bpo-40084: Enum - dir() includes member attributes (GH-19219)
https://github.com/python/cpython/commit/68526fe258da8c01196fd7cf48e8e5f1280bf8fd


--

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21384
pull_request: https://github.com/python/cpython/pull/22339

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-09-21 Thread Ethan Furman


Change by Ethan Furman :


--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-29 Thread Angelin BOOZ


Change by Angelin BOOZ :


--
keywords: +patch
nosy: +lem
nosy_count: 4.0 -> 5.0
pull_requests: +18581
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19219

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Ethan Furman


Ethan Furman  added the comment:

Adding to the existing dir() is as easy as writing one's own __dir__.

I think using the instance dict and omitting any keys with a leading underscore 
will do the right thing most of the time.

The fix should into `Enum` and not just `IntEnum` as other enumerations could 
also have extra attributes.

--
assignee:  -> ethan.furman
keywords: +newcomer friendly
stage:  -> needs patch

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The dir() listing omits the attributes "description" and "phrase":

>>> import http
>>> from pprint import pp
>>> r = http.HTTPStatus(404)
>>> pp(vars(r))
{'_value_': 404,
 'phrase': 'Not Found',
 'description': 'Nothing matches the given URI',
 '_name_': 'NOT_FOUND',
 '__objclass__': }
>>> r.value
404
>>> r.name
'NOT_FOUND'
>>> r.description
'Nothing matches the given URI'
>>> r.phrase
'Not Found'
>>> dir(r)
['__class__', '__doc__', '__module__', 'as_integer_ratio', 'bit_length', 
'conjugate', 'denominator', 'from_bytes', 'imag', 'name', 'numerator', 'real', 
'to_bytes', 'value']

One fix would be to teach IntEnum.__dir__() to include entries in the instance 
dict.  Another fix would be to provide a way for a IntEnum subclass to add to 
the known members list.

--
components: Library (Lib)
messages: 365138
nosy: ethan.furman, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: HTTPStatus has incomplete dir() listing
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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