[issue34938] Fix mimetype.init() to account for from import

2019-10-03 Thread AWhetter


Change by AWhetter :


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

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



[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-03 Thread AWhetter


Change by AWhetter :


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

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



[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2019-10-03 Thread AWhetter


Change by AWhetter :


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

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



[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread AWhetter


Change by AWhetter :


--
pull_requests: +16177
pull_request: https://github.com/python/cpython/pull/16586

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



[issue16974] when "python -c command" does a traceback, it open the file ""

2019-10-04 Thread AWhetter


AWhetter  added the comment:

If we were to add a new attribute to indicate whether a file is real or not, 
there would need to be a way for users to indicate whether a file is real or 
not to functions such as `compile()` (there's lots more!) that take a filename. 
Without enforcing this being set and introducing backward incompatible changes, 
it would need a default value. To be backwards compatible we could default to 
True and the existing behaviour persists.

It's also worth mentioning that there's a few places (there might be more!) 
where Python already assumes that a file in angle brackets is not a real file:
* 
https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/bdb.py#L45
* 
https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/pdb.py#L694
* 
https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/pickle.py#L324

Nothing major though and easily changeable so it's definitely possible but it 
would be a lot of work to make sure that everything is setting the new 
attribute properly.

Is there a preference on what the name of this attribute should be? Maybe 
`__is_real_file__`. It's clear but long.

--
nosy: +AWhetter

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