[issue27973] urllib.urlretrieve() fails on second ftp transfer

2017-04-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- pull_requests: +1193 ___ Python tracker ___ ___

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-07 Thread Eryk Sun
Eryk Sun added the comment: In Windows IDLE 3.x, you should still be able to print a surrogate transcoding, which sneaks the native UTF-16LE encoding around tkinter: def transurrogate(s): b = s.encode('utf-16le') return ''.join(b[i:i+2].decode('utf-16le', 'surrogatepass')

[issue24117] Wrong range checking in GB18030 decoder.

2017-04-07 Thread Ma Lin
Ma Lin added the comment: I closed this issue, because it involved too many things. 1, for GB18030 decoder bug, see issue29990. 2, for hz encoder bug, see issue30003. 3, for problem in Traditional Chinese codecs, please create a new issue. -- ___

[issue30003] Remove hz codec

2017-04-07 Thread Ma Lin
Ma Lin added the comment: >From my subjective feelings, probably no old archives still exist, but I can't >assert it. That's why I suggest remove it, or at least don't fix it. Ah, let's slow down the pace, this bug exists over a dacade, we don't need to solve it at once. I closed #24117,

[issue30020] Make attrgetter use namedtuple

2017-04-07 Thread Isaac Morland
New submission from Isaac Morland: I would find it useful if the tuples returned by attrgetter functions were namedtuples. An initial look at the code for attrgetter suggests that this would be an easy change and should make little difference to performance. Giving a namedtuple where

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your report touches on four different issues. 1. IDLE uses tkinter for the GUI and tkinter wraps tcl/tk 8.6 or earlier, which only handles Basic Multilingual Plane chars (codepoints to ). The gun and knife chars are out of that range. I have read

[issue30003] Remove hz codec

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: "But for any codec, there might be archives, even if the codec is not used for new files." The bug is in the encoder. The codec is still usable to *decode* files. So maybe a few people use it but didn't notice the encoder bug? --

[issue30000] Inconsistency in the zlib module

2017-04-07 Thread Martin Panter
Martin Panter added the comment: I don’t have a strong opinion on adding the missing parameters to the one-shot “compress” function, though it does seem beneficial to have a consistent set of parameters supported across the relevant APIs. -- ___

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-07 Thread Martin Panter
Martin Panter added the comment: It looks like the zip entry writer object may not expect its “close” method to be called multiple times. Other file objects tend to allow this with no ill effect. Adding Serhiy and Thomas who implemented the writer object in Issue 26039. The first time it is

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-07 Thread Ellison Marks
Ellison Marks added the comment: At a guess, when encoder goes out of scope, it closes the underlying file object. Then, on exiting the with block, the zipfile tries to take some action with the closed file and errors out? -- nosy: +Ellison Marks

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-07 Thread Martin Panter
Martin Panter added the comment: Raphael: Can you point to the implementation code that handles file objects without a file descriptor (or give a demonstration of it)? I suspect there is no such support and you are mistaken. Perhaps we can instead clarify in the “subprocess” documentation

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Martin Panter
Martin Panter added the comment: I agree this is not a bug. It is just one of the unfortunate compatibility breaks between Py 2 and 3. Mode="rt" is not one of the values that are supported according to the documentation; adding support would be a new feature. I understand the file mode

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Charles-François Natali
Charles-François Natali added the comment: This refactoring was already suggested a long time ago, and at the time both Guido and I didn't like it because it makes the code actually more complicated: DRY in this case doesn't apply IMO. Also, this whole thread is a repeat of:

[issue29939] Compiler warning in _ctypes_test.c

2017-04-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset ae0915e42d8cd96e5ced1fc442ea078b4a59e82d by Vinay Sajip in branch '3.5': Closes bpo-29939: suppress compiler warnings in _ctypes_test (#1039) https://github.com/python/cpython/commit/ae0915e42d8cd96e5ced1fc442ea078b4a59e82d -- status: open

[issue29939] Compiler warning in _ctypes_test.c

2017-04-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset d0d575a6db8cb3b2a720be9f404af3d754da9a5d by Vinay Sajip in branch '3.6': bpo-29939: suppress compiler warnings in _ctypes_test (#1038) https://github.com/python/cpython/commit/d0d575a6db8cb3b2a720be9f404af3d754da9a5d --

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Peter
Peter added the comment: A workaround for my use case is even simpler, something like this: try: handle = gzip.open(filename, "rt") except ValueError: # Workaround for Python 2.7 under Windows handle = gzip.open(filename, "r") However, even this is troublesome for use in

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
Charles McEachern added the comment: That seems to do it! Looks like the trick is to define __reduce__ to help out the serializer. Thanks! -- ___ Python tracker

[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-04-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue1207613] Idle Editor: Bottom Scroll Bar

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't like telling people to hand-edit .idlerc files. It causes too many problems. We added Extensions tab to avoid this. I think all supported options should be on dialog. Windows are resizable and accommodate lines up to current width. Default width

[issue29939] Compiler warning in _ctypes_test.c

2017-04-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +1192 ___ Python tracker ___ ___

[issue29939] Compiler warning in _ctypes_test.c

2017-04-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +1191 ___ Python tracker ___ ___

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Eryk Sun
Eryk Sun added the comment: You want to hack a fake text mode, which won't do new-line translation or treat ^Z (0x1a) as EOF like a normal 2.x text mode on Windows. Can't you just use io.TextIOWrapper(gzip.open(filename))? This reads Unicode. --

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread R. David Murray
R. David Murray added the comment: I suspect you just need to add pickle support to your class. When I subclassed str in the email package, I found I needed to do that. I'd have to go through the docs again to remember how the code works, but you can take a look at the BaseHeader class in

[issue30008] OpenSSL 1.1.0 deprecated functions

2017-04-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +alex, christian.heimes, dstufft, janssen ___ Python tracker ___

[issue30003] Remove hz codec

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: We seldom just remove things; we usually deprecate in the doc and if possible, issue a runtime warning. This is probably not the only obsolete codec. There should be a uniform policy for deprecation and removal, if ever. But for any codec, there might be

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Davin Potts
Davin Potts added the comment: > I am unfortunately not at liberty to share the code I'm working on. I very much understand and am very thankful you took the time to create a simple example that you could share. Honestly, that's the reason I felt inspired to stop what I was doing to look at

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'crash' means OS message rather than Python exiting with exception traceback and message. Can you post a minimal reproducer? What OS? subprocess.Popen._get_handles is different on POSIX and windows, though both seem to call f.fileno() without try-except.

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
Charles McEachern added the comment: This caused me several hours of misery yesterday, trying to isolate what was going wrong. I am unfortunately not at liberty to share the code I'm working on. The example on GitHub has the general thrust of it: my constructor was always called in a

[issue28643] Broken makefile depends for profile-opt target

2017-04-07 Thread Douglas Greiman
Changes by Douglas Greiman : -- nosy: +dgreiman ___ Python tracker ___ ___

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Davin Potts
Davin Potts added the comment: Expanding my above example to show how multiprocessing relates: >>> import multiprocessing >>> import os >>> class Floof(object): ... def __new__(cls): ... print("New via pid=%d" % os.getpid()) ... return object.__new__(cls) ... >>> os.getpid()

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Peter
Peter added the comment: I want a simple cross platform (Linux/Mac/Windows) and cross version (Python 2/3) way to be able to open a gzipped file and get a string handle (default encoding TextIOWrapper under Python 3 is fine). My use-case is specifically for documentation examples. Previously

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Davin Potts
Davin Potts added the comment: It looks like the first 'Called Foo.__new__' is being reported by the child (pool of 1) process and the second 'Called Foo.__new__' is being reported by the parent process. In multiprocessing, because objects are by default serialized using pickle, this may be

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want to know if a function returns a generator, you have to call it and pass the result to *isgenerator*, or use type-annotated functions (see the typing module) and static type checkers. -- ___ Python

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: A generator function *gf* is a function that contain *yield* in its body. When it is compiled, flag CO_GENERATOR is set in gf.__code__.co_flags. When the function is called, the flag is queried and if set, a special path is taken that attaches the live but

[issue30019] IDLE got unexpexted bahavior when trying to use some characters

2017-04-07 Thread David E. Franco G.
New submission from David E. Franco G.: wandering for the internet I fount some unicode character in a random comment, and just for curiosity I wanted to use python (3.6.1) to see their value, so I copy those characters and paste them in IDLE, and in doing so it just close without warning or

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. And if the sub-exceptions are different, prepend them to the messages in the OSError list. -- nosy: +terry.reedy ___ Python tracker

[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-04-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- pull_requests: +1190 ___ Python tracker ___ ___

[issue29975] Issue in extending documentation

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with the rejection on the PR. -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @neologix: here's a PR which refactors the poll-related classes: https://github.com/python/cpython/pull/1035/files >From there, we'll be able to avoid modify() code duplication. -- ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is math.exp(x) always more accurate than math.e ** x? If so, doc could say so. Otherwise, should this be closed? -- nosy: +terry.reedy ___ Python tracker

[issue23984] Documentation error: Descriptors

2017-04-07 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1189 ___ Python tracker ___

[issue29071] IDLE doesn't highlight f-strings properly

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: #29287 is about syntax highlighting the code within f-strings as code rather than as part of the string. -- ___ Python tracker

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Eryk Sun
Eryk Sun added the comment: In Python 3, gzip.open(filename, "rt") returns a TextIOWrapper using the system's default encoding. The decoded output is potentially very different from the byte string returned by 'text mode' in Python 2, even if using "rt" mode didn't result in the nonsensical

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: In certain protocols modify() is supposed to be used on every interaction between client and server. E.g. an FTP server does this: - register(fd, EVENT_READ); recv() # wait command from client - modify(fd, EVENT_WRITE); send(response) # send

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-07 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue30015] Windows also treats full-width spaces as a delimiter when parsing arguments

2017-04-07 Thread LCY
LCY added the comment: Thank you for testing and explanation. My test cases are not enough. I will close this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Charles-François Natali
Charles-François Natali added the comment: > I don't think that selector.modify() can be a bottleneck, but IMHO the change > is simple and safe enough to be worth it. In a network server with 10k > client, an optimization making .modify() 1.52x faster is welcomed. IMHO it complicates the code

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread R. David Murray
R. David Murray added the comment: I don't think this is really a bug, I think it's a consequence of the different byte/string models of python2 and python3 coupled with the different binary/text models of posix and windows. -- nosy: +r.david.murray

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
New submission from Charles McEachern: I'm calling the constructor of Foo, a subclass of str. Expected output: Called Foo.__new__ with args = ('TIMESTAMP', 'INPUT0') TIMESTAMP OUTPUT0 When I make the call using a multiprocessing.pool.ThreadPool, it works fine. But when I make the call using a

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-07 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue30015] Windows also treats full-width spaces as a delimiter when parsing arguments

2017-04-07 Thread Eryk Sun
Eryk Sun added the comment: > Windows also treats full-width spaces as a delimiter when parsing > command line arguments. CreateProcess has to parse the beginning of the command-line string if the lpApplicationName parameter is omitted. According to the documentation, it treats "white space"

[issue29958] Use add_mutually_exclusive_group(required=True) in zipfile and tarfile CLI

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29958] Use add_mutually_exclusive_group(required=True) in zipfile and tarfile CLI

2017-04-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 150cd1916a59e750ce88c65325de9ef0c42c6cb5 by Serhiy Storchaka in branch 'master': bpo-29958: Minor improvements to zipfile and tarfile CLI. (#944) https://github.com/python/cpython/commit/150cd1916a59e750ce88c65325de9ef0c42c6cb5 --

[issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue29838] Check that sq_length and mq_length return non-negative result

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue29914] Incorrect signatures of object.__reduce__() and object.__reduce_ex__()

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-07 Thread Jeremy Heiner
Changes by Jeremy Heiner : -- title: zlib -> zlib.error: Error -2 while flushing: inconsistent stream state ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue30017] zlib

