[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4844abdd700120120fc76c29d911bcb547700baf by Łukasz Langa in branch '3.8': [3.8] bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964). (GH-26056)

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-12 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +24696 pull_request: https://github.com/python/cpython/pull/26056 ___ Python tracker ___

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0cb9775a85a051556461ea9c3089244601b7d4f8 by Steve Dower in branch '3.9': bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964) (GH-26052)

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-11 Thread Steve Dower
Steve Dower added the comment: Thanks for the patch! I don't think this meets the 3.8 bar now, but if Łukasz wants it then it should be easy. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-11 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +24692 pull_request: https://github.com/python/cpython/pull/26052 ___ Python tracker ___

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-11 Thread Tomasz Magulski
Change by Tomasz Magulski : -- nosy: +magul ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-07 Thread Miguel Brito
Change by Miguel Brito : -- keywords: +patch pull_requests: +24621 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25964 ___ Python tracker

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-07 Thread Rikard Nordgren
Rikard Nordgren added the comment: Thanks all for looking into this! > Though I'm sure the OP would > have noticed if their call was never returning any modules, so > presumably it must have worked somehow. Yes, that snippet returns modules with the previous versions of python 3.8 and

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Steve Dower
Steve Dower added the comment: > I can reproduce it on latest master running on Linux. Interesting. Perhaps my actual change was to cause it to raise an error earlier (outside of a handler)? Which would mean that the Path object was always failing before, just silently. Arguably we should

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Miguel Brito
Miguel Brito added the comment: I can reproduce it on latest master running on Linux. steve.dower: I wrote some tests and wrapping get_importer argument with os.fsdecode() fixes it. I'm happy to open an PR, just let me know or if OP is not willing to do so either. -- nosy:

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: It's mentioned that Python 3.9.5 has this regression but the code works fine on my windows machine. Is this only reproducible on POSIX? -- nosy: +shreyanavigyan versions: -Python 3.11 ___ Python tracker

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Steve Dower
Steve Dower added the comment: To be clear, I'll get to this when I can, but if someone else wants to write the fix I'm happy to review and merge. Don't wait for me to do this one just because I'm assigned. -- versions: +Python 3.11 ___ Python

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Steve Dower
Steve Dower added the comment: Looks like it was always getting lucky in the past, as sys.path requires strings, and the "path" argument here is an alternative to it. The cache was definitely not working as intended. So while it's not clearly documented anywhere (other than the related

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: (obviously we're missing any tests for use of Path objects in this situation) -- stage: -> needs patch type: crash -> behavior ___ Python tracker

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue43105 and https://github.com/python/cpython/pull/25121 caused this regression. -- assignee: -> steve.dower keywords: +3.8regression, 3.9regression nosy: +gregory.p.smith, lukasz.langa, steve.dower priority: normal ->

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Rikard Nordgren
New submission from Rikard Nordgren : The pkgutil.iter_modules crash when using Path object in the first argument. The code below works in python 3.8.9 and 3.9.4, but stopped working in python 3.8.10 and 3.9.5. Changing from Path to str works in all versions. import pkgutil from pathlib