[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-27 Thread Daniel Hillier


Daniel Hillier  added the comment:

I agree it is bad form but I would accidentally do it when I couldn't remember 
the proper API and took a stab in the dark without looking up the docs. I 
unfortunately used it in an example in the docs for pyzipper and started 
getting a few bug reports even after fixing my docs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why do you set the ZipFile.pwd attribute directly?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-23 Thread Daniel Hillier

Daniel Hillier  added the comment:

Thanks Łukasz!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Daniel! ✨  ✨

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-23 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 91099e25446b214725f8e2bec6f90553260c by Daniel Hillier in 
branch 'main':
bpo-39359: [zipfile] add missing "pwd: expected bytes, got str" exception 
(GH-18031)
https://github.com/python/cpython/commit/91099e25446b214725f8e2bec6f90553260c


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2020-05-29 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +serhiy.storchaka, twouters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2020-01-16 Thread Daniel Hillier


Change by Daniel Hillier :


--
keywords: +patch
pull_requests: +17427
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18031

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2020-01-16 Thread Daniel Hillier


New submission from Daniel Hillier :

Setting the ZipFile.pwd attribute directly skips the check to ensure the 
password is a bytes object and, if not, return a user friendly TypeError("pwd: 
expected bytes, got ") informing them of that.

--
components: Library (Lib)
messages: 360118
nosy: dhillier
priority: normal
severity: normal
status: open
title: zipfile: add missing "pwd: expected bytes, got str" exception message
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com