[issue39135] time.get_clock_info() documentation still has 'clock' name

2019-12-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Would you like to propose a PR? The relevant file is at 
https://github.com/python/cpython/blob/master/Doc/library/time.rst .

--
keywords: +easy, newcomer friendly
nosy: +xtreak

___
Python tracker 

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



[issue39135] time.get_clock_info() documentation still has 'clock' name

2019-12-25 Thread Michael Wayne Goodman


New submission from Michael Wayne Goodman :

The documentation for Python 3.8 and higher still refer to 'clock' as an 
accepted 'name' argument for time.get_clock_info() that returns a namespace 
readable by time.clock(), despite time.clock() being removed since Python 3.8.

See the first bullet point in the function documentation: 
https://docs.python.org/3.8/library/time.html#time.get_clock_info

In Python 3.8, calling time.get_clock_info('clock') raises "ValueError: unknown 
clock", so it seems the bug is only in the documentation.

--
assignee: docs@python
components: Documentation
messages: 358879
nosy: docs@python, goodmami
priority: normal
severity: normal
status: open
title: time.get_clock_info() documentation still has 'clock' name
versions: 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



[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is impossible because of using newline escaping and string literal 
concatenation. In the following examples 
lineno != end_lineno, but strings use single quotes:

print('Hello '
  'world!')

print('Hello\
 world!')

Triple quotes can be also used for strings which occupy a single line of code 
and do not contain \n:

print("""exec("print('Hi!')")""")

We cannot also distinguish 1234 from 0x4_d2 and 1234.0 from 1.234e3 at the AST 
level.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-25 Thread Inada Naoki


Inada Naoki  added the comment:

I'm not sure the usage should be covered by "Abstract" syntax tree.

Isn't it a "Concrete" syntax tree?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-25 Thread Alexander Hirner


New submission from Alexander Hirner :

At runtime, we want to check whether objects adhere to a data protocol. This is 
not possible due to problematic interactions between ABC and @dataclass.

The attached file tests all relevant yet impossible cases. Those are:

1) A(object): Can't check due to "Protocols with non-method members don't 
support issubclass()" (as outlined in PEP 554)
2) B(ABC): "Can't instantiate abstract class B with abstract methods x, y"
3) C(Protocol): same as A or same as B if @property is @abstractmethod

The problem can be solved in two parts. First allowing to implement 
@abstractproperty in a dataclass (B). This doesn't involve typing and enables 
the expected use case of dataclass+ABC. I analysed this problem as follows:
Abstract properties evaluate to a default of property, not to 
dataclasses.MISSING. Hence, `dataclasses._init_fn` throws TypeError because of 
deriving from class vars without defaults.

Second, eliding the exception of @runtime_checkable Protocols with non-method 
members if and only if the the the protocol is in its MRO. I didn't think that 
through fully, but instantiation could e.g. fail for missing implementations as 
expected from ABC behaviour (see case D in attached file). I'm not sure about 
the runtime overhead of this suggestion.

--
files: dc_repro.py
messages: 358876
nosy: cybertreiber, eric.smith
priority: normal
severity: normal
status: open
title: can't construct dataclass as ABC (or runtime check as data protocol)
type: behavior
versions: Python 3.6, Python 3.8
Added file: https://bugs.python.org/file48802/dc_repro.py

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-12-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks, all!

--

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-12-25 Thread miss-islington


miss-islington  added the comment:


New changeset a5deabd8e43a76bf2d7923342b6c4395c1a5efcd by Miss Islington (bot) 
in branch '3.8':
bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) 
(GH-17677)
https://github.com/python/cpython/commit/a5deabd8e43a76bf2d7923342b6c4395c1a5efcd


--
nosy: +miss-islington

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-12-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17152
pull_request: https://github.com/python/cpython/pull/17705

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-12-25 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset e28aff54d95236ea1b64b648d89a1516e446e621 by Eric V. Smith (Fabio 
Sangiovanni) in branch 'master':
bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) 
(GH-17677)
https://github.com/python/cpython/commit/e28aff54d95236ea1b64b648d89a1516e446e621


