[Python-Dev] Web site type: Python 2.6b2 Released: 18-Jun-2008

2008-07-20 Thread Barry Scott

I think you mean july.

Barry

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?

2008-07-20 Thread Barry Scott

See http://code.google.com/p/python-incompatibility/source/checkout

Barry



On Jul 19, 2008, at 03:25, Jesus Cea wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lennart Regebro wrote:
| On Sun, May 25, 2008 at 6:25 AM, Jesus Cea <[EMAIL PROTECTED]> wrote:
|> Since I need to port bsddb3 to py3k, what I need to know?. Is any
|> *updated* document out there?.
|
| No, but there is a not yet complete, but quite updated set of  
examples.

|
| http://code.google.com/p/python-incompatibility/
|
| This is a collection of code snippets that will show code that does
| work under 2.x but not under 3.x, and the 3.x way of doing it (as  
well

| as a way that works under both 2.6 and 3.0, in applicable cases).
|
| There is no tests for changes in the C-API, if you (or somebody  
else)

| would like to add that (or any other tests) that would be very
| appreciated!

I can't checkout the code. What username/password must I use?.

- --
Jesus Cea Avion _/_/  _/_/_/_/_/_/
[EMAIL PROTECTED] - http://www.jcea.es/ _/_/_/_/  _/_/_/_/   
_/_/

jabber / xmpp:[EMAIL PROTECTED] _/_/_/_/  _/_/_/_/_/
.  _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBSIFQnZlgi5GaxT1NAQL3LQP/ZxblxpJwZAQ9qIUXHAZpFlmK86y7UPfT
DX707wR1YMOujiNazE2NuJSVCVkbbOlc1G2dxTAqDm7FAThkjuIeO74ijueUeFdN
p6LP2dS5pHH8h8G9bUfDynGCjRQ4t1TUblksQgPDtrYiXlzIBqYL1qkHRf72w2c3
fyuZWBpaH0w=
=nnN4
-END PGP SIGNATURE-
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/barry 
%40barrys-emacs.org




___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Web site type: Python 2.6b2 Released: 18-Jun-2008

2008-07-20 Thread Barry Warsaw

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Jul 20, 2008, at 3:44 AM, Barry Scott wrote:


I think you mean july.


Thanks, I'll fix that.
- -B

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSIMuQXEjvBPtnXfVAQLFVwP/SYQkNNHnReOOuPxnnJQkNqKTnDYLpZqT
9J0y/fExHPDNxrawPnxQfxKO9ARFv+DrJSO0aBaQrQP3F164xVfudSM/jN1eq9Th
w5im9VxdQTDp/QueK2JZA14LkGK+tj0owY7W599GFavX/OE1nUAWA16YwQAXI7EL
mJO4KyFciOk=
=v/Pl
-END PGP SIGNATURE-
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-3000] Removing bsddb module from py3k (was Re: No beta2 tonight)

2008-07-20 Thread Josiah Carlson
On Sat, Jul 19, 2008 at 6:44 PM, Jesus Cea <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Josiah Carlson wrote:
> | On-disk key -> value dictionary.  In every use of bsddb that I've seen
> | (or done myself), that's been the extent of it's use.  That's what I
> | *was* offering.  But it seems that everyone has had experience with
> | bsddb on a far deeper level (beyond dictionary + cursor access), and
> | would find (like you) absolutely no use in an on-disk dictionary with
> | a sqlite backend (which hasn't had the same maintenance issues as
> | bsddb), which is why I withdrew the offer.
>
> For such a simple application, you can use the already in stdlib "gdbm"
> module. Just remember it is not transactional, so beware diskfulls,
> application crashes, etc.

But sqlite is transactional, can offer cursors, getrange, etc., etc.

I'm still curious as to what deep features people are using in bsddb.
Anyone have any pointers to open source software?

 - Josiah
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Search broken on the python dev docs?

2008-07-20 Thread Gregory P. Smith
http://docs.python.org/dev/

the search box worked for earlier releases but has been broken and returns
nothing useful of late.

If I enter simple terms like 'time' or 'os' or 'os.walk' what is returned is
pathetic.

how does this work?  is an index corrupt or not being regenerated?

-gps
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-20 Thread Victor Stinner
Hi,

Le Saturday 19 July 2008 15:14:44, vous avez écrit :
> Thank you Victor - I didn't want to change any underlying
> multiprocessing code until we had the test suite in a better state
> (which we do now) (...)
>
> One suggestion would be to include tests to prove the bugs is fixed if
> possible (to the patch), so we can add them to the suite. 

Ok, here is a patch for test_multiprocessing.py.
- TestClosedFile.test_open() verify that Connection() rejects closed file 
descriptor
- TestClosedFile.test_operations() verify that Connection() raises IOError for 
operations on closed file