2017-04-07 Thread Jeremy Heiner
New submission from Jeremy Heiner: I had some statements inside a `with` statement to write data to an entry in a ZipFile. It worked great. I added a second `with` statement containing almost exactly the same statements. That still worked great. I refactored those common statements into a

[issue27585] asyncio.Lock deadlock after cancellation

2017-04-07 Thread Mathieu Sornay
Changes by Mathieu Sornay : -- pull_requests: +1188 ___ Python tracker ___ ___

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > The idea is to reuse _BaseSelectorImpl.register() and > _BaseSelectorImpl.unregister() to factorize the code. You can't factorize the logic of modify() into those as they do two different things. I also don't like repeating the same thing 3 times but

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: > Doesn't that mean doing 3 operations (unregister(), register(), modify()) > instead of the current 2 (unregister(), register())? I don't see how it can > be faster than a single modify() syscall. The idea is to reuse _BaseSelectorImpl.register() and

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > My patch calls generic unregister() and register() of the base > classes, but it only uses one syscall per modify() call. Doesn't that mean doing 3 operations (unregister(), register(), modify()) instead of the current 2 (unregister(), register())? I

[issue30014] Speedup DefaultSelectors.modify() by 1.5x

2017-04-07 Thread STINNER Victor
Changes by STINNER Victor : -- title: Speedup DefaultSelectors.modify() by 2x -> Speedup DefaultSelectors.modify() by 1.5x ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: Giampaolo Rodola': "Your old patch uses unregister() and register() so I'm not sure what speedup that'll take as the whole point is to avoid doing that." My patch calls generic unregister() and register() of the base classes, but it only uses one syscall per

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: @neologix: Do you have a GitHub account? It's hard to me to see if https://github.com/neologix is you or not, and your GitHub username is not filled in the Bug Tracker database. -- ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR: https://github.com/python/cpython/pull/1030 -- pull_requests: +1187 ___ Python tracker ___

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Hey Stinner, thanks for chiming in! Your old patch uses unregister() and register() so I'm not sure what speedup that'll take as the whole point is to avoid doing that. You may want to rewrite it and benchmark it but it looks like it'll be slower.

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: @Giampaolo Rodola: CPython development moved to GitHub, can you please create a pull request instead of a patch? Thank you. https://docs.python.org/devguide/pullrequest.html Hum, I see that my old patch of issue #18932 (selectors_optimize_modify-2.patch) is

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: Hi Giampaolo Rodola'! It seems like you proposed the same idea 4 years ago and I wrote a similar patch: issue #18932 :-) I suggest you to use my perf module to produce more reliable benchmarks. Here is my results on my computer smithers tuned for benchmarks:

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: modify() can be used often in verbose protocols such as FTP and SMTP where a lot of requests and responses are continuously exchanged between client and server, so you need to switch from EVENT_READ to EVENT_WRITE all the time. I did a similar change some

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Charles-François Natali
Charles-François Natali added the comment: Hm, do you have a realistic benchmark which would show the benefit? Because this is really a micro-benchmark, and I'm not convinced that Selector.modify() is a significant bottleneck in a real-world application. --

