Mark Dickinson added the comment:
Closing as a duplicate of issue 1662581.
--
nosy: +mark.dickinson
resolution: - duplicate
status: open - closed
superseder: - the re module can perform poorly: O(2**n) versus O(n**2)
___
Python tracker
Mark Dickinson added the comment:
Given the number of times this comes up, I think it's a least worth an upgrade
from 'low' priority to 'normal' priority.
--
priority: low - normal
versions: +Python 3.4 -Python 3.3
___
Python tracker
Zdenek Pavlas added the comment:
This patch isn't safe
Yes, it's broken. Does not work unless thread support was enabled, and locking
initialized. There are probably other bugs, too. Not meant to be included,
really. But IMO the correct implementation should work along these lines.
the
Mark Dickinson added the comment:
@lpd: you may want to look at the 'regex' module on PyPI [1] to see if it
solves your problems. The idea is that some form of this should eventually go
into the standard library, but we've been lacking volunteers for the huge code
review task involved.
[1]
Changes by Mark Dickinson dicki...@gmail.com:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Charles-François Natali added the comment:
the reason why signal handlers are called synchronously from the main
loop is because you can't call arbitrary called on behalf of a signal
handler: the must be async safe.
Could you elaborate, please? Suppose Python has called a C module. From
anatoly techtonik added the comment:
On Tue, Nov 27, 2012 at 12:15 AM, Ezio Melotti rep...@bugs.python.orgwrote:
I'm not sure the documentation should be changed. While boolean values
are accepted, user should prefer True/False, so the fact that you can pass
other things shouldn't be
Lucas Maystre added the comment:
OK, I'll give it a try.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11175
___
___
Python-bugs-list mailing
Mark Dickinson added the comment:
user should prefer True/False
I disagree: I don't see any reason why the normal duck-typing rules shouldn't
hold here. So +1 for the documentation changes from me.
--
nosy: +mark.dickinson
___
Python tracker
Zdenek Pavlas added the comment:
for example, if you call malloc() from within a signal handler, you can get a
deadlock or a crash if the signal was received while the process was in the
middle of an malloc() call.
Thanks, I see the problem. malloc() implements locking (when threads are
Danilo Bargen added the comment:
I disagree, I think this bug should be reopened and fixed.
A use case that I just ran into: I'm using a Django form with time fields that
aren't required, but that are only valid in combination (if there's a open time
there has to be a close time).
if not
New submission from Alexander Kruppa:
I'm trying to use the email.* functions to craft HTTP POST data for file
upload. Trying something like
filedata = open(data, rb).read()
postdata = MIMEMultipart()
fileattachment = MIMEApplication(filedata, _encoder=email.encoders.encode_noop)
R. David Murray added the comment:
Yes, the way BytesGenerator works is basically a hack to get the email package
itself working. Use cases outside the email package were not really considered
in the (short) timeframe during which it was implemented.
The longer term plan calls for redoing
R. David Murray added the comment:
Hmm. Let me rephrase that. *Internally* it doesn't support bytes payloads, it
encodes bytes payloads as surrogateescaped ascii, as you have oserved. Which
is why this is on the borderline, and could possibly be considered a bug fix,
because from an
Lucas Maystre added the comment:
Added some documentation for the patch. Let me know what you think.
--
Added file: http://bugs.python.org/file28139/filetype11175.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11175
Ezio Melotti added the comment:
I don't see any reason why the normal duck-typing rules shouldn't hold here.
The rules should apply, the only problem is in the documentation.
The documentation here could answer two questions:
1) what should I pass to these args to make them work?
2) can I
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16507
___
___
Roundup Robot added the comment:
New changeset d805982336a0 by Ezio Melotti in branch '2.7':
#16556: Fix inconsistency between kwds and kwargs. Patch by Taavi Burns.
http://hg.python.org/cpython/rev/d805982336a0
New changeset 565c3bbed7d3 by Ezio Melotti in branch '3.2':
#16556: Fix
Ezio Melotti added the comment:
The patch looked OK, so I committed it.
Regarding similar cleanups I think it's OK to do them only if the inconsistency
is in the same function. If different functions use kwds or kwargs in
different places but they do it consistently, then it doesn't matter.
Éric Araujo added the comment:
Oh, I had totally missed that the mismatch was between the function signature
in the docs and another part of the doc (I thought it was between the real
function signature and the doc). Good catch!
--
___
Python
Éric Araujo added the comment:
Ah, ok. Sounds good to me.
(I think this can go in stable branches, like other update to registries (e.g.
mimetypes), but other core devs may disagree.)
--
nosy: +lemburg, loewis
title: Add es_cu to locale library. - Add es_cu to locale aliases
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4945
___
___
Martin v. Löwis added the comment:
The patch looks good to me.
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16562
___
___
Martin v. Löwis added the comment:
I'd like to focus this issue; it has been open long enough, and deserves to get
closed once the original issue is resolved - which was that make smelly
reports symbols. I think dmalcolm's patch is quite a good start for that.
It may well be that other
Ezio Melotti added the comment:
Do you mean that when indentation is used, the separator only appears on line
ends?
Apparently: ./python -c 'from json import dumps; print(dumps([[[1,2,3]]*3]*3,
indent=2))'
--
___
Python tracker
Serhiy Storchaka added the comment:
And here is a synthetic microbenchmark:
$ ./python -m timeit -s n=10**3; k=2; a={(i,)*k:i for i in range(n)};
b={(i,)*k:i for i in range(n)} a == b
Vanilla: 251 usec per loop
Patched: 195 usec per loop
$ ./python -m timeit -s n=10**3; k=2; a={(i,)*k:i for
Chris Jerdonek added the comment:
On the whole, the patch looks okay to me. I think we should strive for
correctness in the documentation where possible.
While keeping True would keep the forward implications correct and document
the preferred value, there is often an implied assumption
Antoine Pitrou added the comment:
Victor, could you please backport to 3.3?
--
assignee: ronaldoussoren - haypo
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16416
___
New submission from Felipe Cruz:
Current pending calls limit is too small and it can be easily reached in very
intensive async file io applications.
There is a little hack in pyaio[1] which sleeps if Py_AddPendingCall returns
0 but It's not totally clear to me why the size of pendind calls
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16562
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 618ea5612e83 by Andrew Svetlov in branch 'default':
Issue #16464: reset Request's Content-Length header on .data change.
http://hg.python.org/cpython/rev/618ea5612e83
--
nosy: +python-dev
___
Python
Andrew Svetlov added the comment:
Pushed.
Thanks, Alexey.
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16464
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
assignee: - asvetlov
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16464
New submission from anatoly techtonik:
http://docs.python.org/2/library/ctypes.html#ctypes.Structure._anonymous_
An optional sequence that lists the names of unnamed (anonymous) fields.
If you feed it a string, such as _offset, it will print a very interesting
error:
...
File
anatoly techtonik added the comment:
s/A_OFFSET_UNION/_OFFSET_UNION/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16566
___
___
anatoly techtonik added the comment:
The union definition for the curious:
class _OFFSET(Structure):
_fields_ = [
('Offset', DWORD),
('OffsetHigh', DWORD)]
class _OFFSET_UNION(Union):
_anonymous_ = '_offset'
_fields_ = [
STINNER Victor added the comment:
An optional sequence that lists the names of unnamed (anonymous) fields
Yes, it must be a sequence.
_anonymous_ = '_offset'
This is a string, not a sequence. Just use _anonymous_ = ['_offset'].
--
nosy: +haypo
resolution: - invalid
status: open -
Ezra Berch added the comment:
Patch attached. I've taken a slightly different approach than what has been
discussed here: rather than define a new fullmatch() function and method, I've
defined a new re.FULLMATCH flag for match(). So an example would be
re.match('abc','abc',re.FULLMATCH)
The
anatoly techtonik added the comment:
ctypes should throw proper exception if a string is used instead of sequence.
It doesn't do this.
--
resolution: invalid -
status: closed - open
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
I'm still unable to figure out how to do it
You could look at Doc/library/unittest.rst, there are some tables that span
multiple lines. If you want a newline in the output too I think you have to
add a blank line in the cell.
--
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2537
___
___
Meador Inge added the comment:
A string *is* a sequence. That is actually part of the problem.
Consider a slight variation on the original repro case:
class _OFFSET(Structure):
... _fields_ = [
... ('Offset', c_int),
... ('OffsetHigh', c_int)]
...
[70412 refs]
class
Kiet Tran added the comment:
That document actually doesn't have any table that spans multiple lines. Here's
the html page: http://docs.python.org/dev/library/unittest.html
Actually, I already know how to make a table span multiple lines from this
stackoverflow page:
Todd Rovito added the comment:
Version 2 of the patch change include:
-help.txt removed all tabs and replaced with spaces, as suggested by Roger
-help.txt re-inserted the section on running IDLE without a subprocess as
suggested by Roger
-Added a note on line 162 (idle.rst) about how the Python
Todd Rovito added the comment:
For version 2 of the patch
-Line 340 (idle.rst) where the Emacs bindings are rendered seemed to work fine
on my computer without the spaces but I think ezio is correct spaces should be
present so I added them
**SHOULD BE**
-Line 340 (idle.rst) where the
Nick Coghlan added the comment:
Yes, if you pass string when you meant to pass [string], you will often get
awful error messages.
This is one of the downsides of strings being iterable, but we're not going to
add if isinstance(obj, str): throw TypeError(msg) special cases everywhere to
Raymond Hettinger added the comment:
The patch looks correct. If the tests pass, go ahead and apply it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16562
___
Chris Jerdonek added the comment:
Attaching new patch to address Ezio's suggestions on Rietveld. I will also
respond to those comments on Rietveld shortly.
--
Added file: http://bugs.python.org/file28142/issue-15990-5-default.patch
___
Python
Chris Jerdonek added the comment:
For some reason, Rietveld is erroring out every time I try to reply to one of
the comments. So I am pasting the reply below:
[Issue in the Rietveld tracker here:
http://code.google.com/p/rietveld/issues/detail?id=394 ]
On 2012/11/26 22:07:50, ezio.melotti
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2927
___
___
Python-bugs-list
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Attaching new patch to address Ezio's suggestions on Rietveld.
--
Added file: http://bugs.python.org/file28143/issue-16209-3-default.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16209
Brian Curtin added the comment:
Colin - it should work in the same way that setting PYTHONPATH as an
environment variable would work, e.g., semi-colon is the separator on Windows.
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
Roger Serwy added the comment:
I was able to trigger this problem on 2.7 as well. Changing type to behavior as
the core interpreter is not crashing.
Lukas, the only way I can trigger the traceback is by closing the editor while
the colorizer is still colorizing. Clicking randomly on the
Eric Snow added the comment:
Keep in mind that it's pretty easy to roll your own CM wrapper:
@contextlib.contextmanager
def closes(file):
yield file
file.close()
Then you can do this:
with closes(StringIO()) as test:
test.write(hi!)
return test.getvalue()
This works for 2.5
Ezio Melotti added the comment:
http://docs.python.org/2/library/contextlib.html#contextlib.closing
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1286
___
Campbell Barton added the comment:
patch attached, simply wraps putenv()
--
keywords: +patch
Added file: http://bugs.python.org/file28144/pyos_putenv.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16129
Christian Heimes added the comment:
At first glance your proposed fix looks like an easy hack to get around the
issue. However it's not going to work properly. Embedded Python interpreters
should isolate themselves from the user's environment. When
`Py_IgnoreEnvironmentFlag` is enabled,
Nick Coghlan added the comment:
Claiming this one, mainly because I want people to largely leave the already
hairy initialisation process alone until we get a chance to discuss it at the
language summit next year.
I plan to write up a comprehensive overview of the initialisation sequence
Eric Snow added the comment:
I agree with Benjamin re: __args__ and __kw__.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12370
___
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10914
___
___
Python-bugs-list
Eric Snow added the comment:
borrowed the time machine did we? ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1286
___
___
Python-bugs-list
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16499
___
___
Python-bugs-list
New submission from Erik VanderWerf:
I don't know if this has been suggested before, none of my searches returned
anything. Sorry if it has been rejected already.
Anyone who has used Python at least a little bit will know that you can use +=,
-=, *=, and /= to apply a change to a variable and
Nick Coghlan added the comment:
From a quick scan of the patch, I suspect the current implementation will also
break this code:
class Outer:
class InnerParent:
pass
class InnerChild(InnerParent):
pass
The evaluation of the other args to build_class needs to happen before
Eric Snow added the comment:
Sorry, just now digging out of a massive backlog here. The originally proposed
name of source_to_code() might be more appropriate than compile_source().
The relationship to compilation is not compulsory and the name/docstring/docs
might imply that. If you're
Eric Snow added the comment:
This proposal only affects the initialization of sys.path[0], and not any of
the other sys.path entries made by site.py or otherwise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13475
67 matches
Mail list logo