--

___
Python tracker 

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



[issue39133] threading lib. working improperly on idle window

2019-12-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Give OS.  Provide specific code and describe specific problem.  Run the code 
directly with python from a command line to determine if IDLE is really 
involved in the problem.

--

___
Python tracker 

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



[issue16399] argparse: append action with default list adds to list instead of overriding

2019-12-25 Thread Roy Smith


Roy Smith  added the comment:

I just got bit by this in Python 3.5.3.

I get why it does this.  I also get why it's impractical to change the behavior 
now.  But, it really isn't the obvious behavior, so it should be documented at 
https://docs.python.org/3.5/library/argparse.html?highlight=argparse#default.

--
nosy: +roysmith

___
Python tracker 

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



[issue39133] threading lib. working improperly on idle window

2019-12-25 Thread Abhijeet


New submission from Abhijeet :

Threading library's Thread and start functions not showing predicted result on 
idle. Especially, newline is not invoked between two threads while sometimes 
gets invoked in result. Often, running of code stops after thread ends i.e no 
further execution. Version - 3.8.0 exe installer

--
assignee: terry.reedy
components: IDLE
messages: 358870
nosy: Pyjeet, terry.reedy
priority: normal
severity: normal
status: open
title: threading lib. working improperly on idle window
type: crash
versions: Python 3.8

___
Python tracker 

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



[issue30364] Outdated function attribute to disable address sanitizer

2019-12-25 Thread Batuhan


Change by Batuhan :


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

___
Python tracker 

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



[issue37509] OSError preadv()

2019-12-25 Thread YoSTEALTH


YoSTEALTH  added the comment:

I am closing this topic as its right for python to raise OSError as `-errno` 
must be assigned to e.g. `OSError(-errno, os.strerror(-errno))` to raise 
appropriate exception.

--
resolution:  -> not a bug
stage:  -> 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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2019-12-25 Thread Batuhan


Batuhan  added the comment:

Looks like there is nothing left after PR 1712 if I am not missing something, 
can this issue be closed?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39106] Add suggestions to argparse error message output for unrecognized arguments

2019-12-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the feedback. Closing it as rejected.

--
resolution:  -> rejected
stage:  -> 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



[issue39106] Add suggestions to argparse error message output for unrecognized arguments

2019-12-25 Thread hai shi


hai shi  added the comment:

I checked some other common clis and it is show all right available options 
too. So I thought the argparse's help function is good enough too ;)

```
$ ps -etest
error: TTY could not be found

Usage:
 ps [options]

 Try 'ps --help '
  or 'ps --help '
 for additional help text.

For more details see ps(1).
```

```
$ top test
top: unknown option 't'
Usage:
  top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
```

--
nosy: +shihai1991

___
Python tracker 

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



[issue28158] Implement LOAD_GLOBAL opcode cache

2019-12-25 Thread Inada Naoki


Inada Naoki  added the comment:

This is implemented in #26219.

--
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



[issue10401] Globals / builtins cache

2019-12-25 Thread Inada Naoki


Inada Naoki  added the comment:

This is implemented in #26219.

--
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



[issue33609] Document that dicts preserve insertion order

2019-12-25 Thread Inada Naoki


Inada Naoki  added the comment:

GH-9807 fixed it.

--
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



[issue38902] image/webp support in mimetypes

2019-12-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Similar to previous discussions having an IANA registration would improve the 
acceptance of the patch to add it. It's still not listed at 
https://www.iana.org/assignments/media-types/media-types.xhtml

--
nosy: +xtreak

___
Python tracker 

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



[issue39119] email/_header_value_parser.py:parse_message_id: UnblondLocalError

2019-12-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing it as duplicate. Feel free to reopen if it's reproducible on latest 
stable release. Thanks.

--
nosy: +maxking
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> While parsing email message id: UnboundLocalError

___
Python tracker 

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