[issue17343] Add a version of str.split which returns an iterator

2021-02-26 Thread Paweł Miech
Paweł Miech added the comment: Making string.split iterator sounds like an interesting task. I found this issue because recently we talked in project that string.split returns a list and it can cause increased memory usage footprint for some tasks when there is large response to parse

[issue41238] Python 3 shelve.DbfilenameShelf is generating 164 times larger files than Python 2.7 when storing dicts

2020-07-08 Thread Paweł Miech
Paweł Miech added the comment: Ok so I see this is an issue that involves the way Pickle pickles Python set objects. Updated script to reproduce appended. Apparently, sets are becoming much larger when stored in Python3 pickle. -- Added file: https://bugs.python.org/file49308

[issue41238] Python 3 shelve.DbfilenameShelf is generating 164 times larger files than Python 2.7 when storing dicts

2020-07-08 Thread Paweł Miech
New submission from Paweł Miech : I'm porting some code from Python 2.7 to Python 3.8. There is some code that is using shelve.DbfilenameShelf to store some nested dictionaries with sets. I found out that compared with Python 2.7 Python 3.8 shelve generates files that are approximately 164

[issue39276] type() cause segmentation fault in callback function called from C extension

2020-01-09 Thread Paweł Karczewski
New submission from Paweł Karczewski : How to reproduce: 1. Create callback function, which may take any object and run type() on it def builtin_type_in_callback(obj): type(obj) 2. Create C extension with two types defined in it - Internal and External. Eternal type should

[issue20784] 'collections.abc' is no longer defined when collections is imported

2018-04-11 Thread Paweł
Paweł <pawciob...@gmail.com> added the comment: I had similar issue and it helped when as a workaround I use 'pip install .' as opposed to 'python setup.py develop' in my project. I hope this will give you a hint. -- components: +Library (Lib) nosy: +pawciobiel versions: +Pyth

[issue33027] handling filename encoding in Content-Disposition by cgi.FieldStorage

2018-03-22 Thread Paweł
Paweł <pawciob...@gmail.com> added the comment: duplicate of https://bugs.python.org/issue23434 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <

[issue23434] support encoded filename in Content-Disposition for HTTP in cgi.FieldStorage

2018-03-22 Thread Paweł
Paweł <pawciob...@gmail.com> added the comment: I didn't find this and created a duplicate https://bugs.python.org/issue33027 I've added similar/updated changes https://github.com/python/cpython/pull/6027 @r.david.murray wouldn't it be wise to do one step at a time rather than implem

[issue33027] handling filename encoding in Content-Disposition by cgi.FieldStorage

2018-03-08 Thread Paweł
Change by Paweł <pawciob...@gmail.com>: -- keywords: +patch pull_requests: +5790 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33027] handling filename encoding in Content-Disposition by cgi.FieldStorage

2018-03-08 Thread Paweł
New submission from Paweł <pawciob...@gmail.com>: It appears that cgi.FieldStorage does not handle Content-Disposition with filenames with defined encoding. (according to RFC5987) Example: ''' Content-Disposition: form-data; name="file"; filename*=utf-8''upload_test_file_%C5%8

[issue25630] SIGSEGV in os.putenv()

2015-11-15 Thread Paweł Krawczyk
New submission from Paweł Krawczyk: A numerical value argument of the os.putenv() call causes my python3.5 to crash with SIGSEGV, for example: Python 3.5.0+ (default, Oct 11 2015, 09:05:38) [GCC 5.2.1 20151010] on linux Type "help", "copyright", "credits" or

[issue24197] minidom parses comments wrongly

2015-05-14 Thread Paweł
New submission from Paweł: from xml.dom import minidom html = html body !-- img src=/images/obraz--super.jpg/ -- /body /html minidom.parseString(html) Result: Traceback (most recent call last): File minidom.py, line 10, in module minidom.parseString(html) File /usr/lib

[issue23281] Access violation - pyc file

2015-01-20 Thread Paweł Zduniak
Paweł Zduniak added the comment: This file is created by fuzzer -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23281 ___ ___ Python-bugs-list

[issue23281] Access violation - pyc file

2015-01-19 Thread Paweł Zduniak
New submission from Paweł Zduniak: (950.e58): Access violation - code c005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Paweł Wroniszewski
New submission from Paweł Wroniszewski: I encountered the problem in logging module, but it is broader then that. Have a look at the following code: import time DATE_FORMAT = '%d/%b/%Y %H:%M:%S%z %Z' print(time.strftime(DATE_FORMAT)) print(time.strftime(DATE_FORMAT,time.localtime

[issue19267] Logging to file does not accept UTF16

2013-10-15 Thread Paweł Wroniszewski
New submission from Paweł Wroniszewski: The following code reproduces the error: import logging logging.root.addHandler(logging.FileHandler(filename='test.log',encoding='UTF16')) logging.error( u'b\u0142\u0105d') I think the problem is in the line logging/__init__.py:860: ufs = fs.decode

[issue19267] Logging to file does not accept UTF16

2013-10-15 Thread Paweł Wroniszewski
Paweł Wroniszewski added the comment: Hi Victor. Your fix works, but actually using simply ufs='%s\n' also seem to work, as type( '%s' % u'foo') and type( u'%s' % u'foo') returns the same - unicode. So I would suggest dropping ufs completely, and changing the two occurences to fs. It works

[issue19267] Logging to file does not accept UTF16

2013-10-15 Thread Paweł Wroniszewski
Paweł Wroniszewski added the comment: Btw I also don't see the purspose of fs.decode(stream.encoding), as it should rather be encoded and not decoded... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19267

[issue19267] Logging to file does not accept UTF16

2013-10-15 Thread Paweł Wroniszewski
Paweł Wroniszewski added the comment: Cool - looks good to me as well. Thanks guys. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19267

[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2011-04-21 Thread Paweł Widera
Paweł Widera mo...@man.poznan.pl added the comment: No. As the value of the href attribute is not suppose to contain spaces, I'd rather expect the parser to assume that there is an ending missing before the space. -- ___ Python tracker rep

[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2011-04-14 Thread Paweł Widera
Paweł Widera mo...@man.poznan.pl added the comment: Great! With one but... the second case *is* handled by browsers. Browsers do not throw an exception on it as HTMLParser do. So improvement is definitely possible here. If it is worth an effort, it is not for me to judge

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2009-06-04 Thread Paweł Widera
Changes by Paweł Widera mo...@man.poznan.pl: -- nosy: +momat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue670664 ___ ___ Python-bugs-list mailing

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2009-06-04 Thread Paweł Widera
Paweł Widera mo...@man.poznan.pl added the comment: A simple workaround for the BeautifulSoup is the following wrapper. It sanitize the javascript code before passing it to the parser by joining the disjoint strings, so that /scr+ipt becomes /script. def bs(input): pattern = re.compile

[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2009-06-04 Thread Paweł Widera
New submission from Paweł Widera mo...@man.poznan.pl: Of course both are not correct HTML but are easy to guess, so I believe the parser should not give up too quick here. 1) extra comma between attributes form action=/xxx.php?a=1amp;b=2amp, method=post 2) missing closing quotation mark

[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2009-06-04 Thread Paweł Widera
Paweł Widera mo...@man.poznan.pl added the comment: It depends whether you want a HTMLParser to be an useful tool that can deal with real world HTML or just a toy without practical meaning. Crashing on every little deviation from the standard, where more relaxed approach is possible, doesn't