[issue37678] Incorrect behaviour for user@password URI pattern in urlparse

2019-07-25 Thread Sean Wang
New submission from Sean Wang : When an IPV4 URL with 'username:password' in it, and the password contains special characters like #[]?, urlparse would act as unexcepted. example: urlparse('http://user:pass#?[w...@example.com:80/path') -- components: Library (Lib) messages: 348431

[issue2931] optparse: various problems with unicode and gettext

2016-01-21 Thread Sean Wang
Sean Wang added the comment: This bug still exists in Python 2.7.10 with optparse version 1.5.3. When the default_value is not ASCII encoded, it would raise `UnicodeEncodeError: 'ascii' codec can't encode characters` this error is due to the `str` usage in `expand_default` method: def

[issue2931] optparse: various problems with unicode and gettext

2016-01-21 Thread Sean Wang
Sean Wang added the comment: Sorry, missed one condition: I used `unicode_literals` in Python 2.7.10, example below: >>> from __future__ import unicode_literals >>> str('api名称') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' c

[issue2931] optparse: various problems with unicode and gettext

2016-01-21 Thread Sean Wang
Sean Wang added the comment: when an unicode option.default_value could not be ascii encoded, it would throw exception, detailed logs below: File "/Users/seanwang/Documents/dev/foo/bar.py", line 119, in main parser.print_help() File "/usr/local/Cellar/python/2.7.

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
New submission from Sean Wang: I transfered a file from remote Debian host to my local Windows 10 host using SecureFX. I found that the file's last modifed date was ‎1900‎/‎1‎/1‎,‏‎0:00:00 on Windows. I tried to serve this file to be downloaded, and it crashed as follows: Exception happened

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
Sean Wang added the comment: upload a sample test file -- Added file: http://bugs.python.org/file40929/test ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-14 Thread Sean Wang
New submission from Sean Wang wangxiao8...@gmail.com: ConfigParser failed to parse a utf-8 file with BOM bytes('\xef\xbb\xbf'), it would raise ConfigParser.MissingSectionHeaderError. I think that other files with BOM would have the same problem; because the argument SECTCRE does not consider