helmut added the comment:
I suppose that screen.addstr(0, 0, uäöü.encode(utf-8)) works.
It works as in the output looks as the one expected. Long lines with utf8
characters will make it break again though.
screen.addstr(0, 0, äöü * 20) # assuming COLUMNS=80
Will give two rows of characters
Benjamin Peterson added the comment:
This code is pretty broken. I don't think ttys are ever seekable, so the
os.fdopen has probably been always failing since 3.0. It thus always leaks an
fd to '/dev/tty' if the first os.open succeeds. The whole function should
probably be rewriten to work
STINNER Victor added the comment:
Sounds sensible. Are you aware of a workaround for this issue? I.e.
is there any way to force Python2.7 to use the wide mode for
outputting characters?
I don't think that it is possible to workaround this issue, it is a
bug in the design of curses, related to
Richard Oudkerk added the comment:
On 03/06/2013 1:02am, spresse1 wrote:
Whats really bugging me is that it remains open and I can't fetch a reference.
If I could do either of these, I'd be happy.
...
Perhaps I really want to be implementing with os.fork(). Sigh, I was trying
to
save
Armin Rigo added the comment:
The bug is different, because it doesn't depend on details of the platform.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18122
___
Charles-François Natali added the comment:
Why open this issue, since it's obviously a duplicate of #18109?
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18124
___
New submission from Paul TBBle Hampson:
Noticed in Python 2.7 but a quick look in the repository suggests this is also
true in Python 3 releases.
The Makefile rule for Makefile.pre in Makefile.pre.in is:
# Build the toplevel Makefile
Makefile.pre: Makefile.pre.in config.status
Antoine Pitrou added the comment:
2.7.3 passes, 2.7 trunk fails
Python 2.7.0, 2.7.2 and 2.6.8 all fail here.
Dmi is right: it starts failing at 4afc50d15544.
(note that Python 3 isn't affected)
--
___
Python tracker rep...@bugs.python.org
Changes by Paul TBBle Hampson paul.hamp...@pobox.com:
--
type: - compile error
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18125
___
___
Paul TBBle Hampson added the comment:
Forgot to mention, this is the only occurrence of a *.in file in
Makefile.pre.in that isn't prefixed with $(srcdir)/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18125
Kristján Valur Jónsson added the comment:
Hi.
the file and line arguments are for expanding from macros such as PyMem_MALLOC.
I had them added because they provide the features of a comprehensive
debugging API.
Of course, I'm not showing you the entire set of modifications that we have
made
Kristján Valur Jónsson added the comment:
Also, our ccpmem.h, the interface to the ccpmem.cpp, internal flexible memory
allocator framework.
Again, just FYI. There are no trade secrets here, so please ask me for more
details, if interested. One particular trick we have been using, which
Ronald Oussoren added the comment:
Linking with -framework Python is always a bad idea because you have no
control over which version of Python you link with other than by changing
global system state (the Current link). Also: include files aren't included
using the framework conventions
Dmi Baranov added the comment:
My system python-2.7.3 affected too:
python -c 'import sys;print(sys.version);import x'
2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3]
Traceback (most recent call last):
File string, line 1, in module
RuntimeError: not holding the import lock
$ uname -a
Andrew Stormont added the comment:
Great. Everybody's happy now, surely?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17925
___
___
Richard Oudkerk added the comment:
Forking as a side effect of importing a module is evil. I think raising a
RuntimeError is preferable to trying to make it Just Work.
But maybe one could do
void
_PyImport_ReInitLock(void)
{
if (import_lock != NULL) {
STINNER Victor added the comment:
I'm happy with the api you provide, with a small addition:
PyAPI_FUNC(int) Py_SetAllocators(
char api,
void* (*malloc) (size_t size, void *data),
void* (*realloc) (void* ptr, size_t size, void *data),
void (*free) (void* ptr, void *data),
Giampaolo Rodola' added the comment:
patch plus self.producer_fifo.extendleft([data, first]) seems legit and I
verified pyftpdlib tests pass.
Last thing missing from the patch is a test case. Pierrick can you merge
test_initiate_send.py into Lib/test_asynchat.py and provide a new patch?
Gavan Schneider added the comment:
A lot of this is past my level but speaking from my level I just want packages
to be consistent, i.e., if there is a symlink it should point to something
(preferably useful) not dangle as is the case now.
Also I want an installed version to look the same no
Ronald Oussoren added the comment:
There is a python3.3 in .../Python.framework/Versions/3.3/lib because
.../Python.framework/Versions/3.3 is basicly a regular unix install with some
trivial changes (in particular, there is a Python shared library in the root of
the tree, there is a
Thomas Wouters added the comment:
For the record, Raymond, I think you're wrong about this. Itertools isn't
always a solution to every problem, and it makes for a very awkward way around
a silly limitation in min() and max(). Their API is already awkward -- because
they already take a keyword
STINNER Victor added the comment:
New patch (version 2), more complete:
* add void *data argument to all allocator functions
* add block API used for pymalloc allocator to allocate arenas. Use mmap or
malloc, but may use VirtualAlloc in a near future (see #13483). Callbacks
prototype:
-
Dmi Baranov added the comment:
There is patch. Test is non-LGTM, because having a side effect for hostname and
requires root's permissions for manipulations with hostname[*]. Someone having
ideas how I can mock system `uname` call?
[*] But this way is OK for Lib/test/test_sockets.py. I'm
Dmi Baranov added the comment:
Just a another behavior. My mistake, sorry.
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18124
___
Nick Coghlan added the comment:
+1 for adding this. It's simple to implement, simple to explain and the
alternatives for dealing with the empty iterable case (or even the fact it may
need to be handled at all) are definitely not obvious.
The relationship to next() is straightforward: the
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18045
___
___
Python-bugs-list
New submission from Yury V. Zaytsev:
Hi,
The links to NumPy sites and documentation are outdated. I replaced them with
www.numpy.org, and also the canonical location for documentation
(docs.scipy.org).
I removed the explicit mention of the PDF file, because the documentation has
been split
spresse1 added the comment:
I don't see how using os.fork() would make things any easier. In either
case you need to prepare a list of fds which the child process should
close before it starts, or alternatively a list of fds *not* to close.
With fork() I control where the processes
Ned Batchelder added the comment:
I find the workarounds mentioned here to be baroque and confusing. The concept
of a default value to return in the case of an empty iterator is
straightforward. I'm +1 on adding this as well.
--
nosy: +nedbat
___
Richard Oudkerk added the comment:
On 03/06/2013 3:07pm, spresse1 wrote:
I could reimplement the close_all_fds_except() call (in straight python, using
os.closerange()). That seems like a reasonable solution, if a bit of a hack.
However, given that pipes are exposed by multiprocessing, it
spresse1 added the comment:
Oooh, thanks. I'll use that.
But really, this sounds rather fragile.
Absolutely. I concur there is no good way to do this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18120
Doug Hellmann added the comment:
+1 on adding this
I found today via @dabeaz's cookbook that iter() has a sentinel-detection use
case. Having one in min/max seems *far* more obviously useful. It's also
consistent with quite a few methods on builtin types where we provide a way to
deal with
Armin Rigo added the comment:
Indeed, no clue: it seems I don't get the error only on my system-installed
2.7.3 on Linux 32. I do get it on any other Python I tried, like 2.6.x, or the
system-installed 2.7.1 on Linux 64. So it's not actually a new bug.
--
Changes by Brett Cannon br...@python.org:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18021
___
___
Python-bugs-list
Changes by Brett Cannon br...@python.org:
--
stage: patch review - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18021
___
___
Richard Oudkerk added the comment:
Actually, you can use gc.get_referents(obj) which returns the direct children
of obj (and is presumably implemented using tp_traverse).
I will close.
--
resolution: - rejected
stage: - committed/rejected
status: open - closed
Madison May added the comment:
The attached patch updates the urls on the Documenting and Doc Quality pages to
reference the new Apple Style Guide.
--
keywords: +patch
Added file: http://bugs.python.org/file30456/apple_style_guide.patch
___
Python
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13647
___
___
Python-bugs-list mailing
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13655
___
___
Python-bugs-list mailing
Dmi Baranov added the comment:
That link will be outdated in next few months (I believe :-)). What about
https://help.apple.com/asg/mac ?
--
nosy: +dmi.baranov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18021
Terry J. Reedy added the comment:
The latter link redirects to the current online searchable html version,
http://help.apple.com/asg/mac/2013/
and presumably always will. I think this is better than the 200 page pdf.
--
nosy: +terry.reedy
stage: needs patch - patch review
Alexandre Vassalotti added the comment:
Stefan, could you address my review comments soon? The improved support for
globals is the only big piece missing from the implementation of PEP, which I
would like to get done and submitted by the end of the month.
--
Madison May added the comment:
Updated patch to link instead to http://help.apple.com/asg/mac.
Thanks for that catch, Dmi and Terry. I have to agree that its a much better
alternative.
--
Added file: http://bugs.python.org/file30457/apple_style_guide_v2.patch
João Bernardo added the comment:
Hi,
This code is working quite well on my system, but I'm still not sure if the
behavior of multiple predicates is the one other people want. So, for the
thread start running again:
- Should it test only the predicates from the awakened Conditions an accept if
New submission from Poul-Henning Kamp:
I'd like to nominate this piece of code as candidate for the next round of
Most unexpected python behaviour awards:
def foo(a, x = []):
x.append(a)
return x
print(foo(1))
print(foo(2))
I expected the output to be:
[1]
Eric V. Smith added the comment:
It's by design. Search for mutable default arguments, for example
http://docs.python-guide.org/en/latest/writing/gotchas.html#mutable-default-arguments
--
nosy: +eric.smith
resolution: - invalid
stage: - committed/rejected
status: open - closed
Roundup Robot added the comment:
New changeset ffdee6b36305 by Victor Stinner in branch '3.3':
Close #18109: os.uname() now decodes fields from the locale encoding, and
http://hg.python.org/cpython/rev/ffdee6b36305
New changeset 2472603af83e by Victor Stinner in branch 'default':
(Merge 3.3)
STINNER Victor added the comment:
issue18109.patch is not correct: it uses the locale encoding in strict mode,
the surrogateescape error handler should be used instead. I rewrote the patch.
I removed the unit test because changing a hostname is really unexpected and
may break (crash?) running
STINNER Victor added the comment:
test_logging is failing with a non-ASCII hostname because of the following
error:
error: uncaptured python exception, closing channel
test.test_logging.TestSMTPServer listening localhost:0 at 0x7f09a0ef89b0
(class 'UnicodeEncodeError':'ascii' codec can't
STINNER Victor added the comment:
Oh, by the way, I also changed socket.gethostname().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18109
___
New submission from Jakub Wilk:
pygettext uses non-standard timestamp format in the POT-Creation-Date field.
For example:
POT-Creation-Date: 2013-06-03 22:31+CEST
whereas xgettext uses this format:
POT-Creation-Date: 2013-06-03 22:31+0200
You could use this code to generate timestamps in
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18128
___
___
Python-bugs-list mailing
Barry A. Warsaw added the comment:
It's probably worth changing. My only concern would be backwards compatibility
issues.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18128
___
STINNER Victor added the comment:
The bug tracker is not the best place to discuss adding new features to the
standard library. It's better to discuss them first on the python-ideas mailing
list. You should also give an use case, explain why do you consider that Python
needs this feature,
Barry A. Warsaw added the comment:
While it's true that it can be confusing to users, it's not a bug.
http://docs.python.org/2/reference/compound_stmts.html#function
and a nice treatise on the subject by the Effbot:
http://effbot.org/zone/default-values.htm
--
nosy: +barry
Ned Deily added the comment:
Has anyone looked at the current Apple style guide to determine whether it is
still an appropriate reference for Python doc usage? It appears to have
undergone some major changes over the years as Apple's docs have changed.
--
nosy: +ned.deily
New submission from Oscar Benjamin:
This is from a thread on python-list that started here:
http://mail.python.org/pipermail/python-list/2013-May/647895.html
There are situations in which the Python 3.2 and 3.3 interpreters crash with
Fatal Python error: Cannot recover from stack overflow.
Nick Coghlan added the comment:
As stated, I don't agree with the closure of this one. min/max deserve a more
elegant mechanism for dealing with the empty iterable edge case.
--
resolution: rejected -
status: closed - open
___
Python tracker
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: - needs patch
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18053
___
Ezio Melotti added the comment:
What about adding a recipes section in the docs with sample implementation of
specific assertMethods?
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18054
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18101
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18104
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18102
___
___
David Beazley added the comment:
I could have used this feature myself somewhat recently. It was in some code
involving document matching where zero or more possible candidates were
assigned a score and I was trying to find the max score. The fact that an
empty list was a possibility
New submission from Terry J. Reedy:
The patch to configSectionNameDialog.py fixes the human test (adds required
arg) so it runs, adds instructions to the test, fixes a bug in name_ok, removes
redundant code, adds needed spaces, de-camelcases internal names, and changes
the master for the two
Changes by Terry J. Reedy tjre...@udel.edu:
Added file: http://bugs.python.org/file30460/config_name27.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18130
___
Changes by Terry J. Reedy tjre...@udel.edu:
Removed file: http://bugs.python.org/file30439/configSectionNameDialog.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18104
___
Terry J. Reedy added the comment:
I opened #18130 for an updated configSectionNameDialog.py patch. It also adds
to idle_tests two files, mock_tk.py and test_config_name.py. The latter uses
the former for gui-free automated tests of some of the dialog methods. I plan
to commit in a couple of
New submission from Terry J. Reedy:
The signature for tkinter class Variable and its subclasses StringVar, IntVar,
DoubleVar, BooleanVar is
def __init__(self, master=None, value=None, name=None):
However, the None default is invalid because of
self._tk = master.tk
The preceding lines
Raymond Hettinger added the comment:
I still think complicating the API isn't worth it. Of late, we've gotten in
the habit of a complexity to even the simplest of things.
In the case of sequences, we already have a reasonable solution:
low = min(seq) if seq else default
In the rarer
Terry J. Reedy added the comment:
My experiments and some web postings indicate that if a tkinter class has a
master or parent option, it may not really be an option, regardless of what our
docs imply. If tkinter.Tk is called either directly or indirectly, the graphics
system is initiated and
Julian Berman added the comment:
Raymond, I respect that in your opinion this seems to be overcomplexity, but
you haven't addressed any of the arguments made, nor responded to any of the
arguments against this being added complexity.
I really don't understand the parallels you're making to
Madison May added the comment:
I actually had a bit of a hard time even locating a copy of the 2009 version.
Thanks to the Wayback Machine, here's the 2009 version of the pdf for
reference:
Nick Coghlan added the comment:
To me, the Python-specific difference that makes this useful for us but not for
others is *precisely* the fact that the simple idiom:
x = min(seq) if seq else default
is broken for iterators that don't provide __len__ or __bool__, while the even
simpler:
Julian Berman added the comment:
Personally I don't care either way, I basically never use the multiple
positional arg form, but what are we trying to prevent exactly? It's bad code,
but it (would) do what the person was expecting. Am I not getting the point
that's being made about that case?
Julian Berman added the comment:
Can I throw in, and hopefully not in a way that's too out of place, that I
think that unittest might want to rethink it's strategy re: assertion methods?
The fact that the object that has all the assertions and the object that has
the logic for running a test,
Raymond Hettinger added the comment:
Guido, this is your language. What would you like to do?
The OP wants a default argument on min() and max() so he won't have to use an
except ValueError for non-sequence iterables that are potentially empty.
At first, I thought the functions were already
Stefan Mihaila added the comment:
On 6/3/2013 9:33 PM, Alexandre Vassalotti wrote:
Alexandre Vassalotti added the comment:
Stefan, could you address my review comments soon? The improved support for
globals is the only big piece missing from the implementation of PEP, which I
would like
Guido van Rossum added the comment:
+1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18111
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Guido van Rossum gu...@python.org:
--
assignee: gvanrossum -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18111
___
___
Nick Coghlan added the comment:
Just one final design philosophy comment from me (I know it isn't needed since
Guido already ack'ed the suggestion):
As far as the lessons learned from the historical startswith() case go,
avoiding taking up the positional slots with optional flags and
Raymond Hettinger added the comment:
Julian, when your tests are ready, I'll be happy to review and apply the patch.
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18111
Raymond Hettinger added the comment:
+1 to what Michael said. The current API is way too big, but these proposed
methods aren't trivially easy to get right. It would be nice to have them done
once and done well.
--
nosy: +rhettinger
___
Python
Dominik Richter added the comment:
Thank you all for your help, works great!
@Victor: fully agree on the ascii hostname ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18109
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13647
___
85 matches
Mail list logo