[issue20075] help(open) eats first line

2013-12-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch does not fix it. It becomes like this: open(...) Open file and return a stream. Raise IOError upon failure. It's not just help(open) has problem, help(sqlite3.connect) got it as well: connect(...) check_same_thread, factory,

[issue19944] Make importlib.find_spec load packages as needed

2013-12-27 Thread Eric Snow
Eric Snow added the comment: Any thoughts on the latest patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19944 ___ ___ Python-bugs-list

[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2013-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - needs patch versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20078

[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2013-12-27 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20078 ___ ___

[issue20079] Add support for glibc supported locales

2013-12-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds to locale alias table the mappings for locales supported in recent glibc (v 2.18). It also modifies the makelocalealias.py script so that it parses the SUPPORTED file from glibc sources and supports command line options for source

[issue20079] Add support for glibc supported locales

2013-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Totally added 100 new mappings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20079 ___ ___

[issue20075] help(open) eats first line

2013-12-27 Thread Larry Hastings
Larry Hastings added the comment: The best fix would be to convert the docstrings to something inspect can parse. Preferably by converting the functions to use Argument Clinic, though you could manually mark up the docstring by hand if necessary. --

[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2013-12-27 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is unused variable t in Lib/sqlite3/test/factory.py. def CheckSqliteRowAsTuple(self): Checks if the row object can be converted to a tuple self.con.row_factory = sqlite.Row row = self.con.execute(select 1 as a, 2 as

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: import io io.TextIOWrapper(open(/dev/tty, rb+)) Traceback (most recent call last): File stdin, line 1, in module io.UnsupportedOperation: File or stream is not seekable. buffering=0 -- ___ Python

[issue20075] help(open) eats first line

2013-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The best fix would be to convert the docstrings to something inspect can parse. Preferably by converting the functions to use Argument Clinic, though you could manually mark up the docstring by hand if necessary. We can't check all docstrings in the

[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2013-12-27 Thread Mikael Knutsson
Mikael Knutsson added the comment: Just wanted to drop in here to let you know that I hit this behaviour recently when writing a small tool using both configparser and argparse and the workaround proves rather annoying (custom namespace object or similar). Would be awesome if this moved

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Yes, so basically signature line in help(open) is not shown because ast.parse fails to parse the return value - file object According to grammar, it should be - file or - 'file object' or something like this. as for sqlite, it fails to parse square

[issue19944] Make importlib.find_spec load packages as needed

2013-12-27 Thread Nick Coghlan
Nick Coghlan added the comment: The simple patch actually looks like a good way to end up with find_spec specific bugs because it diverges from the more thoroughly tested main import path (e.g. it looks to me like it doesn't release the import lock properly) So the _FoundSpec version actually

[issue20075] help(open) eats first line

2013-12-27 Thread Zachary Ware
Zachary Ware added the comment: The patch looks good to me (aside from extra whitespace on the blank lines in methodobject.c, and I agree with Serhiy about s/brackets/parens/). Also, I like the suggestion of using __text_signature__ instead of '(...)'. However, just to avoid any possible

[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2013-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think you want to either also testing the number of elements in t, or in just compare t to (row[a], row[b]) (untested). -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Dolda2000
Dolda2000 added the comment: Oh sorry, my bad. I messed up. :) Given that that works, though, why can't open() handle opening /dev/tty directly in text mode? Clearly, TextIOWrapper can handle the necessary buffering without the stream having to be seekable. --

[issue17484] add tests for getpass

2013-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 100f632d4306 by R David Murray in branch '3.3': #18116: backport fix to 3.3 since real-world failure mode demonstrated. http://hg.python.org/cpython/rev/100f632d4306 -- ___ Python tracker

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 100f632d4306 by R David Murray in branch '3.3': #18116: backport fix to 3.3 since real-world failure mode demonstrated. http://hg.python.org/cpython/rev/100f632d4306 -- nosy: +python-dev ___ Python

[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 100f632d4306 by R David Murray in branch '3.3': #18116: backport fix to 3.3 since real-world failure mode demonstrated. http://hg.python.org/cpython/rev/100f632d4306 New changeset 29a5a5b39dd6 by R David Murray in branch 'default': Mostly-null

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread R. David Murray
R. David Murray added the comment: Having buffering doesn't make the stream seekable. So the question is, is the *design* of the IO module that '+' requires a seekable stream the best behavior, or can that constraint be relaxed? You have to keep in mind that the IO module is a bunch of

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Having buffering doesn't make the stream seekable. So the question is, is the *design* of the IO module that '+' requires a seekable stream the best behavior, or can that constraint be relaxed? A non-seekable read/write stream doesn't really make sense

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Thank you for the comments! I'll update the patch. BTW is it safe to update Lib/inspect.py:2004 ? - return cls(parameters, return_annotation=cls.empty) + return cls(parameters, return_annotation=f.returns.s or cls.empty) Looks like the return value is not

[issue20081] sys.getwindowsversion does nto show some fields

2013-12-27 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': On Windows 7: v = sys.getwindowsversion() v sys.getwindowsversion(major=6, minor=1, build=7600, platform=2, service_pack='') v.service_pack_major 0 v.service_pack_minor 0 v.suite_mask 254 Doc states: For compatibility with prior versions, only the

[issue20081] sys.getwindowsversion does not show some fields

2013-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- title: sys.getwindowsversion does nto show some fields - sys.getwindowsversion does not show some fields ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20081

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2013-12-27 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20059 ___ ___ Python-bugs-list

[issue20050] distutils should check PyPI certs when connecting to it

2013-12-27 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20050 ___ ___ Python-bugs-list

[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2013-12-27 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20078 ___ ___ Python-bugs-list

[issue20081] sys.getwindowsversion does not show some fields

2013-12-27 Thread R. David Murray
R. David Murray added the comment: This is essentially a duplicate of item (3) in issue 1820, although I'm not entirely clear on what the repr would actually look like. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: So, looks like it works for me and all tests pass. Here's a new patch. Feel free to revert Lib/inspect.py:2004-2009 if this is incorrect behavior. -- Added file: http://bugs.python.org/file33280/20075-2.patch ___

[issue20075] help(open) eats first line

2013-12-27 Thread Larry Hastings
Larry Hastings added the comment: One of the relevant PEPs (PEP 8? PEP 7? the annotations PEP?) states that the Python standard library is not permitted to use annotations. And considering that Argument Clinic is an internal-only tool, we could probably justify the decision to not allow

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-12-27 Thread A.M. Kuchling
Changes by A.M. Kuchling a...@amk.ca: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1565525 ___

[issue20062] Add section on vim to devguide

2013-12-27 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: I think there should not be any section about any editor in the devguide. It's beyond scope, and it risks going stale. -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Dolda2000
Dolda2000 added the comment: So the question is, is the *design* of the IO module that '+' requires a seekable stream the best behavior, or can that constraint be relaxed? What purpose does that constraint serve? Is there any reason it shouldn't be relaxed? It seems to work quite well

[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2013-12-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- title: Python Launcher for Windows fails to invoke scripts with non-latin names - Python Launcher, Windows, fails on scripts w/ non-latin names ___ Python tracker rep...@bugs.python.org

[issue20062] Add section on vim to devguide

2013-12-27 Thread R. David Murray
R. David Murray added the comment: We have pointers to external resources all over the docs. Yes, they go stale sometimes, and when somebody notices, we update them. What do you use for development is a common topic of discussion, so I don't see any reason not to include some pointers in

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread R. David Murray
R. David Murray added the comment: Antoine already answered that question: it does not make sense to have a single stream that is open for *update* if it is not seekable. The fact C conflates update with both read and write can be seen as a design bug in C :) The remaining question might

[issue20077] Format of TypeError differs between comparison and arithmetic operators

2013-12-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: +Interpreter Core -ctypes nosy: +ncoghlan versions: +Python 3.5 -Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20077

[issue20077] Format of TypeError differs between comparison and arithmetic operators

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: I created a patch for it, please review -- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file33281/20077.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20077

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: I'm sorry, I'm not sure I caught the idea. So, I need to create an issue with description propagate the annotation from the __text_signature__ into inspect.Signature if we get a valid one. ? -- ___ Python tracker

[issue20082] Misbehavior of BufferedRandom.write with raw file in append mode

2013-12-27 Thread Erik Bray
New submission from Erik Bray: In #18876 I pointed out the following issue: BufferedWriter/Random doesn't know the raw file was opened with O_APPEND so the writes it shows in the buffer differ from what will actually end up in the file. For example: f = open('test', 'wb')

[issue20062] Add section on vim to devguide

2013-12-27 Thread Ezio Melotti
Ezio Melotti added the comment: I don't think the devguide is a good place for this unless some editors support features that are particularly interesting for CPython development (e.g. something to check refleaks). If the features are generic enough that any Python programmer would find them

[issue20083] smtplib: support for IDN (international domain names)

2013-12-27 Thread Freek Dijkstra
New submission from Freek Dijkstra: smtplib has limited support for non-ASCII domain names in the From to To mail address. It only works for punycode-encoded domain names, submitted as unicode string (e.g. server.rcpt(uu...@xn--e1afmkfd.ru). The following two calls fail:

[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-27 Thread Freek Dijkstra
New submission from Freek Dijkstra: smtplib has no support for non-ASCII user names in the From to To mail address. The following two calls fail: server.rcpt(uόνομα@example.com): File smtplib.py, line 332, in send s = s.encode(ascii) UnicodeEncodeError: 'ascii' codec can't encode

[issue20083] smtplib: support for IDN (international domain names)

2013-12-27 Thread Freek Dijkstra
Freek Dijkstra added the comment: This issue deals with international domain names in email addresses (the part behind the @). See issue 20084 for the issue that deals with the part before the @. -- ___ Python tracker rep...@bugs.python.org

[issue4492] httplib code thinks it closes connection, but does not

2013-12-27 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4492 ___ ___ Python-bugs-list

[issue7464] circular reference in HTTPResponse by urllib2

2013-12-27 Thread Martin Panter
Martin Panter added the comment: Sounds like urlopen() is relying on garbage collection to close the socket and connection. Maybe it would be better to explicitly close the socket, even if you do eliminate all the garbage reference cycles. My test code for Issue 19524 might be useful here. It

[issue20085] Python2.7, wxPython and IDLE 2.7

2013-12-27 Thread stubz
New submission from stubz: I new to this so I have no idea what's going on ... I'm using Mint 16 Cinnamon and apparently Python 2.7+ 3.3 are installed I started puttering with wxPython 2.8 and I have issues ... I started a tutorial, saved some work.py and got things to run, I guess ... When I

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2013-12-27 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20059 ___ ___ Python-bugs-list

[issue20074] open() of read-write non-seekable streams broken

2013-12-27 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20074 ___ ___ Python-bugs-list