Changes by Adam Olsen [EMAIL PROTECTED]:
--
nosy: +Rhamphoryncus
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3001
___
___
Python-bugs-list mailing
Adam Olsen [EMAIL PROTECTED] added the comment:
Surely remote proxies fall under what would be expected for a proxy
mixin? If it's in the stdlib it should be a canonical implementation,
NOT a reference implementation.
At the moment I can think up 3 use cases:
* weakref proxies
* lazy load
Adam Olsen [EMAIL PROTECTED] added the comment:
_deref won't work for remote objects, will it? Nor _unwrap, although
that starts to get fun.
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue643841
Adam Olsen [EMAIL PROTECTED] added the comment:
If it's so specialized then I'm not sure it should be in the stdlib -
maybe as a private API, if there was a user.
Having a reference implementation is noble, but this isn't the right way
to do it. Maybe as an example in Doc or in the cookbook
New submission from Adam Olsen [EMAIL PROTECTED]:
Patch allows any iterable (such as set and frozenset) to be used for
__all__.
I also add some blank lines, making it more readable.
--
files: python-importall.diff
keywords: patch
messages: 67104
nosy: Rhamphoryncus
severity: normal
Adam Olsen [EMAIL PROTECTED] added the comment:
tuples are already allowed for __all__, which breaks attempts to
monkey-patch it.
I did forget to check the return from PyObject_GetIter.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2928
Adam Olsen [EMAIL PROTECTED] added the comment:
The patch for issue 1856 should fix the potential crash, so we could
eliminate that scary blurb from the docs.
--
nosy: +Rhamphoryncus
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720705
Changes by Adam Olsen [EMAIL PROTECTED]:
--
nosy: +Rhamphoryncus
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue689895
___
Python-bugs-list mailing list
Adam Olsen [EMAIL PROTECTED] added the comment:
Revised again. sets are only hashed after PyObject_Hash raises a TypeError.
This also fixes a regression in test_subclass_with_custom_hash. Oddly,
it doesn't show up in trunk, but does when my previous patch is applied
to py3k.
Added file: http
New submission from Adam Olsen [EMAIL PROTECTED]:
sets are based on dicts' code, so they have the same problem as bug
1517. Patch attached.
--
files: python-lookkeycompare.diff
keywords: patch
messages: 66829
nosy: Rhamphoryncus
severity: normal
status: open
title: lookkey should
Adam Olsen [EMAIL PROTECTED] added the comment:
There is no temporary hashability. The hash value is calculated, but
never stored in the set's hash field, so it will never become out of
sync. Modification while __hash__ or __eq__ is running is possible, but
for __eq__ that applies to any
Adam Olsen [EMAIL PROTECTED] added the comment:
Here's another approach to avoiding set_swap_bodies. The existing
semantics are retained. Rather than creating a temporary frozenset and
swapping the contents, I check for a set and call the internal hash
function directly (bypassing
Adam Getchell [EMAIL PROTECTED] added the comment:
Agreed.
C:\Projects\Pythonpython randomunittest.py
...
--
Ran 3 tests in 0.003s
OK
C:\Projects\Python
-Original Message-
From: Georg Brandl [mailto:[EMAIL
New submission from Adam Getchell [EMAIL PROTECTED]:
Picking the canonical example of unit test:
import random
import unittest
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.seq = range(10)
def testshuffle(self):
# make sure the shuffled
Adam Olsen [EMAIL PROTECTED] added the comment:
new_buffersize returns a size_t. You should use SIZE_MAX instead
(although I don't see it used elsewhere in CPython, so maybe there's
portability problems.)
The call to _PyString_Resize implicitly casts the size_t to Py_ssize_t.
The check
Adam Olsen [EMAIL PROTECTED] added the comment:
The indentation still needs tweaking. You have only one tab where you
should have two, and one line uses a mix of tabs and spaces.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1174606
Adam Olsen [EMAIL PROTECTED] added the comment:
Nevermind that the current implementation *is* broken, even if you
consider fixing it to be a low priority. Closing the report with a doc
tweak isn't right.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Adam Olsen [EMAIL PROTECTED] added the comment:
So why doesn't set() in {} work? Why was PEP 351 rejected when it would
do this properly?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2778
Changes by Adam Olsen [EMAIL PROTECTED]:
--
nosy: +Rhamphoryncus
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1348
__
___
Python-bugs-list mailing list
Unsubscribe
Adam Olsen [EMAIL PROTECTED] added the comment:
Cleaned up version of Amaury's patch. I stop releasing the GIL after
sys.exitfunc is called, which protects threads from the ensuing teardown.
I also grab the import lock (and never release it). This should prevent
the nasty issue with daemon
Adam Olsen [EMAIL PROTECTED] added the comment:
The intended use is unsafe. contains, remove, and discard all use it
for a lookup, which can't be fixed.
Upon further inspection, intersection_update is fine. Only a temporary
set (not frozenset!) is given junk, which I don't see as a problem
New submission from Adam Olsen [EMAIL PROTECTED]:
In 3.0, unittest's output has become line buffered. Instead of printing
the test name when it starts a test, then ok when it finishes, the
test name is delayed until the ok is printed. This makes it
unnecessarily hard to determine which test
Adam Olsen [EMAIL PROTECTED] added the comment:
Hrm, this behaviour exists in trunk as well. I must be confused about
the cause (but the patch still fixes it.)
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2787
Adam Olsen [EMAIL PROTECTED] added the comment:
I decided not to wait. Here's a patch.
Several of set's unit tests covered the auto-conversion, so I've
modified them.
--
keywords: +patch
Added file: http://bugs.python.org/file10217/python-setswap.diff
Adam Olsen [EMAIL PROTECTED] added the comment:
PEP 218 explicitly dropped auto-conversion as a feature. Why should
this be an exception?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2778
New submission from Adam Olsen [EMAIL PROTECTED]:
set_swap_bodies() is used to cheaply create a frozenset from a set,
which is then used for lookups within a set. It does this by creating a
temporary empty frozenset, swapping its contents with the original set,
doing the lookup using
Adam Olsen [EMAIL PROTECTED] added the comment:
This bug was introduced by r53249, which was fixing bug #1566280.
Fixed by moving the WaitForThreadShutdown call into Py_Finalize, so all
shutdown paths use it. I also tweaked the name to follow local helper
function conventions.
Martin, since
Adam Olsen [EMAIL PROTECTED] added the comment:
Oh, and the patch includes a testcase. The current test_threading.py
doesn't work with older versions, but a freestanding version of this
testcase passes in 2.1 to 2.4, fails in 2.5 and trunk, and passes with
the patch
Ron Adam [EMAIL PROTECTED] added the comment:
The following patch also fixes this along with other improvements.
Maybe someone can review it.
http://bugs.python.org/issue2001
--
nosy: +ron_adam
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Adam Olsen [EMAIL PROTECTED] added the comment:
The original bug is not whether or not python reuses int objects, but
rather that an existing optimization disappears under certain
circumstances. Something is breaking our optimization.
The later cases where the optimization is simply gone
Adam Olsen [EMAIL PROTECTED] added the comment:
Unless someone has a legitimate use case for disabling small_int that
doesn't involve debugging (which I really doubt), I'd just assume it's
always in use.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Ron Adam added the comment:
Remade the diff with correct directory name so it patches correctly.
Is there a way to add the patch keyword?
Added file: http://bugs.python.org/file9448/pydocnotk.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2001
Ron Adam added the comment:
Added a topics and keywords index choices to the navbar.
This gives the web interface the same functionality as the cli interface.
Fixed the -p option which I had missed.
Added file: http://bugs.python.org/file9423/pydocnotk.diff
Adam Olsen added the comment:
Py_Main calls WaitForThreadShutdown before calling Py_Finalize, which
should wait for all these threads to finish shutting down before it
starts wiping their globals.
However, if SystemExit is raised (such as via sys.exit()), Py_Exit is
called, and it directly
Adam Olsen added the comment:
To put it another way: SystemExit turns non-daemon threads into daemon
threads. This is clearly wrong. Brent, could you reopen the bug?
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1722344
Adam Olsen added the comment:
I disagree. sys.exit() attempts to gracefully shutdown the interpreter,
invoking try/finally blocks and the like. If you want to truly force
shutdown you should use os.abort() or os._exit().
Note that, as python doesn't call a main function, you have to use
Changes by Ron Adam:
--
versions: +Python 2.6
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2001
__
___
Python-bugs-list mailing list
Unsubscribe:
http
New submission from Ron Adam:
This patch removes the gui tk control panel and replaces it with a
navigation bar on the served web pages.
This offers a nicer user experience because one no longer needs to jump
back and forth between windows.
The navbar supports getting specific modules
Adam Olsen added the comment:
Is there a guarantee that the with-statement is safe in the face of
KeyboardInterrupt? PEP 343 seems to imply it's not, using it as a
reason for why we need no special handling if __exit__ fails.
--
nosy: +Rhamphoryncus
Adam Olsen added the comment:
Yes, but there's no guarantee it will even reach the C function.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
___
Python-bugs-list
Changes by Adam Olsen:
--
nosy: +Rhamphoryncus
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1303614
_
___
Python-bugs-list mailing list
Unsubscribe:
http
Adam Olsen added the comment:
Is the bug avoided if you import threading first and use it instead of
thread? I'd like to see thread removed in 3.0 (renamed to _thread or
the like.)
--
nosy: +Rhamphoryncus
_
Tracker [EMAIL PROTECTED]
http
Adam Olsen added the comment:
Hrm. It seems you're right. Python needs thread-local data to
determine if the GIL is held by the current thread. Thus, autoTLSkey
and all that need to never be torn down. (The check could be done much
more directly than the current PyThreadState_IsCurrent
Adam Olsen added the comment:
PyGILState_Ensure WOULD block forever if it acquired the GIL before
doing anything else.
The only way to make Py_Initialize callable after Py_Finalize is to make
various bits of the finalization into no-ops. For instance, it's
currently impossible to unload C
Adam Olsen added the comment:
Adam, did you notice the change on revision 59231 ? the
PyGILState_Ensure stuff should now remain valid during the
PyInterpreterState_Clear() call.
That doesn't matter. PyGILState_Ensure needs to remain valid *forever*.
Only once the process is completely gone
Adam Olsen added the comment:
I'm not sure I understand you, Gregory. Are arguing in favour of adding
extra logic to the GIL code, or against it?
I'm attaching a patch that has non-main thread exit, and it seems to fix
the test case. It doesn't fix the PyGILState_Ensure problems though.
Also
Adam Olsen added the comment:
In essence, it's a weakness of the POSIX API that it doesn't distinguish
synchronous from asynchronous signals.
The consequences of either approach seem minor though. I cannot imagine
a sane use case for catching SIGSEGV, but documentation changes should
Adam Olsen added the comment:
The warning in the documentation should be strengthened. Python simply
does not and cannot support synchronously-generated signals.
It is possible to send a normally synchronous signal asynchronously,
such as the os.kill() Ralf mentioned, so it's theoretically
Changes by Adam Olsen:
--
nosy: +rhamphoryncus
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1683
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Adam Olsen:
--
nosy: +rhamphoryncus
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1676
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Adam Olsen added the comment:
You have:
#define Py_NAN Py_HUGE_VAL * 0
I think this would be safer as:
#define Py_NAN (Py_HUGE_VAL * 0)
For instance, in code that may do a / Py_NAN.
Those manual string copies (*cp++ = 'n';) are ugly. Can't you use
strcpy() instead?
--
nosy
Adam Olsen added the comment:
Minor typo. Should be IEEE:
Return the sign of an int, long or float. On platforms with full IEE
754\n\
--
nosy: +rhamphoryncus
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1640
Adam Olsen added the comment:
The python API has the advantage that you can test for it at runtime,
avoiding a compile-time check. I don't know if this is significant though.
I don't see the big deal about a C API. All you need to do is call
PyImport_ImportModule(signal
Adam Olsen added the comment:
mwh, my threading patch is extensive enough and has enough overlap that
I'm not intimidating by fixing this. It's low on my list of priorities
though.
So far my tendency is to rip out multiple interpreters, as I haven't
seen what it wants to accomplish. It's
Adam Olsen added the comment:
Thanks georg.
Added file: http://bugs.python.org/file8925/python2.6-set_wakeup_fd3.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1583
__Index: Doc/library/signal.rst
New submission from Adam Olsen:
This adds signal.set_wakeup_fd(fd), which allows a single library to be
woken when a signal comes in.
--
files: python2.6-set_wakeup_fd1.diff
messages: 58385
nosy: rhamphoryncus
severity: normal
status: open
title: Patch for signal.set_wakeup_fd
Added
Adam Olsen added the comment:
Guido, it looks like I can't alter the Assigned To field. You get the
Nosy List instead. ;)
--
nosy: +gvanrossum
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1583
Adam Olsen added the comment:
version 2, adds to Doc/library/signal.rst. It also tweaks the
set_wakeup_fd's docstring.
I haven't verified that my formatting in signal.rst is correct.
Specifically, the '\0' should be checked.
Added file: http://bugs.python.org/file8916/python2.6
Adam Olsen added the comment:
The minimal patch doesn't initialize dummy_char or dummy_c. It's
harmless here, but please fix it. ;)
sizeof(dummy_char) will always be 1 (C defines sizeof as multiples of
char.) The convention seems to be hardcoding 1 instead
New submission from Adam Olsen:
(thanks go to my partner in crime, jorendorff, for helping flesh this out.)
lookdict calls PyObject_RichCompareBool without using INCREF/DECREF on
the key passed. It's possible for the comparison to delete the key from
the dict, causing its own argument
Changes by Adam Olsen:
--
nosy: +rhamphoryncus
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1225584
_
___
Python-bugs-list mailing list
Unsubscribe:
http
Ron Adam added the comment:
It looks like the disabling of \u and \U in raw strings is done. Does
tokenize.py need to be fixed, to match?
While working on this I was able to clean up the string parsing parts of
tokenize.c, and have a separate patch with just that.
And an updated patch
Changes by Ron Adam:
Added file: http://bugs.python.org/file8763/no_raw_escapes_patch.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720390
_
___
Python-bugs-list
Ron Adam added the comment:
George is correct. The changes are minimal.
The only addition is to run the tokenize_tests.txt file though compile()
as a way to force an exception if it needs updating in the future. The
results of the compile are not used
New submission from Ron Adam:
Replaced Unicode literals in tokenize.py and it's tests files with byte
literals.
Added a compile step to the test to make sure the text file used in the
test are valid python code. This will catch changes that need to be
done in to the text (gold file) for future
Ron Adam added the comment:
Yes, I will update it.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720390
_
___
Python-bugs-list mailing list
Unsubscribe:
http
New submission from Adam Hupp:
The attached patch resolves test failues in test_asynchat and
test_asyncore.
The asynchat failure was due to interpolating a byte string into a
unicode string using %s. This resulted in a b'' byte representation
in the final string. The fix is to use string
New submission from Adam Hupp:
The attached patch resolves the intermittent test_xmlrpc failures
reported by Neal Norwitz[0].
test_xmlrpc starts the XMLRPC server with a socket timeout. This puts
the socket into non-blocking mode which is incompatible with the use of
socket.makefile as used
Adam Olsen added the comment:
The problem with being tolerate as you suggest is you lose the ability
to round-trip. Read in a file using the UTF-8 signature, write it back
out, and suddenly nothing else can open it.
Conceptually, these signatures shouldn't even be part of the encoding;
they're
Adam Olsen added the comment:
On 11/1/07, James G. sack (jim) [EMAIL PROTECTED] wrote:
James G. sack (jim) added the comment:
Adam Olsen wrote:
Adam Olsen added the comment:
The problem with being tolerate as you suggest is you lose the ability
to round-trip. Read in a file using
New submission from Adam Doherty:
Hello:
I'm am trying to conduct some tests on a list of data that checks for
the position of values in list elements using the bisect module. To
store the results of these tests for output to a template I have build a
dictionary with 47 keys the values
Adam Olsen added the comment:
typeobject.c:1842:type_new
type = (PyTypeObject *)metatype-tp_alloc(metatype, nslots);
nslots may be 0.
typeobject.c:1966:type_new assigns this just-past-the-end address to
tp_members
type-tp_members = PyHeapType_GET_MEMBERS(et);
type_new later
New submission from Adam Olsen:
type_new() allocates the exact number of slots it's going to use, but
various other functions assume there's one more slot with a NULL name
field serving as a sentinel. I'm unsure why it doesn't normally crash.
--
components: Interpreter Core
messages
New submission from Adam Olsen:
In the large else branch in decode_unicode (if encoding is not NULL or
iso-8859-1), the new string it produces is not nul-terminated. This
then hits PyUnicode_DecodeUnicodeEscape's octal escape case, which reads
past the end of the string (but would stop
Grzegorz Adam Hankiewicz
added the comment:
Any progress report on this issue, please?
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1739648
Grzegorz Adam Hankiewicz
added the comment:
Any progress report on this issue, please?
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1760357
New submission from Adam Hupp:
It would be useful for tempfile.TemporaryFile and friends to pass
newline and encoding arguments to the underlying io.open call. For
example, several tests in test_csv use TemporaryFile and need to handle
unicode file output or preserve exact newlines
Adam Hupp added the comment:
One change I forgot to mention that may need discussion. I've changed
the 'bufsize' arguments in tempfile to 'buffering', since that is
consistent with the same change in os.fdopen.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org
601 - 678 of 678 matches
Mail list logo