[New-bugs-announce] [issue23657] Don't do isinstance checks in zipapp

Brett Cannon report at bugs.python.org
Fri Mar 13 15:50:10 CET 2015

New submission from Brett Cannon:

As it stand, zipapp's code checks for str and then otherwise assumes an object is a file-like object. It might work out better to do some duck typing and simply check if an object has 'read' and 'readline' attributes then it's a file-like object and otherwise that it's a path.

Doing this would then potentially make it easier to use pathlib.Path through the module rather than the os module.

assignee: pmoore
components: Library (Lib)
messages: 238030
nosy: brett.cannon, pmoore
priority: normal
severity: normal
stage: needs patch
status: open
title: Don't do isinstance checks in zipapp
type: enhancement
versions: Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list