Nick Coghlan added the comment:
Note that it's only the 3.2 interactive help that specifies ctx=None, and
it's almost certainly lifting that directly from the Python implementation.
The C implementation is definitely in compliance with the prose docs, which
give the signature as
Changes by Martin Burger m...@rtin-burger.net:
--
nosy: +mburger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9694
___
___
Python-bugs-list
Hynek Schlawack added the comment:
What does bother you? Both sigs look like in py3 if I'm looking correctly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
___
Nemeskey Dávid added the comment:
OK, then this issue has a bug part, too: it is not mentioned in the
documentation that exceptions from the handler methods propagate through the
Parse() method. I guess the parser can be then stopped in this way too, but it
is a dirty method as opposed to
Chris Rebert added the comment:
Revised patch in response to comments.
--
Added file: http://bugs.python.org/file27029/subprocess.rst.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15789
Stefan Krah added the comment:
The patch works fine here (as expected).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15794
___
___
David Lam added the comment:
here's a patch that covers all but one of the foo/bar/baz examples
it also has fixes for the sample code near the beginning from the review Ezio
did
the one example I didn't do was the Arguments containing - part. I guess it
felt like changing the names in that
Changes by Mike Hoy mho...@gmail.com:
--
nosy: +mikehoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1185124
___
___
Python-bugs-list mailing
Roundup Robot added the comment:
New changeset 5bff555168ab by Petri Lehtinen in branch '3.2':
#11964: Document a change in v3.2 to the json indent parameter
http://hg.python.org/cpython/rev/5bff555168ab
New changeset 0fb511659ef4 by Petri Lehtinen in branch 'default':
#11964: Document a change
Petri Lehtinen added the comment:
Fixed, thanks.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11964
Petri Lehtinen added the comment:
Well, I wasn't sure about [optional] params before **kwargs. But if that's ok,
then I think the patch is good.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
New submission from B Maqueira:
When building an msi package using the --install-script=xx.py, the script
xx.py is called on msi package install/removal as expected. However the cmd
line flags -install/-remove are not passed to the script making it hard to
write step specific code.
I
Petri Lehtinen added the comment:
No activity in 2 years, closing.
--
nosy: +petri.lehtinen
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9668
___
Petri Lehtinen added the comment:
Bear in mind that Douglas Crockford thinks a JSON document is valid even if it
contains unpaired surrogates:
http://tech.groups.yahoo.com/group/json/message/1603
http://tech.groups.yahoo.com/group/json/message/1583
It's Unicode that considers unpaired
Hynek Schlawack added the comment:
It seems correct like that:
static PyObject *
csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *name_obj, *dialect_obj = NULL;
PyObject *dialect;
if (!PyArg_UnpackTuple(args, , 1, 2, name_obj, dialect_obj))
Stefan Krah added the comment:
Nick Coghlan rep...@bugs.python.org wrote:
Any third party Decimal manipulating function that accepts an
optional context and passes it down to the standard Decimal API
will be confronted with the same problem in 3.3: passing None
as the context no longer means
Roundup Robot added the comment:
New changeset dc080e19f7aa by Hynek Schlawack in branch '2.7':
#14880: Fix kwargs notation in csv.reader, .writer .register_dialect
http://hg.python.org/cpython/rev/dc080e19f7aa
--
nosy: +python-dev
___
Python
Hynek Schlawack added the comment:
Thank you for your contribution Chris!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
Samuel John added the comment:
I did your test. Thank you!
You are absolutely right, it seems, dtrace does not honor CPP or PATH or
any other flags and bluntly looks in a hard-coded location. It's not up to you
to patch that.
--
___
Python tracker
Petri Lehtinen added the comment:
It may also be unicode if the encoding parameter is used even if there are no
unicode objects in the input.
json.dumps([u'Ş'.encode('iso-8859-9')], encoding='iso-8859-9',
ensure_ascii=False)
u'[\u015e]'
--
___
Petri Lehtinen added the comment:
This is a documentation bug for 2.7. Setting as duplicate of #13769.
--
nosy: +petri.lehtinen
resolution: - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder: - json.dump(ensure_ascii=False) return str instead of
STINNER Victor added the comment:
If the function returned either a single-character unicode string or an
integer
keycode, this would also make it possible to completely drop the
is_key_code
part of the return value. (Callers could simply check the type of the
return
value to see if it is a
Petri Lehtinen added the comment:
Attached a patch for 2.7 that updates docs and docstrings.
--
keywords: +needs review, patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file27032/issue13769.patch
___
Python tracker
Changes by Petri Lehtinen pe...@digip.org:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13769
___
___
Python-bugs-list mailing
Nick Coghlan added the comment:
The standard library has moved on quite a bit since this patch was written...
1. source_synopsis() should be using the tokeniser module when reading the
docstring. The current implementation is broken in more ways than just those
noted here (e.g. it completely
Nick Coghlan added the comment:
Oops, I somehow ended up looking at an old revision of pydoc.py
The current version *is* using tokenize.open and importlib in synopsis(), so
those aspects of my comments are incorrect.
However, the point that pydoc should probably be using the tokenize module
New submission from Aleksey Filippov:
System info:
kernel: 3.4.8-1-ARCH
dist: Arch linux
python: 3.2.3
subprocess.Popen() fails if python interpreter is started with closed 0, 1 or 2
descriptor.
Traceback (most recent call last):
File string, line 14, in module
File
Ezio Melotti added the comment:
#10806 seems related.
--
components: +Library (Lib)
nosy: +ezio.melotti, pitrou, rosslagerwall
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15798
Mark Hammond added the comment:
The GIL state api was mainly interested in the case of a thread which has
(possibly) never been seen before calling into Python. IIUC, the proposal here
is so that a thread that *has* been seen before can be associated with a
thread-state specified by the
Ezio Melotti added the comment:
.. function:: int(n=0)
int(s, base=10)
should do the trick.
+1 on using this instead of int([number | string[, base]])
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14783
Mark Hammond added the comment:
To clarify, I wrote:
can be associated with a thread-state specified by the
embedding application
Where I meant to say:
Can be associated with an interpreter state and corresponding thread-state ...
Or something like that - it's been a while since I've
Martin v. Löwis added the comment:
nemeskeyd: would you like to work on a patch (for Python 3.4)?
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15775
___
Martin v. Löwis added the comment:
The change you proposed cannot be applied to Python 2.7, or any distutils code
bases, for a number of reasons:
- it's not clear (and probably not the case) that the proposed command line
flags are correct for all distutils code. It may well be that some code
Serhiy Storchaka added the comment:
It's Unicode that considers unpaired surrogates invalid, not UTF-8 by itself.
It's UTF-8 too. See RFC 3629:
The definition of UTF-8 prohibits encoding character numbers between
U+D800 and U+DFFF, which are reserved for use with the UTF-16
encoding
Nick Coghlan added the comment:
Thinking about it, I believe there still needs to be a concept of an active
thread state TLS key in order to deal with Graham's original problem.
Specifically, if PyGILState_EnsureEx is used to associate the thread with a
particular interpreter, then subsequent
Changes by Éric Araujo mer...@netwok.org:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13266
___
___
Nemeskey Dávid added the comment:
loewis: I don't think it would be difficult to fix, so theoretically I'd be in.
However, I don't really have the time to work on this right now.
--
___
Python tracker rep...@bugs.python.org
Changes by B Maqueira brau...@ferrarihaines.com:
Added file: http://bugs.python.org/file27033/patch1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15797
___
Antoine Pitrou added the comment:
Le mardi 28 août 2012 à 14:12 +, Nick Coghlan a écrit :
old_interp = PyGILState_SwitchInterpreter(target_interp);
old_gil = PyGILState_Ensure();
/* Call into Python using target_interp */
PyGILState_Release(old_gil);
Matthias Klose added the comment:
bah, this happens when you do a parallel build. --jobserver-fds is passed in
MAKEFLAGS, and the test for sharedmods turns on the quiet mode, because it
matches just *s* in MAKEFLAGS :-/
The patch tries to parse MAKEFLAGS using getopt, and if getopt is not
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13592
___
___
Roundup Robot added the comment:
New changeset 1a1d097b17e2 by Matthias Klose in branch '2.7':
- Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target.
http://hg.python.org/cpython/rev/1a1d097b17e2
New changeset 763d188a96bb by Matthias Klose in branch '3.2':
- Issue #15591: Fix parsing
Matthias Klose added the comment:
fixed.
--
resolution: - fixed
status: open - closed
versions: -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15591
___
Roundup Robot added the comment:
New changeset 454dceb5fd56 by Antoine Pitrou in branch 'default':
Issue #15794: Relax a test case due to the deadlock detection's
conservativeness.
http://hg.python.org/cpython/rev/454dceb5fd56
--
nosy: +python-dev
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15794
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15591
___
Changes by Mike Hoy mho...@gmail.com:
--
nosy: +mikehoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset 2e587b9bae35 by Richard Oudkerk in branch 'default':
Issue #15784: Modify OSError.__str__() to better distinguish between
http://hg.python.org/cpython/rev/2e587b9bae35
--
nosy: +python-dev
___
Python
Stefan Krah added the comment:
I don't want to block this, BTW. Personally I'm +-0 on the issue.
If more people think this is needed for backwards compatibility, I'll
write a patch for localcontext. But I'd rather do that *very* soon.
FWIW, none of the cdecimal users has ever complained about
New submission from karl:
The current parsing of HTTP status line seems strange with regards to its
definition in HTTP.
http://hg.python.org/cpython/file/3.2/Lib/http/client.py#l307
Currently the code is
version, status, reason = line.split(None, 2)
status1 = HTTP/1.1 200 OK
status2 =
R. David Murray added the comment:
Could you explain the error you are seeing in more detail first? You are talk
about parsing and fixes here, but I'm not clear on what the actual bug is you
are reporting.
--
nosy: +r.david.murray
___
Python
Mark Dickinson added the comment:
I don't really feel that strongly either way, either. I understand Nick's
arguments, but can't help feeling that we're letting a doc mistake dictate the
API here. (And my inner type-system has an aversion to APIs where arguments
are expected to be *either*
New submission from Serhiy Storchaka:
When porting gzip module from Python 2 to Python 3, binary files
sys.std(in|out) was replaced by sys.std(in|out).buffer in gzip module internal
testing code (when gzip used as executable). But in one place the replacement
was skipped. As the result the
karl added the comment:
ok.
status lines 1 and 2 are valid.
the third one is invalid and should trigger a
raise BadStatusLine(line)
The code at line 318 is bogus as it will parse happily the third line without
raising an exception.
R. David Murray added the comment:
Why should it raise an error? The postel principle suggests that we should
treat it as equivalent to the second line.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15799
Antoine Pitrou added the comment:
I would point out that the goal of the http module is to provide
interoperability with real-life servers, rather than be a strict implementation
of RFCs. So, starting to raise errors for HTTP/1.1 200 while HTTP/1.1 200
remains ok might not be the best idea.
New submission from Erik Allik:
class Foo(object):
... pass
...
asdads % Foo()
'asdads'
Doesn't look like it's supposed to be this way.
As per the documentation:
If format requires a single argument, values may be a single non-tuple object.
[5] Otherwise, values must be a tuple with
Alex Gaynor added the comment:
Additional detail, if and only if Foo defines an __str__ method, this raises an
exception.
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15801
R. David Murray added the comment:
That doesn't appear to be true in 3.2. I happened to test this on
email.message.Message, and it also did not raise an error, but it defines an
__str__.
I suspect this is some oddball result of the coercion rules.
--
nosy: +r.david.murray
R. David Murray added the comment:
Didn't get an error in 2.7, either, with Message().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15801
___
Mike Graham added the comment:
Line 13464 of unicodeobject.c is
if (Py_TYPE(args)-tp_as_mapping !PyTuple_Check(args)
!PyUnicode_Check(args))
Too lazy to check, but don't user-created types have a tp_as_mapping? If so, I
think it mistakes Foo() for a dict.
--
nosy:
karl added the comment:
Fair enough, it could be a warning when
* more than one space in between http version and status code
* if there is a missing space after the status code
I'm not advocating for being strict only. I'm advocating for giving the tools
to developer to assess that things
Benjamin Peterson added the comment:
This seems to have broken parallel building of modules.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15591
___
New submission from Serhiy Storchaka:
Test for mailbox contains meaningless asserts. Here is a patch that corrects
testing, if I correctly understand it.
--
components: Tests
files: test_mailbox_create_tmp.patch
keywords: patch
messages: 169307
nosy: akuchling, barry, r.david.murray,
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file27037/test_mailbox_create_tmp-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15802
___
R. David Murray added the comment:
Looks right to me on a quick scan, but I'm not familiar with that test.
--
nosy: +petri.lehtinen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15802
___
Changes by A.M. Kuchling li...@amk.ca:
--
nosy: -akuchling
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15802
___
___
Python-bugs-list mailing
Roundup Robot added the comment:
New changeset 2801bf875a24 by Benjamin Peterson in branch '2.7':
use the stricter PyMapping_Check (closes #15801)
http://hg.python.org/cpython/rev/2801bf875a24
New changeset 4d431e719646 by Benjamin Peterson in branch '3.2':
use the stricter PyMapping_Check
Graham Dumpleton added the comment:
Sorry, Mark. Is not for associating thread state specified by embedding
application. In simple terms it is exactly like existing PyGILState_Ensure() in
that caller doesn't have a thread state, whether it has already been created.
Only difference is to allow
STINNER Victor added the comment:
New patch fixing the issue with a better API: window.get_wch()-int or str
depending on the key (int for key codes, str for other keys).
Oh, I realized that test_curses does also fail on my laptop without the patch.
My laptop is running Fedora 11 which uses
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file27007/curses_get_wch.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
Antoine Pitrou added the comment:
Perhaps you should simply remove the new function, and re-add it in 3.4 when
you've thought it out a bit more.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
STINNER Victor added the comment:
window.get_wch() has been added by the issue #6755, and curses.unget_wch() by
#12567. Copy the nosy of the issue #6755.
--
nosy: +Nicholas.Cole, akuchling, cben, gpolo, inigoserna, jcea, phep,
python-dev, r.david.murray, schodet, zeha
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file27038/curses_get_wch-2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
STINNER Victor added the comment:
New patch with a test for this specific issue.
(It's not easy to me to write a patch because my version of libncurses doesn't
work with integers bigger than 128...)
--
Added file: http://bugs.python.org/file27039/curses_get_wch-3.patch
R. David Murray added the comment:
With your patch 5 applied, test_zipimport_support fails. I took a quick look
at this and it looks like it is because we've added a dependency on an external
data file to the test for DocTestSuite.
Note that with patch 4 applied, test_pyclbr fails...I found
STINNER Victor added the comment:
Perhaps you should simply remove the new function, and re-add it in 3.4 when
you've thought it out a bit more.
Python 3 forces somehow to use Unicode, and the Unicode support of the curses
module in Python 3.2 is incomplete or broken (see . Many issues have
Changes by STINNER Victor victor.stin...@gmail.com:
Added file: http://bugs.python.org/file27038/curses_get_wch-2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
Chris Jerdonek added the comment:
With your patch 5 applied, test_zipimport_support fails.
You're right. It looks like test_zipimport_support is tightly coupled to
test_doctest. For example--
http://hg.python.org/cpython/file/786d9516663e/Lib/test/test_zipimport_support.py#l94
My
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file27039/curses_get_wch-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
STINNER Victor added the comment:
bitdancer tested the patch version 3 for me and it fails: unget_wch(KEY_UP)
inserts the character U+0103 (259, à) instead of KEY_UP in get_wch() buffer.
unget_wch() cannot be used to insert key codes, only classic keys like letters.
So I removed the patch
STINNER Victor added the comment:
@simpkins: can you please try my patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
___
Erik Allik added the comment:
Respectable reaction time.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15801
___
___
Python-bugs-list mailing
STINNER Victor added the comment:
bitdancer proposes (on IRC) a better doc for get_wch():
Get a wide character. Return a character for most keys, or an integer for
function keys, keypad keys, and other special keys.
We may also replace and so on by and other special keys in getkey()
Roundup Robot added the comment:
New changeset c58789634d22 by Victor Stinner in branch 'default':
Issue #15785: Modify window.get_wch() API of the curses module: return a
http://hg.python.org/cpython/rev/c58789634d22
--
___
Python tracker
Chris Jerdonek added the comment:
I updated the patch to fix the test_zipimport_support tests. All tests now
pass. The only changes were to Lib/test/test_zipimport_support.py.
I'll make a note about test_pyclbr and test_zipimport_support when I create the
issue to move the supporting
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15800
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15802
___
___
Python-bugs-list mailing list
New submission from Nathan Trapuzzano:
The docstring on ConfigParser.items() is self-evidently bass ackwards. Fix is
in attached patch.
--
components: Library (Lib)
files: cpython.patch
keywords: patch
messages: 169324
nosy: nbtrap
priority: normal
severity: normal
status: open
title:
Nick Coghlan added the comment:
I agree it's an acceptable risk for 3.3.0. Most third party decimal operations
simply won't accept an explicit context argument at all - avoiding the need to
pass the current context around explicitly is the whole point of it being
stored in the thread locals.
New submission from gd2shoe:
I'm constantly finding myself writing itty-bitty try blocks like such:
process stuff
try : someSubProcess.kill()
except : pass
process stuff
I realize this isn't a rigorous use of except, but it's good enough for a vast
majority of what I need it for. Still, it
Raymond Hettinger added the comment:
FWIW, this is already easy to do with decorators:
class Pass:
def __init__(self, exc):
self.exc = exc
def __enter__(self):
return self
def __exit__(self, exctype, excinst, exctb):
Jesús Cea Avión added the comment:
No way this is going to be in 2.7.
--
nosy: +jcea
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15804
___
Nick Coghlan added the comment:
The reason I'm proposing going back to the original SwitchInterpreter idea is
because the EnsureEx idea doesn't nest cleanly - if your thread is already
associated with interpreter A, you can't readily call into interpeter B,
because the API provides no way to
Graham Dumpleton added the comment:
Nick. Valid point.
I guess I hadn't been thinking about case of one thread calling out of one
interpreter and then into another, as I don't do it in mod_wsgi and even I
regard doing that as partly evil.
Does that mean this switch interpreter call somehow
Benjamin Peterson added the comment:
Please submit your idea to the python-ideas list.
--
nosy: +benjamin.peterson
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15804
Nick Coghlan added the comment:
No, those wouldn't change at all. However, after thinking about it further, I'm
leaning back towards the option of an EnsureEx/ReleaseEx pair that allows the
previous interpreter to be reported and restored along with the GIL state. I'd
also like to make the
Graham Dumpleton added the comment:
So you are saying that as user of this I am meant to call it as:
PyGILState_INFO info;
PyGILState_EnsureEx(interp, info);
...
PyGILState_ReleaseEx(info);
What is the potential error code from PyGILState_EnsureEx() considering that
right now for
Nick Coghlan added the comment:
Currently, both PyGILState_Ensure and PyGILState_Release just call
PyFatal_Error if anything goes wrong. With the *Ex versions, it would be
possible to replace those fatal errors with more conventional error handling.
For Ensure, the likely error is failing to
New submission from Raymond Hettinger:
The technique of temporarily redirecting stdout could be encapsulated in a
context manager.
print('This goes to stdout')
with RedirectStdout(sys.stderr):
print('This goes to stderr')
print('So does this')
print('This goes to stdout')
The print
1 - 100 of 108 matches
Mail list logo