[issue30016] No sideways scrolling in IDLE

2017-04-07 Thread Jensen Taylor
New submission from Jensen Taylor: This has been a bug since 2.7 as far as I know. -- assignee: terry.reedy components: IDLE messages: 291263 nosy: Jensen Taylor, terry.reedy priority: normal severity: normal status: open title: No sideways scrolling in IDLE type: enhancement versions:

[issue30015] Windows also treats full-width spaces as a delimiter when parsing arguments

2017-04-07 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1186 ___ Python tracker ___

[issue30015] Windows also treats full-width spaces as a delimiter when parsing arguments

2017-04-07 Thread 林建佑
New submission from 林建佑: Windows also treats full-width spaces as a delimiter when parsing command line arguments. Therefore, subprocess.run() and subprocess.Popen() also need to quote the arg in the sequence of arguments if there is any full-width spaces in it. Example: >>

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- components: +Library (Lib), asyncio stage: -> patch review type: -> performance ___ Python tracker

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +gvanrossum, haypo, neologix, yselivanov ___ Python tracker ___

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- versions: +Python 3.7 Added file: http://bugs.python.org/file46788/bench.py ___ Python tracker ___

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': Patch in attachment modifies DefaultSelector.modify() so that it uses the underlying selector's modify() method instead of unregister() and register() resulting in a 2x speedup. Without patch: ~/svn/cpython {master}$ ./python bench.py

