[Python-Dev] my 2.5 checkins

2007-04-13 Thread Kristján Valur Jónsson
Hello all. I made two checkins to the 25 maintainance branch before Martin kindly pointed out to me that it is frozen. These are quite simple fixes to real crashes I have experienced. The fix in frameobject.c will be necessary if you work with opcodes 128, which we routinely do at CCP J.

[Python-Dev] __lltrace__

2007-04-14 Thread Kristján Valur Jónsson
Hello again. So, using __lltrace__, I stumbled over a crashbug (to which I have already submitted a fix).i To trigger the crash, I modified lib/test/test_trace.py, lines 609 onwards: def test_16_no_jump_into_finally_block(self): globals()[__lltrace__] = 1

[Python-Dev] fdopen mode needs sanitizing

2007-04-14 Thread Kristján Valur Jónsson
In fileobject the mode string is sanitized using a function, sanitize_the_mode(). The same thing needs to happen for posixmodule.fdopen(). Otherwise, the universal_newlines regression test in test_subprocess.py will fail for python compiled with Visual Studio 2005. I have made a local patch

[Python-Dev] FW: static analysis of python source

2007-04-20 Thread Kristján Valur Jónsson
I just ran some static analysis of the python core 2.5 with Visual Studio team system. There was the stray error discovered. I will update the most obvious ones. Some questions, though: This code in binascii.c, line 1168 (and again 1238) is wrong: while (in datalen) { if

[Python-Dev] static analysis of python source

2007-04-20 Thread Kristján Valur Jónsson
I just ran some static analysis of the python core 2.5 with Visual Studio team system. There was the stray error discovered. I will update the most obvious ones. Some questions, though: This code in binascii.c, line 1168 (and again 1238) is wrong: while (in datalen) { if

[Python-Dev] .dll import

2007-04-20 Thread Kristján Valur Jónsson
I was surprised when 2.5 stopped importing our custom modules. So, I found this in dyload_win.c: /* Temporarily disable .dll, to avoid conflicts between sqlite3.dll and the sqlite3 package. If this needs to be reverted for 2.5, some other solution for the naming conflict must be

Re: [Python-Dev] static analysis of python source

2007-04-21 Thread Kristján Valur Jónsson
I see. There appear to be two fixes, one for the dots, and another for the quotetabs. Shouldn't this be backported? Kristján -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Georg Brandl Sent: Saturday, April 21, 2007 07:08 To: python-dev@python.org

Re: [Python-Dev] static analysis of python source

2007-04-21 Thread Kristján Valur Jónsson
@python.org Subject: Re: [Python-Dev] static analysis of python source Kristján Valur Jónsson schrieb: I see. There appear to be two fixes, one for the dots, and another for the quotetabs. Shouldn't this be backported? Apparently I wasn't sure at the time. You now checked in one half of the fix

Re: [Python-Dev] Automatic Scope Macros

2007-04-24 Thread Kristján Valur Jónsson
What you really want is to use C++. However, that is a brash and immature language that is still awaiting wider acceptance and is therefore not supported. K -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Georg Brandl Sent: Tuesday, April 24, 2007 21:00

Re: [Python-Dev] Python 2.5.1

2007-05-01 Thread Kristján Valur Jónsson
Hm, I fail to see the importance of a special regression test for that peculiar file then with its special magical OS properties. Why not focus our attention on real, user generated files?. -Original Message- Wow, I'm very sorry, I didn't realize how much special pagefile.sys and

Re: [Python-Dev] head crashing

2007-05-01 Thread Kristján Valur Jónsson
but I got to a different conclusion. If it really goes through the pymalloc pool (obmalloc), then it must hold the GIL while doing so. obmalloc itself is not thread-safe, and relies on the GIL for thread-safety. In release mode, PyMEM_FREE goes directly to free, which is thread- safe. Yes.

Re: [Python-Dev] head crashing

2007-05-02 Thread Kristján Valur Jónsson
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 01, 2007 20:46 But then you would substantially change the memory access behavior of the program in a debug build, that is, more than it is already changed by the fact that you have changed

[Python-Dev] 64 bit warnings

2007-05-02 Thread Kristján Valur Jónsson
There is a considerable amount of warnings present for 64 bit builds on windows. You can see them using VisualStudio 2005 even if you don't have the x64 compilers installed, by turning on Detect 64 bit portability issues in the general tab for pythoncore. Now, some of those just need

[Python-Dev] PyInt_AsSsize_t on x64

2007-05-03 Thread Kristján Valur Jónsson
Hello there. I'm working on getting the 64 bit build of the trunk pass the testsuite. Here is one snag, that you could help me fix. In test_getargs2(), there is at line 190: self.failUnlessEqual(99, getargs_n(Long())) Now, the Long class has a __int__ method which returns 99L. However, we run

[Python-Dev] x64 and the testsuite

2007-05-03 Thread Kristján Valur Jónsson
Hello again. A lot of overflow tests fail in the testsuite, by expecting overflow using sys.maxint. for example this line, 196, in test_index.py: self.assertEqual(x[self.neg:self.pos], (-1, maxint)) At the moment, I am disabling these tests with if 64 bit not in sys.version: So, two questions:

Re: [Python-Dev] x64 and the testsuite

2007-05-03 Thread Kristján Valur Jónsson
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Heller Sent: Thursday, May 03, 2007 17:04 To: python-dev@python.org Subject: Re: [Python-Dev] x64 and the testsuite Kristján Valur Jónsson schrieb: Hello again. A lot of overflow tests

[Python-Dev] 2.6, x64 and PGO

2007-05-03 Thread Kristján Valur Jónsson
Well, I have checked in the fixes to the trunk to make an x64 build run the testsuite. It works pretty well. I did a quick test and found the x64Release to run 51000 pystones vs. 44000 for the win32Release version, a difference of some 10%. And the x64PGO version ran some 61000 pystones. Some

Re: [Python-Dev] PyInt_AsSsize_t on x64

2007-05-05 Thread Kristján Valur Jónsson
-Original Message- From: Armin Rigo [mailto:[EMAIL PROTECTED] Given that the __long__ vs __int__ difference doesn't really make sense any more nowadays, I'd think it would be saner to change the nb_long slot of old-style instances instead of PyInt_AsSsize_t(). The logic would be

[Python-Dev] svn logs

2007-05-08 Thread Kristján Valur Jónsson
Hello there. Does anyone know why getting the SVN logs for a project is so excruciatingly slow? Is this an inherent SVN problem or are the python.org servers simply overloaded? It takes something like 10 minutes for me to get the log messages window up for the root of a branch. Cheers, Kristján

Re: [Python-Dev] Summary of Tracker Issues

2007-05-16 Thread Kristján Valur Jónsson
-Original Message- ISTM you need one only question requiring human attention at a time, because once a spammer assigns a human (or inhuman of equivalent intelligence) to cracking you, you're toast. I can't believe this is still profitable. It's either lucrative or fulfilling,

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-21 Thread Kristján Valur Jónsson
-Original Message- This was in C++, but the problem was really WCHAR, as used by much of the win32 API. I'd rather make it a platform-specific definition (for platform=Windows API). Correct me if I'm wrong, but isn't wchar_t also available in VS 2003 (and even in VC6?). And

Re: [Python-Dev] wchar_t (was Adventures with x64, VS7 and VS8) on Windows

2007-05-21 Thread Kristján Valur Jónsson
-Original Message- below appears to solve the problem, and given Martin's previous +1, I decided to stop there. I failed in a quick attempt at replacing the literal 2 with something involving sizeof. Does this look reasonable? +1. I should add that we have this local mod in our

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-22 Thread Kristján Valur Jónsson
-Original Message- From: Martin v. Löwis [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 05:33 To: Steve Holden Cc: Kristján Valur Jónsson; Mark Hammond; [EMAIL PROTECTED]; python-dev@python.org Subject: Re: Adventures with x64, VS7 and VS8 on Windows Addressing only

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-22 Thread Kristján Valur Jónsson
-Original Message- Nobody proposed to ditch cross-compilation. I very much like cross-compilation, I do all Itanium and AMD64 in cross-compilation. I just want the *file structure* of the output to be the very same for all architectures, meaning that they can't coexist in a single

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-22 Thread Kristján Valur Jónsson
-Original Message- It seems the best thing might be to modify the PCBuild8 build process so the output binaries are in the ../PCBuild' directory - this way distutils and others continue to work fine. Does that sound reasonable? I think Kristjan will have to say a word

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-23 Thread Kristján Valur Jónsson
-Original Message- From: Martin v. Löwis [mailto:[EMAIL PROTECTED] That couldn't work for me. I try avoid building on a network drive, and with local drives, I just can't have a Windows build and a Linux build on the same checkout - they live on separate file systems, after all

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-24 Thread Kristján Valur Jónsson
-Original Message- though, not cygwin (a la bsmedberg's new MozillaBuild stuff). I just wish there were an autoconf alternative that wasn't as painful as autoconf. I have a few attempts for my purposes that are written in Python (an obvious bootstrapping problem for building Python

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-26 Thread Kristján Valur Jónsson
-Original Message- From: Martin v. Löwis [mailto:[EMAIL PROTECTED] It doesn't need to, and reluctance is not wrt. to the proposed new layout, but wrt. changing the current one. Tons of infrastructure depends on the files having exactly the names that they have now, and being

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-26 Thread Kristján Valur Jónsson
-Original Message- From: Alexey Borzenkov [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 20:36 To: Kristján Valur Jónsson Cc: Martin v. Löwis; Mark Hammond; [EMAIL PROTECTED]; python- [EMAIL PROTECTED] Subject: Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-26 Thread Kristján Valur Jónsson
-Original Message- I personally think that if hostile users can replace DLLs on your system, you have bigger problems than SxS installation of pythhonxy.dll, but perhaps that's just me. An end user application on an end-user's machine is always voulnerable to reverse engineering.

Re: [Python-Dev] Minor ConfigParser Change

2007-05-26 Thread Kristján Valur Jónsson
-Original Message- From: Joseph Armbruster [mailto:[EMAIL PROTECTED] I noticed that one of the parts of ConfigParser was not using for line in fp style of readline-ing I'm afraid my authority is limited to .c stuff having to do with pcbuild8, but I'm sure someone else here would

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-29 Thread Kristján Valur Jónsson
-Original Message- From: Martin v. Löwis [mailto:[EMAIL PROTECTED] Just imagine the a school teacher who in good faith wants to introduce his pupils to the wonderful programming language of Python, but when he installs it, all kinds of scary looking warnings drive him off.

Re: [Python-Dev] Possible error in Python 2.4 garbage collector

2007-11-26 Thread Kristján Valur Jónsson
This is almost certainly not a bug in python. A cursory look indicates that a list being traversed in list_traverse has a NULL member. I'd suggest examining the other members of the list to figure out what this list is. Use the debugger for this, that is what it is for. It is probably a list

[Python-Dev] XXX - in funcobject.c

2008-02-05 Thread Kristján Valur Jónsson
Hello there. in function_call() in funcobject.c, we have this comment: /* XXX This is broken if the caller deletes dict items! */ Now, I wonder what specifically is meant here? are we really talking about the 'callee' here? In PyEval_EvalCodeEx() it looks as though all keywords are always

Re: [Python-Dev] XXX - in funcobject.c

2008-02-06 Thread Kristján Valur Jónsson
-Original Message- From: Amaury Forgeot d'Arc [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 00:02 To: Guido van Rossum Cc: Kristján Valur Jónsson; python-dev@python.org Subject: Re: [Python-Dev] XXX - in funcobject.c Yet Another Kind Of Tuple... However this seems

Re: [Python-Dev] [Python-checkins] r60919 - peps/trunk/pep-0008.txt

2008-02-22 Thread Kristján Valur Jónsson
And this is then compounded if you then proceed to diff those diff outputs. Maybe we should just use vertical spacing? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amaury Forgeot d'Arc Sent: Friday, February 22, 2008 08:01 To: Skip Montanaro Cc:

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-06 Thread Kristján Valur Jónsson
Only crt asserts, and those assertion features accessible through the crtdbg.h file, such as _ASSERT and _ASSERTE. Kristj'an -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of M.-A.

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-06 Thread Kristján Valur Jónsson
for the whole process isn't a particularly nice thing to do. Kristján -Original Message- From: M.-A. Lemburg [mailto:m...@egenix.com] Sent: 6. janúar 2009 14:43 To: Kristján Valur Jónsson Cc: mhamm...@skippinet.com.au; python-dev@python.org Subject: Re: [Python-Dev] #ifdef __cplusplus? On 2009-01

Re: [Python-Dev] Fixing incorrect indentations in C files (Decoder functions accept str in py3k)

2009-01-08 Thread Kristján Valur Jónsson
Oh dear. C code indented by spaces? I'll give up programming then. Just set your editor tab size to 4 and all is well. K -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of M.-A. Lemburg

[Python-Dev] testsuite with tmp/@test

2009-01-13 Thread Kristján Valur Jónsson
By accident i had a dir called @test in my PCBuild directory when I was running the testsuite. This caused the test_support to define TESTFN as tmp/@test. This again caused a number of tests to fail. One issue I have already covered in http://bugs.python.org/issue4927 Another issue is

[Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
Greetings. I spent the morning trying to find out why the disabled tests in test_xmlrpc.py ran so slowly on my vista box. After much digging, I found that it boiled down to socket.create_connection() trying to connect to localhost, port. You see, it does a getaddrinfo() and then tries to

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: 14. janúar 2009 11:34 To: python-dev@python.org Subject: Re: [Python-Dev] socket.create_connection slow Kristján Valur Jónsson kristjan at ccpgames.com writes: On Vista, it will return an AF_INET6 entry before the AF_INET one and try

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
2009 12:23:46 Kristján Valur Jónsson, vous avez écrit : socket.create_connection() trying to connect to (localhost, port) (...) return an AF_INET6 entry before the AF_INET one and try connection to that. This connect() attemt fails after approximately one second, after which we proceed

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
Hardly. Successful connects complete in a jiffy, only actively refused ones take a second to do so. I suspect some michief in the vista tcp stack. -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org]

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
() waited long enough to obtain a connection since the service really was there. Yet another undefined thing affecting us, Martin. Kristján -Original Message- From: Martin v. Löwis [mailto:mar...@v.loewis.de] Sent: 14. janúar 2009 20:31 To: Kristján Valur Jónsson Cc: Victor Stinner; python

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Kristján Valur Jónsson
Message- From: Martin v. Löwis [mailto:mar...@v.loewis.de] Sent: 14. janúar 2009 20:31 To: Kristján Valur Jónsson Cc: Victor Stinner; python-dev@python.org Subject: Re: [Python-Dev] socket.create_connection slow I have no idea why the connect refusal takes so long. Maybe it's a vista thing? I've

Re: [Python-Dev] socket.create_connection slow

2009-01-15 Thread Kristján Valur Jónsson
do we want to bug MS about this? Clearly it is a performance problem when implementing dual stack clients. K -Original Message- From: Martin v. Löwis [mailto:mar...@v.loewis.de] Sent: 15. janúar 2009 00:07 To: Kristján Valur Jónsson Cc: python-dev@python.org Subject: Re: [Python-Dev

Re: [Python-Dev] [Python-checkins] r68547 - in python/trunk/Lib/test: test_datetime.py test_os.py

2009-01-15 Thread Kristján Valur Jónsson
Ok, in r 68610 I fixed some of this. The strftime test is now just an excercise, since clearly some platforms accept the %e without hesitation. Also, there were errors in two test_os cases. However, these: == ERROR:

Re: [Python-Dev] [Python-checkins] r68547 - in python/trunk/Lib/test: test_datetime.py test_os.py

2009-01-15 Thread Kristján Valur Jónsson
- From: Mark Dickinson [mailto:dicki...@gmail.com] Sent: 15. janúar 2009 15:44 To: Kristján Valur Jónsson Cc: Jean-Paul Calderone; python-dev@python.org Subject: Re: [Python-Dev] [Python-checkins] r68547 - in python/trunk/Lib/test: test_datetime.py test_os.py On Thu, Jan 15, 2009 at 9:13 AM

Re: [Python-Dev] [Python-checkins] r68547 - in python/trunk/Lib/test: test_datetime.py test_os.py

2009-01-15 Thread Kristján Valur Jónsson
Right. I've fixed the remainder, things should quiet down now. K -Original Message- From: Mark Dickinson [mailto:dicki...@gmail.com] Sent: 15. janúar 2009 20:40 To: Kristján Valur Jónsson Cc: Jean-Paul Calderone; python-dev@python.org Subject: Re: [Python-Dev] [Python-checkins] r68547

[Python-Dev] issue 4927: Inconsistent unicode repr for fileobject

2009-01-16 Thread Kristján Valur Jónsson
I would appreciate if some of you could chip in your opinion of this issue. http://bugs.python.org/issue4927 Cheers, Kristján ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP 3142: Add a while clause to generator expressions

2009-01-19 Thread Kristján Valur Jónsson
Are you all certain that this mapping from a generator expression to a foor loop isn't just a happy coincidence? After all, the generator statement is just a generalization of the list comprehension and that doesn't map quite so directly. I have always taken both expressions at face value, and

[Python-Dev] Issue 4448

2009-01-21 Thread Kristján Valur Jónsson
Hello there. I recently reactivated http://bugs.python.org/issue4448 because of the need to port http://bugs.python.org/issue4879 to 3.1 This isn't a straightforward port because of the changes in the IO library. I'd appreciate if someone could shed some light on the comment in line 268 in

Re: [Python-Dev] Py_ssize_t support for ctypes arrays and pointers

2009-03-20 Thread Kristján Valur Jónsson
Will testing an array of chars do? You can easily allocate 4-5Gb on a regular 64bit pc, even with only 1G of ram, given that your swap space is sufficient. If you want to excercise your array, then you might get some paging, but it's not completely impossible. K -Original Message- From:

Re: [Python-Dev] Test failures under Windows?

2009-03-24 Thread Kristján Valur Jónsson
These issues should be resolved in the py3k branch, but it will need porting to 2.6. Dialogue boxes are annoying, but do they pop up if you run your buildslave as a service without access to the console? K -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org

Re: [Python-Dev] Test failures under Windows?

2009-03-24 Thread Kristján Valur Jónsson
: Kristján Valur Jónsson krist...@ccpgames.com writes: These issues should be resolved in the py3k branch, but it will need porting to 2.6.  Dialogue boxes are annoying, but do they pop up if you run your buildslave as a service without access to the console? Not sure what the MSVC++ runtime

Re: [Python-Dev] Test failures under Windows?

2009-03-25 Thread Kristján Valur Jónsson
Right. In fact, having embedded python25.dll into an app once, I'm inclined to think that there is a lot of stuff that should be moved from that dll into python.exe, like argument parsing, path magic, and so on. Py_Initialize() really is designed in terms of python.exe Anyway, What I was

Re: [Python-Dev] Test failures under Windows?

2009-03-31 Thread Kristján Valur Jónsson
for test_multiprocessing. K -Original Message- From: Curt Hagenlocher [mailto:c...@hagenlocher.org] Sent: 25. mars 2009 12:54 To: Kristján Valur Jónsson Cc: mhamm...@skippinet.com.au; David Bolen; python-dev@python.org Subject: Re: [Python-Dev] Test failures under Windows? 2009/3/25 Kristján Valur Jónsson

Re: [Python-Dev] Test failures under Windows?

2009-03-31 Thread Kristján Valur Jónsson
in a submission to the py3k branch. K -Original Message- From: Jesse Noller [mailto:jnol...@gmail.com] Sent: 31. mars 2009 21:31 To: Kristján Valur Jónsson Cc: Curt Hagenlocher; mhamm...@skippinet.com.au; David Bolen; python-dev@python.org Subject: Re: [Python-Dev] Test failures under Windows

Re: [Python-Dev] Test failures under Windows?

2009-03-31 Thread Kristján Valur Jónsson
Jónsson Cc: Curt Hagenlocher; mhamm...@skippinet.com.au; David Bolen; python-dev@python.org Subject: Re: [Python-Dev] Test failures under Windows? Does it need to be backported? I wonder when that was introduced. Also, what CL was it so I can review it? 2009/3/31 Kristján Valur Jónsson krist

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-01 Thread Kristján Valur Jónsson
What are the semantics of the type argument for PyCObject_FromVoidPtr()? -Does it do a strdup, or is the type required to be valid while the object exists (e.g. a static string)? -How is the type match determined, strcmp, or pointer comparison? -Original Message- From:

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-02 Thread Kristján Valur Jónsson
Thanks Larry. I didn't notice the patch, or indeed the defect, hence my question. A clarification in the documentation that a string comparison is indeed used might be useful. As a user of CObject I appreciate this effort. K -Original Message- From: Larry Hastings

[Python-Dev] py3k regression tests on Windows

2009-04-02 Thread Kristján Valur Jónsson
Hello there. Yesterday I created a number of defects for regression test failures on Windows: http://bugs.python.org/issue5646 : test_importlib fails for py3k on Windows http://bugs.python.org/issue5645 : test_memoryio fails for py3k on windows http://bugs.python.org/issue5643 : test__locale fails

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-03 Thread Kristján Valur Jónsson
Here's one from EVE, where the DB module creates raw data, for our Crowsets, and then hands it over to another module for consumption (actual creation of the CRow and CrowDescriptor objects: BluePy raw(PyCObject_FromVoidPtr(mColumnList, 0)); if (!raw) return 0;

[Python-Dev] feature request 5804

2009-05-08 Thread Kristján Valur Jónsson
Hello there. I have sumitted the following patch: Add an 'offset' argument to zlib.decompress http://bugs.python.org/issue5804 I'd be interested on getting some more feedback on it. Kristján ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Making the GIL faster lighter on Windows

2009-05-27 Thread Kristján Valur Jónsson
I've often thought of this. The problem is that the GIL uses the regular python lock which has to be non-recursive, since it is used for synchronization operations other than mutual exclusion, e.g. one thread going to sleep, and another waking it up. Now, we could easily create another class of

Re: [Python-Dev] Making the GIL faster lighter on Windows

2009-05-28 Thread Kristján Valur Jónsson
You are right, a small experiment confirmed that it is set to 0 (see SetCriticalSectionSpinCount()) I had assumed that a small non-zero value might be chosen on multiprocessor machines. Do you think that the problem lies with the use of the event object as such? Have you tried using a

[Python-Dev] xmlrpc improvements

2009-06-11 Thread Kristján Valur Jónsson
Hello there. I've been trying to, in the last weeks, to pass on to the trunk the improvements I've made to XMLRPC. I've created several issues in order to do these changes incrementally but have got no comments. Perhaps it is best to show the whole thing in context, then. I´ve gathered all the

[Python-Dev] issue 6654

2009-08-06 Thread Kristján Valur Jónsson
I added http://bugs.python.org/issue6654 I also put a not to python-ideas but have had no response yet. Any comments? Here's the summary: I've created http://codereview.appspot.com/100046 on Rietveld: by passing the path component of the xmlrpc request to the dispatch method, itbecomes

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Kristján Valur Jónsson
Unless I am very much mistaken, this is the approach Ruby takes. Everything is an expression. For example, the value of a block is the value of The last expression in the block. I've never understood the need to have a distinction betwen statements and expressions, not when expressions can have

Re: [Python-Dev] issue 6654

2009-08-10 Thread Kristján Valur Jónsson
+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Kristján Valur Jónsson Sent: 6. ágúst 2009 20:56 To: python-dev@python.org Subject: [Python-Dev] issue 6654 I added http://bugs.python.org/issue6654 I also put a not to python-ideas but have

Re: [Python-Dev] default of returning None hurts performance?

2009-09-02 Thread Kristján Valur Jónsson
Not advocating a change, merely pointing out that it's how Ruby works. K -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Nick Coghlan Sent: 2. september 2009 11:12 To: Greg Ewing

[Python-Dev] PyMem_Malloc() vs PyObject_Malloc()

2009-09-04 Thread Kristján Valur Jónsson
I noticed something (in 2.5) yesterday, which may be a feature, but is more likely a bug. In tokenizer.c, tok-encoding is allocated using PyMem_MALLOC(). However, this then gets handed to a node-r_str in parsetok.c, and then released in node.c using PyObject_Free(). Now, by coincidence,

[Python-Dev] making python's c iterators picklable (http://bugs.python.org/issue14288)

2012-03-13 Thread Kristján Valur Jónsson
http://bugs.python.org/issue14288 Raymond suggested that this patch should be discussed here, so here goes: How this came about: There are frameworks, such as the Nagare web framework, (http://www.nagare.org/) that rely on suspending execution at some point and resuming it again. Nagare does

[Python-Dev] sharing sockets among processes on windows

2012-03-13 Thread Kristján Valur Jónsson
Hi, I´m interested in contributing a patch to duplicate sockets between processes on windows. Tha api to do this is WSADuplicateSocket/WSASocket(), as already used by dup() in the _socketmodule.c Here´s what I have: 1) Sockets have a method, duplicate(target_pid), that return a bytes

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-13 Thread Kristján Valur Jónsson
The reason I originally suggested wallclock was because that term is often used to distinguish time measurements (delta) that show real world time from those showing CPU or Kernel time. number.crunch() took 2 seconds wallclock time but only 1 second CPU!. The original problem was that

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-13 Thread Kristján Valur Jónsson
a fallback mechanism, and it would even be best to write such a mechanism inside the function itself, and just return getsystemtimeasfiletime() instead. K -Original Message- From: Christian Tismer [mailto:tis...@stackless.com] Sent: 13. mars 2012 18:07 To: Kristján Valur Jónsson Cc

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-14 Thread Kristján Valur Jónsson
To quote: On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of processor time, depends on that of the C function of the same name, The problem is that it is defined to return processor

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-14 Thread Kristján Valur Jónsson
Yes, the intended use is relative timings and timeouts. I think we are complicating things far too much. 1) Do we really need a fallback on windows? Will QPC ever fail? 2) is it a problem for the intended use if we cannot absolutely guarantee that time won't ever tick backwards? IMHO, we

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-14 Thread Kristján Valur Jónsson
- By default, it should fall back to time.time if a better source is not available, but there should be a flag that can disable this fallback for users who really *need* a monotonic/steady time source. As pointed out on a different thread, you dont need this flag since the code can easily

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
[mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: 14. mars 2012 02:02 To: python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues On Wed, 14 Mar 2012 04:26:16 + Kristján Valur Jónsson krist...@ccpgames.com wrote: Hi there. I want

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: 14. mars 2012 10:23 To: python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues On Wed, 14 Mar 2012 16:59:47 + Kristján Valur Jónsson krist...@ccpgames.com wrote: It just seems odd to me

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
Message- From: gvanros...@gmail.com [mailto:gvanros...@gmail.com] On Behalf Of Guido van Rossum Sent: 14. mars 2012 11:44 To: Kristján Valur Jónsson Cc: Antoine Pitrou; python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues 2012/3/14 Kristján Valur Jónsson krist...@ccpgames.com

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-14 Thread Kristján Valur Jónsson
for time.steady(strict=False). On Wed, Mar 14, 2012 at 7:09 PM, Kristján Valur Jónsson krist...@ccpgames.com wrote: - By default, it should fall back to time.time if a better source is  not available, but there should be a flag that can disable this  fallback for users who really *need

Re: [Python-Dev] sharing sockets among processes on windows

2012-03-14 Thread Kristján Valur Jónsson
. I need to read that code and understand it and see if it can be persuaded to magically work on windows too. K From: Glyph Lefkowitz [mailto:gl...@twistedmatrix.com] Sent: 14. mars 2012 17:22 To: Kristján Valur Jónsson Cc: Python-Dev (python-dev@python.org) Subject: Re: [Python-Dev] sharing

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
Fyi: http://bugs.python.org/issue14307 -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Kristján Valur Jónsson Sent: 14. mars 2012 12:36 To: Guido van Rossum Cc: Antoine Pitrou; python

Re: [Python-Dev] [Python-checkins] cpython: PEP 417: Adding unittest.mock

2012-03-14 Thread Kristján Valur Jónsson
Fyi: http://bugs.python.org/issue14310 -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Michael Foord Sent: 14. mars 2012 14:42 To: Terry Reedy Cc: python-dev@python.org Subject: Re:

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-19 Thread Kristján Valur Jónsson
Do you really want to add an obscure Boolean flag to the function just so that python can warn you that perhaps your platform is so old and so weird that Python can't guarantee that the performance measurements are to a certain _undefined_ quality? Please note, that the function makes no

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-03-19 Thread Kristján Valur Jónsson
Hi Carl. I'm very interested in this work. At CCP we work heavily with virtual environments. Except that we don't use virtualenv because it is just a pain in the neck. We like to be able to run virtual python environments of various types as they arrive checked out of source control

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-03-21 Thread Kristján Valur Jónsson
-Original Message- From: Carl Meyer [mailto:c...@oddbird.net] Sent: 19. mars 2012 19:19 To: Kristján Valur Jónsson Cc: Python-Dev (python-dev@python.org) Subject: Re: [Python-Dev] PEP 405 (built-in virtualenv) status Hello Kristján, I think there's one important (albeit odd

[Python-Dev] Issue13210 : Support Visual Studio 2010

2012-03-31 Thread Kristján Valur Jónsson
Hi, Does anyone object if I submit my patches sxs.patch and errnomodule.patch? These allow python to work correctly when built with vs2010. There is also the PCBuild10.patch, but that can wait. I'm sure a number of people are regularly building python using vs2010 using their own modified

[Python-Dev] Issue #14310: Socket duplication for windows

2012-03-31 Thread Kristján Valur Jónsson
Hi there. Antoine Pitroue requested that this topic (http://bugs.python.org/issue14310) be discussed by python-dev before moving further. I'm adding a windows-only api to share sockets between processes to _socket in the canonical way. Multiprocessing already has code for this (using

Re: [Python-Dev] [Python-checkins] cpython: Issue #14435: Add Misc/NEWS and Misc/ACKS

2012-04-01 Thread Kristján Valur Jónsson
, 2012 at 11:10 PM, kristjan.jonsson python-check...@python.org wrote: diff --git a/Misc/ACKS b/Misc/ACKS --- a/Misc/ACKS +++ b/Misc/ACKS @@ -507,6 +507,7 @@ Richard Jones Irmen de Jong Lucas de Jonge +Kristján Valur Jónsson Jens B. Jorgensen John Jorgensen Sijin Joseph *blinks

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-02 Thread Kristján Valur Jónsson
-Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Cameron Simpson Sent: 30. mars 2012 21:43 There seem to be a few competing features for clocks that people want: - monotonic -

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-03 Thread Kristján Valur Jónsson
-Original Message- From: gvanros...@gmail.com [mailto:gvanros...@gmail.com] On Behalf Of Guido van Rossum Sent: 2. apríl 2012 17:43 To: Kristján Valur Jónsson Cc: Cameron Simpson; Python Dev Subject: Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic

Re: [Python-Dev] PEP 418: rename time.monotonic() to time.steady()?

2012-04-03 Thread Kristján Valur Jónsson
-Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Lennart Regebro Sent: 3. apríl 2012 14:14 To: Victor Stinner Cc: Python Dev Subject: Re: [Python-Dev] PEP 418: rename

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-03 Thread Kristján Valur Jónsson
-Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org Some years? I computed 584.5 years, so it should not occur in practice. Funny that you mention it. should not occur in practice is exactly my point. Here's actual code from production: BOOL WINAPI

[Python-Dev] FS: [issue9141] Allow objects to decide if they can be collected by GC

2012-04-05 Thread Kristján Valur Jónsson
Hi there. Antoine Pitrou suggested that I float this on python-dev again. The new patch should 1) be much simpler and less hacky 2) remove the special case code for PyGenObject from gcmodule.c K Frá: Kristján Valur Jónsson [rep...@bugs.python.org] Sent

[Python-Dev] Pep 393 and debugging

2012-04-06 Thread Kristján Valur Jónsson
I just had my first fun with Pep 393 strings and debuggers. Trying to debug a deadlocked python program, I'm trying to figure out the callstack of the thread in the debugger. I ended up with something like: (char*)((PyASCIIObject*)(tstate-frame-f_code-co_filename))[1] while previously,

Re: [Python-Dev] this is why we shouldn't call it a monotonic clock (was: PEP 418 is too divisive and confusing and should be postponed)

2012-04-06 Thread Kristján Valur Jónsson
This is the most amusing of discussions. Teh key sentence here is the clock may not be adjusted. Slewing or accelerating a clock is nerely adding to the already present error of the pace of the clock. Sometimes a clock runs fast, sometimes it runs slow. This is without any purposeful slewing

  1   2   3   4   >