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,
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
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
Changes by Ronald Oussoren ronaldousso...@mac.com:
--
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20078
___
___
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
Serhiy Storchaka added the comment:
Totally added 100 new mappings.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20079
___
___
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.
--
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
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
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
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
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
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
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
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
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.
--
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
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
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
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
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
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
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
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
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20059
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20050
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20078
___
___
Python-bugs-list
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
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
___
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
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
___
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
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
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
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
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
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
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
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
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')
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
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:
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
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
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4492
___
___
Python-bugs-list
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
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
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20059
___
___
Python-bugs-list
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20074
___
___
Python-bugs-list
49 matches
Mail list logo