Eric Smith e...@trueblade.com added the comment:
Checked in.
trunk: r78440
release26-maint: r78441
py3k: r78442
release31-maint: r78443
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Ezio Melotti ezio.melo...@gmail.com added the comment:
The latest patch (issue7649v4.diff) checks if the char is ASCII or non-ASCII
and then, if the char is ASCII, it converts it directly to Unicode, otherwise
it tries to decode it using the default encoding, raising a UnicodeDecodeError
if
Eric Smith e...@trueblade.com added the comment:
Checked in.
trunk: r78444
release26-maint: r78445
py3k: r78446
release31-maint: r78447
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Gael gael.peglia...@makina-corpus.com added the comment:
Here it is.
Python 2.4.5 (#1, Feb 24 2010, 08:26:11)
[GCC 3.4.6] on sunos5
Type help, copyright, credits or license for more information.
import sys
print sys.path
[
'',
'/tmp/Python-2.4/lib/python24.zip',
Nick n...@codingrobot.com added the comment:
tested on macosx 10.6.2 64-bit and debian amd64 with both python2.6 and
python3.1
the output is always the same:
b'\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00'
20
(1, 1, 2, 1, 1)
(1, 1, 2, 16777216, 16777216)
New submission from Nick n...@codingrobot.com:
the code I'm trying to execute (block is long enough):
unpack(2IB2I, block)
executing this raises an exception:
struct.error: unpack requires a bytes argument of length 20
Setting native byte-order with '@' causes the same error.
Specifying the
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
It's not about byte ordering. '@' and '=' also change the alignment!
The documentation says it well:
- '@' (or no marker) uses the 'native' alignment, which (on every platform I
know) aligns 4-bytes ints to multiple of 4 bytes.
- '='
Brian Curtin cur...@acm.org added the comment:
This patch should cover everything, and it works with 2.6 as well. In order to
figure out workstation vs. server, it uses the ProductName from the registry
when it can't the info from getwindowsversion. If it finds a server name, it's
a server,
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
Given
assert(*m 0);
assert(*d 0);
at the end of normalize_y_m_d(), it looks like at lest 1 =*month and 1 =*day
are redundant.
A closer look also reveals
assert(1 = *m *m = 12);
in the middle
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
Aha! My reliance on asserts() was misguided. With the debug build:
t0-d2
Assertion failed: (ordinal = 1), function ord_to_ymd, file
/Users/sasha/Work/python-svn/trunk/Modules/datetimemodule.c, line 269.
Abort trap
New submission from Matt Bandy matt.ba...@thq.com:
Using the Py_ADDRESS_IN_RANGE macro can result in a crash under certain
threading conditions. Since it is intentionally possible for
(POOL)-arenaindex to reference memory which is not under Python's control,
another thread may modify that
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
No, because normally distributions do not use debug builds.
but that's the reason why tests are needed: they must pass with asserts enabled.
--
___
Python tracker rep...@bugs.python.org
Tim Peters tim.pet...@gmail.com added the comment:
Note that nothing in obmalloc is _intended_ to be thread-safe. Almost all
Python API functions make the caller responsible for serializing calls (which
is usually accomplished by magic via the GIL). This includes calls to all
facilities
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
No, the description above says it: only the first thread calls
Py_ADDRESS_IN_RANGE. The other thread happens to modify the memory at the
beginning of the page, just at the address (POOL)-arenaindex.
Could we use an inline function
Antoine Pitrou pit...@free.fr added the comment:
Obviously it also involves changing the code where the macro is invoked. It
would be quite non-controversial though.
I've a got a more interesting question: how does the memory allocator end up
being invoked from two threads at once? Usually
Matt Bandy matt.ba...@thq.com added the comment:
Amaury is correct -- in the case I observed, the other thread had nothing to do
with Python and was not calling Python functions that would have required
obtaining the GIL at any time (again, I'm using an embedded Python interpreter
in a larger
Matt Bandy matt.ba...@thq.com added the comment:
You can't add a block without changing the way the macro is used -- it's
usually used like:
if (Py_ADDRESS_IN_RANGE(p, pool))
This won't work with your proposed change since you can't put a do {} loop into
the test expression of the if
Tim Peters tim.pet...@gmail.com added the comment:
Amaury, I have no real idea what your No, the description above says it: ...
is a response to, but if it's to my point that obmalloc is not intended to be
thread-safe, it's not addressing that point. Any case in which another thread
can
Asheesh Laroia ashe...@asheesh.org added the comment:
Hey all,
I think this is ready. Can someone review the patch?
--
nosy: +Asheesh.Laroia
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6538
Tim Peters tim.pet...@gmail.com added the comment:
Just noting there are ways to trick the macro into reading a thing once. For
example, embed something like a
((x = arenas[(POOL)-arenaindex].address) || 1)
clause early on refer to x later (where x is some file-scope new variable).
Matt Bandy matt.ba...@thq.com added the comment:
It's a pretty major limitation on the embedding case if you can't allow other
threads that aren't related to Python to run at any time that another thread
may be in obmalloc, and one I haven't seen documented anywhere. The only other
fix that
New submission from David Schere dsch...@arinc.com:
When doing an exit() within a signal handler for an alarm I am seeing something
strange:
This code works, it exits within signal handler as expected. You never see the
print statement executed.
import signal
import time
import sys
import
David Schere dsch...@arinc.com added the comment:
sys.exit() does not behave the way a C programming thinks. It raises an
exception.
I'm probably not the first person to get this 'gotcha'
--
status: open - closed
___
Python tracker
Tim Peters tim.pet...@gmail.com added the comment:
Right, I already agreed it would be fine to fix this if it's cheap ;-)
I didn't give any real thought to the macro solution, but that's fine by me
too. It would be best to embed the assignment in a _natural_ place, though;
like, say:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
It would be simpler to add a .. class:: MatchObject directive.
Also, RegexpObject should be handled as well.
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
Matt Bandy matt.ba...@thq.com added the comment:
That should probably be:
#define Py_ADDRESS_IN_RANGE(P, POOL)\
((x = (POOL)-arenaindex) maxarenas \
(uptr)(P) - arenas[x].address (uptr)ARENA_SIZE \
arenas[x].address != 0)
The
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
I am attaching the patch that fixes the issue by ignoring empty and all space
lines during commands' entry. Note that as written the patch also makes pdb
ignore shell escapes unless it is extended with do_shell method. I
Tim Peters tim.pet...@gmail.com added the comment:
`x` should be a local variable. ... assembler code will be smaller.
??? It should make no difference to an optimizing compiler. Lifetime analysis
(even if it's feeble) should be able to determine that all uses are purely
local, with no need
Matthew Barnett pyt...@mrabarnett.plus.com added the comment:
\p{name} is supported for Unicode properties, scripts and blocks in my regex
module (see issue #2636).
It also supports the POSIX set syntax, although I'm not sure that we really
need to have 2 ways of doing it, eg \p{Alpha} and
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
I reproduced this bug on OSX 10.6:
os.setregid(-1,-1)
Traceback (most recent call last):
File stdin, line 1, in module
OverflowError: group id too big
Since -1 has special meaning as an argument to POSIX setregid(rgid,
Senthil Kumaran orsent...@gmail.com added the comment:
urllib.getproxies() might be helpful to be documented too. I have added
documentaion to this helper function in the r78457 (trunk), r78458, r78459,
r78460.
--
resolution: - fixed
status: open - closed
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:
Attached is a minimal example. It has a function called leak(). The end of
the script calls that function, runs the garbage collector, and prints out the
number of objects in the system. In Python 2.6, the number of
Asheesh Laroia ashe...@asheesh.org added the comment:
Ryan -- would you take a further look at this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6538
___
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - duplicate
status: open - closed
superseder: - ABC caches should use weak refs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8022
Matthew Barnett pyt...@mrabarnett.plus.com added the comment:
issue2636-20100226.zip is a new version of the regex module.
It now supports the branch reset (?|...|...), enabling the different branches
of an alternation to reuse group numbers.
--
Added file:
Meador Inge mead...@gmail.com added the comment:
The patch looks reasonable. I built on it with the following changes:
1. Added some extra test cases to cover Unicode format strings,
since the code was changed to handle these as well.
2. Changed test_builtin.py by
Pablo Mouzo pablomo...@gmail.com added the comment:
The patch changes the default to True, and updates the tests and the docs to
reflect this.
--
keywords: +patch
nosy: +pablomouzo
Added file: http://bugs.python.org/file16377/issue7834.diff
___
37 matches
Mail list logo