I don't know if Connection() is a socket or a pipe. Both should be tested.

Victor
Index: Lib/test/test_multiprocessing.py
===
--- Lib/test/test_multiprocessing.py	(révision 65132)
+++ Lib/test/test_multiprocessing.py	(copie de travail)
@@ -54,6 +54,9 @@
 HAVE_GETVALUE = not getattr(_multiprocessing,
 'HAVE_BROKEN_SEM_GETVALUE', False)
 
+# Any existing and readable file name
+EXISTING_FILE = "/etc/issue"
+
 #
 # Creates a wrapper for a function which records the time it takes to finish
 #
@@ -1737,6 +1740,29 @@
 testcases_threads = create_test_cases(ThreadsMixin, type='threads')
 globals().update(testcases_threads)
 
+class TestClosedFile(unittest.TestCase):
+def test_open(self):
+# Create a file descriptor and directly close it
+tmpfile = open(EXISTING_FILE)
+fd = tmpfile.fileno()
+tmpfile.close()
+self.assertRaises(IOError, _multiprocessing.Connection, fd)
+
+def test_operations(self):
+# Create a dummy file descriptor
+fd, unused_fd = os.pipe()
+os.close(unused_fd)
+try:
+conn = _multiprocessing.Connection(fd)
+conn.close()
+fd = None
+self.assertRaises(IOError, conn.send, "test")
+self.assertRaises(IOError, conn.recv)
+self.assertRaises(IOError, conn.poll)
+finally:
+if fd is not None:
+os.close(fd)
+
 #
 #
 #
@@ -1765,7 +1791,8 @@
 testcases = (
 sorted(testcases_processes.values(), key=lambda tc:tc.__name__) +
 sorted(testcases_threads.values(), key=lambda tc:tc.__name__) +
-sorted(testcases_manager.values(), key=lambda tc:tc.__name__)
+sorted(testcases_manager.values(), key=lambda tc:tc.__name__) +
+[TestClosedFile]
 )
 
 loadTestsFromTestCase = unittest.defaultTestLoader.loadTestsFromTestCase
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-20 Thread Victor Stinner
Le Saturday 19 July 2008 21:52:09 A.M. Kuchling, vous avez écrit :
> Excellent work!  Another fruitful area for fuzzing might be the
> miniature virtual machine used by the re module.  It's possible to
> import _sre and call the compile() function directly (see the end of
> Lib/sre_compile.py for how it's invoked); I wonder how the regex VM
> copes with random strings of bytecode.

Hum... how can I say it? It's trivial to crash _sre :-) So I blacklisted 
_sre.compile() in my fuzzer.

For information, it's also very easy to crash CPython with fuzzed .pyc file.

It's hard to check bytecode without execute it. It's maybe better to add 
checks directly in the VM.

-- 
Victor Stinner aka haypo
http://www.haypocalc.com/blog/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Search broken on the python dev docs?

2008-07-20 Thread Georg Brandl

Gregory P. Smith schrieb:

http://docs.python.org/dev/

the search box worked for earlier releases but has been broken and 
returns nothing useful of late.


If I enter simple terms like 'time' or 'os' or 'os.walk' what is 
returned is pathetic.


how does this work?  is an index corrupt or not being regenerated?


Something is wrong; I'll check this and try to fix it.

Georg

--
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-3000] Removing bsddb module from py3k (was Re: No beta2 tonight)

2008-07-20 Thread Andrew McNamara
>But sqlite is transactional, can offer cursors, getrange, etc., etc.
>
>I'm still curious as to what deep features people are using in bsddb.

It's not using "deep features", unless you define their on-disk layout
as deep, but it does get used for things such as interactions with other
systems - for example, using it to maintain Radius user databases for a
(proprietary/commercial) Radius auth daemon. But dropping it from the
core won't stop this.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-20 Thread Steve Holden

Victor Stinner wrote:

Le Saturday 19 July 2008 21:52:09 A.M. Kuchling, vous avez écrit :

Excellent work!  Another fruitful area for fuzzing might be the
miniature virtual machine used by the re module.  It's possible to
import _sre and call the compile() function directly (see the end of
Lib/sre_compile.py for how it's invoked); I wonder how the regex VM
copes with random strings of bytecode.


Hum... how can I say it? It's trivial to crash _sre :-) So I blacklisted 
_sre.compile() in my fuzzer.


For information, it's also very easy to crash CPython with fuzzed .pyc file.

It's hard to check bytecode without execute it. It's maybe better to add 
checks directly in the VM.




I think you'll find most developers (and many users too, come to that) 
reluctant to add any checking that would slow down eval.c, the heart of 
the virtual machine.


So unless you can find a way to add the checks without slowing it down, 
an external checker might be better.


regards
 Steve
--
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com