dephell / dephell_archive

Pathlib for archives
MIT License
1 stars 6 forks source link

iterdir recursive not implemented #5

Closed jayvdb closed 4 years ago

jayvdb commented 4 years ago

The definition of 'recursive' needs clarification. Recursively opening archives can also mean opening archives found within an archive.

Also as recursive=False was the default, and was not implemented, instead all users had the default behaviour of the non-default recursive=True.

Nearly all the current usage of iterdir in dephell repos is using the default, so implementing the default is going to break most repos.

As a result, the way to have least side effects is to change the default to match the prior implementation, i.e. change the arg to be default recursive=True.

jayvdb commented 4 years ago

Noted at https://github.com/dephell/dephell_archive/pull/6#issuecomment-569244880 , the implementation of iterdir (and glob) also doesnt handle member_path.

jayvdb commented 4 years ago

As pathlib.Path.iterdir doesnt provide a recursive, and is non-recursive according to the spec, it should be renamed to _recursive=False as it is a non-standard feature.

The resulting breakage elsewhere in dephell is therefore unavoidable.