[Windows] scandir returns filenotfound for long paths but os.walk does not

Aperta
#90,242 20 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia eseguendo test_dir_scan_dir.py su Windows con la struttura di directory lunga descritta nell’issue, quindi confrontane il comportamento con test_os_walk.py. Ispeziona la gestione dei percorsi relativa a scandir e verifica che i percorsi lunghi non producano più FileNotFoundError, mentre os.walk continua a funzionare. Conferma il comportamento con un test di regressione mirato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

3.9 (EOL) OS-windows tests topic-IO
BPO 46084
Nosy @pfmoore, @tjguk, @jkloth, @zware, @serhiy-storchaka, @eryksun, @zooba
Files
  • test_dir_scan_dir.py: can be used to show filenotfound issue with long directory names. os_walk does not do the same thing.
  • test_os_walk.py: this script works just fine on the same directory structure.
  • test_dir_scan_dir.py: can be used to show filenotfound issue with long directory names. os_walk does not do the same thing.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-12-15.14:54:30.143>
    labels = ['expert-IO', 'tests', 'OS-windows', 'type-crash', '3.9']
    title = 'Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not'
    updated_at = <Date 2022-03-21.18:46:36.102>
    user = 'https://bugs.python.org/jschwar313'
    

    bugs.python.org fields:

    activity = <Date 2022-03-21.18:46:36.102>
    actor = 'jkloth'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests', 'Windows', 'IO']
    creation = <Date 2021-12-15.14:54:30.143>
    creator = 'jschwar313'
    dependencies = []
    files = ['50492', '50493', '50495']
    hgrepos = []
    issue_num = 46084
    keywords = ['patch']
    message_count = 13.0
    messages = ['408607', '408608', '408617', '408619', '408621', '408623', '408625', '408626', '408632', '408634', '408636', '408643', '408649']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'tim.golden', 'jkloth', 'zach.ware', 'serhiy.storchaka', 'eryksun', 'steve.dower', 'jschwar313']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue46084'
    versions = ['Python 3.9']
    

    Lingua principale
    Python
    Stelle
    77.2k
    Fork
    36k
    Merge medio
    1g 9h
    PR unite (30g)
    558

    Guida per i contributori

    Apri la guida per i contributori

    Come iniziare

    1. Leggi tutta la issue e poi la guida ai contributi del progetto.
    2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
    3. Fai un fork del repository e lavora su un branch.
    4. Apri una pull request che faccia riferimento al numero della issue.

    Altre issue di python/cpython

    Tutte le issue di python/cpython

    Issue simili

    Altre issue su Python

    Ricevi le nuove issue nella tua casella

    Un breve riepilogo di issue GitHub adatte ai principianti.