[issue46922] tarfile.TarFile.next() crashes on empty tar files

2022-03-04 Thread progval
New submission from progval : Hi, I found two related bugs when calling tarfile.TarFile.next() on an empty tar file, both when trying to seek when it should not: import io import tarfile # Create a tarball with no member: fd = io.BytesIO() with tarfile.open(fileobj=fd, mode="w&qu

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-05 Thread ProgVal
ProgVal added the comment: @r.david.murray I don't think it's a bug either, but a possible enhancement. @serhiy.storchaka We could simply do this: if isinstance(url, bytes): url = os.fsdecode(url) -- ___ Python tracker <rep...@bugs.python.

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-04 Thread ProgVal
New submission from ProgVal: The documentation for mimetypes.guess_type says that it “guesses the type of a file based on its filename or URL”. However, this function only accepts a string object, and not a bytes object: >>> import os >>> import mimetypes >>> mime

[issue30267] Deprecate os.path.commonprefix

2017-05-04 Thread ProgVal
New submission from ProgVal: The function os.path.commonprefix computes the longest prefix of strings (any iterable, actually), regardless of their meaning as paths. I do not see any reason to use this function for paths, and keeping it in the os.path module makes it prone to be confused

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
ProgVal added the comment: Indeed, thanks. I should have done that when I migrated from compiler.parse. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
ProgVal added the comment: (Oops, submitted too soon.) I understand the rational of this change, so I am not sure if this is actually a bug. However, if someone wants to parse a simple expression that may be a string, they need to add a special handling in case it's a string interpreted

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
New submission from ProgVal: Since commit cb41b2766de646435743b6af7dd152751b54e73f (Python 3.7a0), string literals are not parsed the same way. ast.parse("'test'").body used to be a list with one item containing 'test'; but now it is an empty list: Python 3.5.2+ (default, Dec 13 2

[issue28663] Higher virtual memory usage on recent Linux versions

2017-01-22 Thread ProgVal
ProgVal added the comment: > On Linux 3.16? 4.7? What is difference between 3.16 and 4.7? On 4.8 (which has the same issue as 4.7). The difference is that on 4.7, the rlimit has to be set incredibly high for the child process not to hit the limit. > Again, I doubt Python's memory consu

[issue28663] Higher virtual memory usage on recent Linux versions

2017-01-22 Thread ProgVal
ProgVal added the comment: first command: (0, 0) 0.14user 0.01system 0:00.94elapsed 16%CPU (0avgtext+0avgdata 18484maxresident)k 560inputs+0outputs (0major+2702minor)pagefaults 0swaps second command: (6663744, 6732519) 0.18user 0.01system 0:00.96elapsed 20%CPU (0avgtext+0avgdata

[issue28922] Add fixer for "import exceptions"

2016-12-09 Thread ProgVal
New submission from ProgVal: Hi, Here is a fixer to remove "import exceptions" from Python 2 code and replace "exceptions.X" with "X". Valentin -- components: 2to3 (2.x to 3.x conversion tool) files: fix_import_exceptions.py messages: 282787 nosy: Val

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal
ProgVal added the comment: Sorry. That's the result of |||get_traced_memory|on Python 3.5 and Linux 4.7. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal
ProgVal added the comment: (4350362, 4376669) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28663> ___ ___ Python-bugs-list

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-11 Thread ProgVal
Changes by ProgVal <prog...@gmail.com>: -- versions: +Python 3.6, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-11 Thread ProgVal
New submission from ProgVal: Hi, I use `resource.setrlimit(resource.RLIMIT_DATA, ...)` to limit the memory usage of a child process. I noticed that on recent Linux versions, my processes are much more likely to raise MemoryError or behave inconsistently (which I believe is caused

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread ProgVal
New submission from ProgVal: Hello, The following code: import sys import multiprocessing sys.stdout.close() def foo(): pass p = multiprocessing.Process(target=foo) p.start() Crashes with: Traceback (most recent call last): File "foo.py", line 10, in p.start() File

[issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories

2016-05-15 Thread ProgVal
ProgVal added the comment: I know, that's why I did not ask to change the code. Only the doc to make that behavior more explicit. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories

2016-05-15 Thread ProgVal
ProgVal added the comment: The directory could be created -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27023> ___ ___ Pyth

[issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories

2016-05-14 Thread ProgVal
New submission from ProgVal: Documentation of tempfile.gettempdir() <https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir> does not mention it only supports existing directories. This led to this question on Stackoverflow: http://stackoverflow.com/q/37229398/

[issue26845] Misleading variable name in exception handling

2016-04-25 Thread ProgVal
New submission from ProgVal: In Python/errors.c, PyErr_Restore is defined this way: void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) In Python/ceval.c, in the END_FINALLY case, it is called like this: PyErr_Restore(status, exc, tb); I believe “exc” should be renamed

[issue26640] xmlrpc.server imports xmlrpc.client

2016-03-25 Thread ProgVal
ProgVal added the comment: Even if xmlrpc.client imported them in its namespace? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26640] xmlrpc.server imports xmlrpc.client

2016-03-25 Thread ProgVal
New submission from ProgVal: from xmlrpc.client import Fault, dumps, loads, gzip_encode, gzip_decode Shouldn't these class/functions be moved to a new module, with a name like xmlrpc.common? -- components: Library (Lib) messages: 262428 nosy: Valentin.Lorentz priority: normal severity

[issue26442] Doc refers to xmlrpc.client but means xmlrpc.server

2016-02-26 Thread ProgVal
New submission from ProgVal: The doc of xmlrpc.server and xmlrpc.client both warn about XML vulnerabilities. However, both say “The xmlrpc.client module is not secure”, whereas the page for xml.server should say xmlrpc.server. -- assignee: docs@python components: Documentation

[issue25951] SSLSocket.sendall() does not return None on success like socket.sendall()

2015-12-25 Thread ProgVal
New submission from ProgVal: socket.sendall() returns None if it succeeded <https://docs.python.org/3/library/socket.html#socket.socket.sendall> SSLSocket.sendall() is said to have the same behavior as socket.sendall(), besides not allowing flags <https://docs.python.org/3/library

[issue21429] Input.output error with multiprocessing

2014-06-29 Thread ProgVal
ProgVal added the comment: The relevant piece of code: https://github.com/ProgVal/Limnoria/blob/master/plugins/Web/plugin.py#L85 commands.process is defined here: https://github.com/ProgVal/Limnoria/blob/master/src/commands.py#L76 callbacks.CommandProcess is defined at https://github.com

[issue18477] fix_import (2to3 fixer) is not case-sensitive

2013-07-16 Thread ProgVal
New submission from ProgVal: In a project, I have a package with a module named Socket.py, and the __init__.py imports the socket module (from the standard Python lib). However, when fix_import went over it _on Windows_, it converted import socket to from . import Socket. I also had this issue

[issue17953] sys.modules cannot be reassigned

2013-05-11 Thread ProgVal
New submission from ProgVal: In Python 3.3 (I did not test with 3.4), sys.modules cannot be reassigned without breaking the import mechanism; while it works with Python = 3.2. Here is how to reproduce the bug: progval@Andromede:/tmp$ mkdir test_imports progval@Andromede:/tmp$ echo from

[issue17856] multiprocessing.Process.join does not block if timeout is lower than 1

2013-04-27 Thread ProgVal
New submission from ProgVal: In Python 3.3, multiprocessing.Process.join() is not blocking with floats lower than 1.0 (not included). It works as expected (ie. blocking for the specified timeout) in Python 2.6-3.2 As you can see in this example, calling join() with 0.99 returns immediately

[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal
New submission from ProgVal prog...@gmail.com: Hello, I have issues with a script I'm programming (TypeError at every client connection), so I edited BaseServer's __init__(): def __init__(self, server_address, RequestHandlerClass): Constructor. May be extended, do not override

[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal
ProgVal prog...@gmail.com added the comment: The problem happens on Python 2.7 too. Additionaly, here is the traceback, if I don't edit the library: Exception happened during processing of request from ('127.0.0.1', 50378) Traceback (most recent call last): File /usr/lib/python2.7

[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal
ProgVal prog...@gmail.com added the comment: This seems odd to me: this line: self.RequestHandlerClass(request, client_address, self) calls TCPServer's constructor: def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True

[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal
ProgVal prog...@gmail.com added the comment: Oh, excuse me, it's because of my code! class MyRequestHandler(SocketServer.TCPServer): -- resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11130

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-21 Thread ProgVal
ProgVal prog...@gmail.com added the comment: Same result on all tested versions (2.5 - 2.7) : -- import urllib2 import tarfile tarfile.open(fileobj=open('/home/progval/Downloads/GoodFrench.tar'), mode='r:') # Works tarfile.open(fileobj=urllib2.urlopen

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-21 Thread ProgVal
ProgVal prog...@gmail.com added the comment: This code : import urllib2 print urllib2.urlopen('http://plugins.supybot-fr.tk/GoodFrench.tar').read(500) Prints : data/75500017517511466030066011677 5ustar progvalprogval If the problem comes from networking libraries, I

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-20 Thread ProgVal
ProgVal prog...@gmail.com added the comment: I also have the bug with Python 2.7.1rc1 (from Debian 'Experimental' repo) -- nosy: +ProgVal versions: +Python 2.6 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-08 Thread ProgVal
New submission from ProgVal prog...@gmail.com: Hello, I had this traceback: Traceback (most recent call last): ... File /home/progval/workspace/Supybot/Supybot-plugins/Packages/plugin.py, line 123, in extractData file = tarfile.open(fileobj=file_) File /usr/lib/python2.6/tarfile.py

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-08 Thread ProgVal
ProgVal prog...@gmail.com added the comment: Thanks for your answer. Sorry, no change... -- components: +Library (Lib) versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10362

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-08 Thread ProgVal
ProgVal prog...@gmail.com added the comment: Here is the new traceback: Traceback (most recent call last): ... File /home/progval/workspace/Supybot/Supybot-plugins/Packages/plugin.py, line 123, in extractData file = tarfile.open(fileobj=file_, mode='r:') File /usr/lib/python2.6