This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Misspelled _IGNORED_ERROS in Lib/pathlib.py
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: andrei.avk, badalsahani, serhiy.storchaka
Priority: low Keywords: patch

Created on 2021-11-20 15:14 by andrei.avk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pathlib.py badalsahani, 2021-11-21 12:04 Corrected Misspelled _IGNORED_ERROS to _IGNORED_ERROS
Pull Requests
URL Status Linked Edit
PR 29686 badalsahani, 2021-11-21 12:04
PR 30292 merged andrei.avk, 2021-12-29 18:45
Repositories containing patches
https://github.com/badal8381/cpython
Messages (7)
msg406660 - (view) Author: Andrei Kulakov (andrei.avk) * (Python triager) Date: 2021-11-20 15:14
Should be _IGNORED_ERRORS

This name was added 3 years ago: https://github.com/python/cpython/commit/216b745eafa7cd4a683a8405dcfbd7f5567f504c

It's only used in a single place in the module. But I'm not sure if it's worth fixing. It is an internal, undocumented name, and not very likely to be used in user code but it's possible.
msg406710 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-11-21 10:56
If it is only used in a single place in the module would not be better to inline it?
msg406711 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-11-21 10:58
BTW, is not the correct name _IGNORED_ERRNOS?
msg406712 - (view) Author: Badal Sahani (badalsahani) * Date: 2021-11-21 12:04
Corrected Misspelled _IGNORED_ERROS in Lib/pathlib.py to _IGNORED_ERRORS
msg406716 - (view) Author: Andrei Kulakov (andrei.avk) * (Python triager) Date: 2021-11-21 14:09
Serhiy: I think you're right, it was likely meant to be _IGNORED_ERRNOS; for inlining it, it looks like it wasn't inlined to be more readable, but if we inline it, we should also inline _IGNORED_WINERRORS. I don't mind inlining both.
msg409301 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-29 11:28
It was assigned to a variable initially because it was used in multiple places. Now it is only used in one place, but I agree with keeping the variable for readability.

But it should be named _IGNORED_ERRNOS.
msg409353 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-30 07:45
New changeset 8d7644fa64213207b8dc6f555cb8a02bfabeced2 by andrei kulakov in branch 'main':
bpo-45853: Fix misspelling and unused import in pathlib (GH-30292)
https://github.com/python/cpython/commit/8d7644fa64213207b8dc6f555cb8a02bfabeced2
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 90011
2021-12-30 07:46:26serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-12-30 07:45:14serhiy.storchakasetmessages: + msg409353
2021-12-29 18:45:23andrei.avksetpull_requests: + pull_request28506
2021-12-29 11:28:22serhiy.storchakasetmessages: + msg409301
2021-11-21 14:09:32andrei.avksetmessages: + msg406716
2021-11-21 12:04:25badalsahanisetfiles: + pathlib.py


keywords: + patch
nosy: + badalsahani
hgrepos: + hgrepo411
stage: needs patch -> patch review
messages: + msg406712
pull_requests: + pull_request27925
2021-11-21 10:58:16serhiy.storchakasetmessages: + msg406711
2021-11-21 10:56:41serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg406710
2021-11-20 15:15:11andrei.avksetpriority: normal -> low
stage: needs patch
type: enhancement
components: + Library (Lib)
versions: + Python 3.11
2021-11-20 15:14:11andrei.avkcreate