[issue29549] Improve docstring for str.index

2017-04-07 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1185 ___ Python tracker ___ ___

[issue30013] Compiler warning in Modules/posixmodule.c

2017-04-07 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1184 ___ Python tracker ___ ___ Python-bugs-list

[issue30013] Compiler warning in Modules/posixmodule.c

2017-04-07 Thread Louie Lu
Changes by Louie Lu : -- title: Compiling warning in Modules/posixmodule.c -> Compiler warning in Modules/posixmodule.c ___ Python tracker

[issue30013] Compiling warning in Modules/posixmodule.c

2017-04-07 Thread Louie Lu
New submission from Louie Lu: Using gcc-6.3.1 20170306 on Linux 4.10.1, it gave the warning: gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers

[issue30012] gzip.open(filename, "rt") fails on Python 2.7.11 on win32, invalid mode rtb

2017-04-07 Thread Peter
New submission from Peter: Under Python 2, gzip.open defaults to giving (non-unicode) strings. Under Python 3, gzip.open defaults to giving bytes. Therefore it was fixed to allow text mode be specified, see http://bugs.python.org/issue13989 In order to write Python 2 and 3 compatible code to

[issue30011] HTMLParser class is not thread safe

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy nosy: +ezio.melotti ___ Python tracker ___

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-04-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If don't make PySlice_GetIndicesEx a macro when Py_LIMITED_API is not defined, it should be expanded to PySlice_Unpack and PySlice_AdjustIndices. PR 1023 does this for master branch. The patch is generated by Coccinelle's semantic patch. -- Added

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1182 ___ Python tracker ___ ___

[issue30011] HTMLParser class is not thread safe

2017-04-07 Thread Alessandro Vesely
New submission from Alessandro Vesely: SYMPTOM: When used in a multithreaded program, instances of a class derived from HTMLParser may convert an entity or leave it alone, in an apparently random fashion. CAUSE: The class has a static attribute, entitydefs, which, on first use, is

[issue30010] Initial bytes to BytesIO cannot be seeked to

2017-04-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is expected behavior. When you write to ByitesIO you overwrites the old content. If you want to append to ByitesIO, first move the position to the end: b.seek(0, io.SEEK_END). -- nosy: +serhiy.storchaka resolution: -> not a bug stage: ->

[issue30010] Initial bytes to BytesIO cannot be seeked to

2017-04-07 Thread Samuli G
New submission from Samuli G: The initial bytes provided for the BytesIO constructor are lost when the stream is written to. Seeking to offset zero, and then getting the value of the entire buffer results of getting only the bytes that have been appended by calling "write". --

[issue29960] _random.Random state corrupted on exception

2017-04-07 Thread Bryan G. Olson
Changes by Bryan G. Olson : -- pull_requests: +1181 ___ Python tracker ___ ___