[Python-Dev] Unicode command line parameter missing

2007-02-23 Thread Joseph Armbruster

Python Versions: 2.5 and trunk

Browsing through the code this evening and noticed a discrepancy between
the command line parameters listed with --help and those truly available in
the code.  Namely with the -U Unicode flag..

The -U option was added back in 2000, rev 15296 and mention of it was
removed
in rev 25288.  Should the -U option still be handled from the command line?


Python 2.5 Session without flag:

python

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

a = "monty"
a

'monty'





Python 2.5 Session with flag:

python -U

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

a = "monty"
a

u'monty'





Joseph Armbruster
___
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] vs2005 Project Patch and Configuration Inquiry

2007-05-26 Thread Joseph Armbruster

All,

As per the removal of the rgbimgmodule due to deprecation in the trunk:

http://svn.python.org/projects/python/trunk

---Begin SVN log---
r55458 | brett.cannon | 2007-05-20 03:09:50 -0400 (Sun, 20 May 2007) | 2 
lines


Remove the rgbimg module.  It has been deprecated since Python 2.5.
---End SVN log---


The PCbuild8 solution needs to be corrected.  A patch is attached.

In addition, I noticed that under C++/Advanced Properties, all the 
configurations appear to be set to "Compile as C++ Code" with the /TP 
argument.  Should these be set to "Compile as C Code" with the /TC argument?



Joseph Armbruster
Index: PCbuild8/pythoncore/pythoncore.vcproj
===
--- PCbuild8/pythoncore/pythoncore.vcproj   (revision 55600)
+++ PCbuild8/pythoncore/pythoncore.vcproj   (working copy)
@@ -1518,10 +1518,6 @@
>


-   
-   

___
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] vs2005 Project Patch and Configuration Inquiry

2007-05-26 Thread Joseph Armbruster

Kristján,

I started to investigate the WINVER warnings that are scattered 
throughout the VS 2005 build.  This patch eliminates them but I may have 
overlooked the intentions of the #include ordering.  If this invalid, 
please let me know.


Patch attached.

Joseph Armbruster


Kristján Valur Jónsson wrote:



-Original Message-
From: [EMAIL PROTECTED]
The PCbuild8 solution needs to be corrected.  A patch is attached.


Thanks, I'll apply it.


In addition, I noticed that under C++/Advanced Properties, all the
configurations appear to be set to "Compile as C++ Code" with the /TP
argument.  Should these be set to "Compile as C Code" with the /TC
argument?


Interesting. I hadn't noticed.  I investigated, and this is the default
value for all projects.  However, if you click a single .c file and
check its properties, you will find that it gets the /TC flag in its
advanced settings.  So each file will be correctly compiled. (you can
confirm this by checking the command line).  Removing the /TP flag from
the project settings also results in the disappearance of the per-file
/TC setting.
Very curious.  In end effect, the C files are compiled as such and there
is no need for panic.

Cheers,
Kristján



Index: PC/_winreg.c
===
--- PC/_winreg.c(revision 55600)
+++ PC/_winreg.c(working copy)
@@ -11,9 +11,8 @@
 basic Unicode support added.
 
 */
-
-#include "windows.h"
 #include "Python.h"
+#include "windows.h"
 #include "structmember.h"
 #include "malloc.h" /* for alloca */
 
Index: PC/dl_nt.c
===
--- PC/dl_nt.c  (revision 55600)
+++ PC/dl_nt.c  (working copy)
@@ -7,12 +7,12 @@
 forgotten) from the programmer.
 
 */
-#include "windows.h"
 
+
 /* NT and Python share these */
 #include "pyconfig.h"
 #include "Python.h"
-
+#include "windows.h"
 char dllVersionBuffer[16] = ""; // a private buffer
 
 // Python Globals
Index: Python/dynload_win.c
===
--- Python/dynload_win.c(revision 55600)
+++ Python/dynload_win.c(working copy)
@@ -1,13 +1,12 @@
 
 /* Support for dynamic loading of extension modules */
-
+#include "Python.h"
 #include 
 #ifdef HAVE_DIRECT_H
 #include 
 #endif
 #include 
 
-#include "Python.h"
 #include "importdl.h"
 
 const struct filedescr _PyImport_DynLoadFiletab[] = {
___
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] Minor ConfigParser Change

2007-05-26 Thread Joseph Armbruster

Kristján,

While we are on the topic of minor changes... :-)

I noticed that one of the parts of ConfigParser was not using "for line 
in fp" style of readline-ing :-)  So, this will reduce the SLOC by 3 
lines and improve readability.  However, I did a quick grep and this 
type of practice appears in several other places.


There is a possibility of good savings in this department.  If you think 
this is worthwhile, I can create one large patch for them all.


I sure hope I am not missing something fundamental with this one...

Joseph Armbruster
Index: Lib/ConfigParser.py
===
--- Lib/ConfigParser.py (revision 55600)
+++ Lib/ConfigParser.py (working copy)
@@ -441,10 +441,7 @@
 optname = None
 lineno = 0
 e = None  # None, or an exception
-while True:
-line = fp.readline()
-if not line:
-break
+for line in fp:
 lineno = lineno + 1
 # comment or blank line?
 if line.strip() == '' or line[0] in '#;':
___
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] Minor ConfigParser Change

2007-05-26 Thread Joseph Armbruster

Kristján,

Here is a part of the patch that I was referring to.  Something to that 
effect.


Joseph Armbruster
Index: Lib/ConfigParser.py
===
--- Lib/ConfigParser.py (revision 55600)
+++ Lib/ConfigParser.py (working copy)
@@ -441,10 +441,7 @@
 optname = None
 lineno = 0
 e = None  # None, or an exception
-while True:
-line = fp.readline()
-if not line:
-break
+for line in fp:
 lineno = lineno + 1
 # comment or blank line?
 if line.strip() == '' or line[0] in '#;':
Index: Lib/distutils/sysconfig.py
===
--- Lib/distutils/sysconfig.py  (revision 55600)
+++ Lib/distutils/sysconfig.py  (working copy)
@@ -216,10 +216,7 @@
 define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
 undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
 #
-while 1:
-line = fp.readline()
-if not line:
-break
+for line in fp:
 m = define_rx.match(line)
 if m:
 n, v = m.group(1, 2)
@@ -254,10 +251,7 @@
 done = {}
 notdone = {}
 
-while 1:
-line = fp.readline()
-if line is None:# eof
-break
+for line in fp:
 m = _variable_rx.match(line)
 if m:
 n, v = m.group(1, 2)
Index: Lib/formatter.py
===
--- Lib/formatter.py(revision 55600)
+++ Lib/formatter.py(working copy)
@@ -432,10 +432,7 @@
 fp = open(sys.argv[1])
 else:
 fp = sys.stdin
-while 1:
-line = fp.readline()
-if not line:
-break
+for line in fp:
 if line == '\n':
 f.end_paragraph(1)
 else:
Index: Lib/ftplib.py
===
--- Lib/ftplib.py   (revision 55600)
+++ Lib/ftplib.py   (working copy)
@@ -435,9 +435,7 @@
 '''Store a file in line mode.'''
 self.voidcmd('TYPE A')
 conn = self.transfercmd(cmd)
-while 1:
-buf = fp.readline()
-if not buf: break
+   for buff in fp:
 if buf[-2:] != CRLF:
 if buf[-1] in CRLF: buf = buf[:-1]
 buf = buf + CRLF
Index: Lib/keyword.py
===
--- Lib/keyword.py  (revision 55600)
+++ Lib/keyword.py  (working copy)
@@ -62,9 +62,7 @@
 fp = open(iptfile)
 strprog = re.compile('"([^"]+)"')
 lines = []
-while 1:
-line = fp.readline()
-if not line: break
+for line in fp:
 if '{1, "' in line:
 match = strprog.search(line)
 if match:
Index: Lib/mimetypes.py
===
--- Lib/mimetypes.py(revision 55600)
+++ Lib/mimetypes.py(working copy)
@@ -204,10 +204,7 @@
 list of standard types, else to the list of non-standard
 types.
 """
-while 1:
-line = fp.readline()
-if not line:
-break
+for line in fp:
 words = line.split()
 for i in range(len(words)):
 if words[i][0] == '#':
Index: Lib/urlparse.py
===
--- Lib/urlparse.py (revision 55600)
+++ Lib/urlparse.py (working copy)
@@ -353,9 +353,7 @@
 except ImportError:
 from StringIO import StringIO
 fp = StringIO(test_input)
-while 1:
-line = fp.readline()
-if not line: break
+   for line in fp:
 words = line.split()
 if not words:
 continue
Index: Tools/pynche/ColorDB.py
===
--- Tools/pynche/ColorDB.py (revision 55600)
+++ Tools/pynche/ColorDB.py (working copy)
@@ -50,10 +50,7 @@
 self.__byname = {}
 # all unique names (non-aliases).  built-on demand
 self.__allnames = None
-while 1:
-line = fp.readline()
-if not line:
-break
+   for line in fp:
 # get this compiled regular expression from derived class
 mo = self._re.match(line)
 if not mo:
___
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] Minor ConfigParser Change

2007-05-26 Thread Joseph Armbruster
Kristján,

Whoops!  My apologies.  In any case, I created the bugs in the sf issue 
tracker for proper CM practice.  Look under the patches section within 
sf.net.

You should go ahead and close out the 2005 build ones then, once applied :-)


Thank you again,

Joseph Armbruster


Kristján Valur Jónsson wrote:
> 
>> -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 like to comment.
> 
> Kristján
> 

___
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] Minor ConfigParser Change

2007-05-31 Thread Joseph Armbruster

Fred,

My only motivation was style.

As per your comment:

"In general, we try to avoid making style changes to the code since that can
increase the maintenance burden (patches can be harder to produce that can
be
cleanly applied to multiple versions)."

I will keep this in mind when supplying future patches.


Joseph Armbruster


On 5/31/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:


On Saturday 26 May 2007, Joseph Armbruster wrote:
> I noticed that one of the parts of ConfigParser was not using "for line
> in fp" style of readline-ing :-)  So, this will reduce the SLOC by 3
> lines and improve readability.  However, I did a quick grep and this
> type of practice appears in several other places.

Before the current iteration support was part of Python, there was no way
to
iterate over a the way there is now; the code you've dug up is simply from
before the current iteration support.  (As I'm sure you know.)

Is there motivation for these changes other than a stylistic preference
for
the newer idioms?  Keeping the SLOC count down seems pretty minimal, and
unimportant.  Making the code more understandable is valuable, but it's
not
clear how much this really achieves that.

In general, we try to avoid making style changes to the code since that
can
increase the maintenance burden (patches can be harder to produce that can
be
cleanly applied to multiple versions).



No other motivat

Are there motivations we're missing?



  -Fred

--
Fred L. Drake, Jr.   

___
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] popen test case inquiry in r55735 using PCBuild8

2007-06-02 Thread Joseph Armbruster
All,

I wanted to pass this one around before opening an issue on it.
When running the unit test for popen via rt.bat (in PCBuild8),
I received the following error:

=== BEGIN ERROR ===

C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\PCbuild8>rt test_popen
Deleting .pyc/.pyo files ...
43 .pyc deleted, 0 .pyo deleted

C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\PCbuild8>win32Release\python.exe 
  -E -tt ../lib/test/regrtest.py te
st_popen
test_popen
test test_popen failed -- Traceback (most recent call last):
   File "C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\lib\test\test_popen.py", 
line 31, in test_popen
 ["foo", "bar"]
   File "C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\lib\test\test_popen.py", 
line 24, in _do_test_commandline
 got = eval(data)[1:] # strip off argv[0]
   File "", line 0

^
SyntaxError: unexpected EOF while parsing

1 test failed:
 test_popen

=== END ERROR ===


Only naturally, I looked into what was causing it and noticed the 
following:  Line 23 of the test_popen.py appears to be returning ''
and assigning this to data.

data = os.popen(cmd).read()

The problem with is, the next line (24) assumes the previous line
will work and goes on to perform the following strip and assert:

got = eval(data)[1:] # strip off argv[0]
self.assertEqual(got, expected)

So, in a perfect world, ['-c','foo','bar']\n is what data Should be.
I put some quick debug statements after line 23 in test_popen.py to 
verify this and I observed the following:

data=
cmd= "C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\PCbuild8\win32Release\python.exe" 
-c "import sys;print sys.argv" foo bar

Now, on to the 'interesting' part.  From the command line, observe the
following:

C:\Documents and 
Settings\joe\Desktop\Development\Python\trunk\PCbuild8\win32release>python 
-c "import sys; print sys.argv" foo bar
['-c', 'foo', 'bar']


Outside of the popen call failing.  I am wondering if an appropriate 
assert should be performed on the data object, prior to line 24.


In addition, if you debug into the posixmodule, this is the scoop:

1. breakpoint set in posixmodule at the start of posix_popen
2. i run in debug
3. run the following:

import os
tmp = os.popen('"C:/Documents and 
Settings/joe/Desktop/Development/Python/trunk/PCbuild8/win32Release/python.exe" 
-c "import sys;print sys.argv" foo bar')

3. call enters posixmodule posix_popen and follows path:
f = _PyPopen(cmdstring, tm | _O_TEXT, POPEN_1);

4. enters posixmodule:  _PyPopen

5. enters posixmodule:  _PyPopenCreateProcess

6. enters posixmodule linen 4920 where the CreateProcess is...
s2 checks out as:
"C:\WINDOWS\system32\cmd.exe /c "C:/Documents and 
Settings/joe/Desktop/Development/Python/trunk/PCbuild8/win32Release/python.exe" 
-c "import sys;print sys.argv" foo bar"

this call returns nonzero, which means it "succeeded". see:
[ http://msdn2.microsoft.com/en-us/library/ms682425.aspx ]

On another note, I ran across CreateProcessW and am interested in 
questioning whether or not this has a place in posixmodule?


Any on yet another note, when I ran test_popen.py straight from /lib 
(using my std::Python25 install, I obtained the following debug output 
in the same statement of interest)

data=['-c', 'foo', 'bar']
cmd=c:\python25\python.exe -c "import sys;print sys.argv" foo bar


Your thoughts ?

Joseph Armbruster

___
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] popen test case inquiry in r55735 using PCBuild8

2007-06-04 Thread Joseph Armbruster

Mark,

Sounds good, I will get patching tonight.  Any thoughts on CreateProcessW ?

Joseph Armbruster

On 6/4/07, Mark Hammond <[EMAIL PROTECTED]> wrote:


> All,
>
> I wanted to pass this one around before opening an issue on it.
> When running the unit test for popen via rt.bat (in PCBuild8),
> I received the following error:
>
> === BEGIN ERROR ===
>
> C:\Documents and
> Settings\joe\Desktop\Development\Python\trunk\PCbuild8>rt test_popen
> Deleting .pyc/.pyo files ...
> 43 .pyc deleted, 0 .pyo deleted
>
> C:\Documents and
> Settings\joe\Desktop\Development\Python\trunk\PCbuild8>win32Re
> lease\python.exe -E -tt ../lib/test/regrtest.py test_popen
> test_popen
> test test_popen failed -- Traceback (most recent call last):
>File "C:\Documents and Settings\joe\Desktop\Development\Python\...

I can't reproduce this.  I expect you will find it is due to the space in
the filename of your Python directory, via cmd.exe's documented behaviour
with quote characters.  A patch that allows the test suite to work in such
an environment would be welcome, but I think you might end up needing
access
to GetShortPathName() rather than CreateProcess().

Cheers,

Mark


___
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] popen test case inquiry in r55735 using PCBuild8

2007-06-05 Thread Joseph Armbruster

Mark,

My apologies for being a day late, got working on some other things.
So here's the scoop as it relates to the issue at hand:

- If you run rt.bat from the trunk as-is and place it in a path that 
contains an empty space, you receive the error outlined in 
resultwithspace.txt.


- If you run rt.bat from the trunk as-is and place it in a path that 
does not contain an empty space, you receive no errors as outlined in 
resultwithoutspace.txt.


- If you run rt.bat with the patch, on Windows XP, you receive no errors 
as outlined in resultafterpatch.txt.


The patch is attached.  Probably my biggest question now is the use of 
GetVersion as opposed to GetVersionEx. According to the MSDN, it doesn't 
appear to be all that undesirable:


http://msdn2.microsoft.com/en-us/library/ms724451.aspx

Your thoughts?

Joseph Armbruster


Joseph Armbruster wrote:

Mark,

Sounds good, I will get patching tonight.  Any thoughts on CreateProcessW ?

Joseph Armbruster

On 6/4/07, *Mark Hammond* < [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


 > All,
 >
 > I wanted to pass this one around before opening an issue on it.
 > When running the unit test for popen via rt.bat (in PCBuild8),
 > I received the following error:
 >
 > === BEGIN ERROR ===
 >
 > C:\Documents and
 > Settings\joe\Desktop\Development\Python\trunk\PCbuild8>rt test_popen
 > Deleting .pyc/.pyo files ...
 > 43 .pyc deleted, 0 .pyo deleted
 >
 > C:\Documents and
 > Settings\joe\Desktop\Development\Python\trunk\PCbuild8>win32Re
 > lease\python.exe -E -tt ../lib/test/regrtest.py test_popen
 > test_popen
 > test test_popen failed -- Traceback (most recent call last):
 >File "C:\Documents and Settings\joe\Desktop\Development\Python\...

I can't reproduce this.  I expect you will find it is due to the
space in
the filename of your Python directory, via cmd.exe's documented
behaviour
with quote characters.  A patch that allows the test suite to work
in such
an environment would be welcome, but I think you might end up
needing access
to GetShortPathName() rather than CreateProcess().

Cheers,

Mark




Index: posixmodule.c
===
--- posixmodule.c   (revision 55784)
+++ posixmodule.c   (working copy)
@@ -4793,6 +4793,9 @@
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
DWORD dwProcessFlags = 0;  /* no NEW_CONSOLE by default for Ctrl+C 
handling */
+   DWORD dwVersion = 0;
+   DWORD dwMajorVersion = 0;
+   DWORD dwMinorVersion = 0;
char *s1,*s2, *s3 = " /c ";
const char *szConsoleSpawn = "w9xpopen.exe";
int i;
@@ -4814,8 +4817,20 @@
--comshell;
++comshell;
 
-   if (GetVersion() < 0x8000 &&
-   _stricmp(comshell, "command.com") != 0) {
+   dwVersion = GetVersion();
+   dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
+   dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
+
+   if (dwMajorVersion >= 5)
+   {
+   /* Current, XP + Vista? */
+   x = i + strlen(s3) + strlen(cmdstring) + 1;
+   s2 = (char *)alloca(x);
+   ZeroMemory(s2, x);
+   PyOS_snprintf(s2, x, "%s", cmdstring);
+   } 
+   else if (dwMajorVersion == 4 &&
+   _stricmp(comshell, "command.com") != 0) {
/* NT/2000 and not using command.com. */
x = i + strlen(s3) + strlen(cmdstring) + 1;
s2 = (char *)alloca(x);
@@ -4836,23 +4851,23 @@
modulepath[x] = '\0';
/* Create the full-name to w9xpopen, so we can test it 
exists */
strncat(modulepath,
-   szConsoleSpawn,
-   (sizeof(modulepath)/sizeof(modulepath[0]))
-  -strlen(modulepath));
+   szConsoleSpawn,
+   
(sizeof(modulepath)/sizeof(modulepath[0]))
+  -strlen(modulepath));
if (stat(modulepath, &statinfo) != 0) {
size_t mplen = 
sizeof(modulepath)/sizeof(modulepath[0]);
/* Eeek - file-not-found - possibly an embedding
   situation - see if we can locate it in 
sys.prefix
*/
strncp

[Python-Dev] XP Buildbot

2007-10-15 Thread Joseph Armbruster
Greetings,

Long, long ago, I had mentioned dedicating a laptop of mine to the 
python project as a buildbot.  Well, I finally made it around to 
cleaning off my box and putting it all together.  I prepared my laptop 
with everything (I think...) needed to become a buildbot.  The system 
specifications are as follows:

OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 2 Build 2600
Processor: x86 Family 15 Model 2 Stepping 4 GenuineIntel ~1195Mhz
Total Physical Memory: 1,023MB

I have the trunk built with VS2005 and I am doing a clean run of rt.bat 
right now to verify everything is reasonably good.

I would like to seek insight from the team as to what steps I could take 
next to verify my box is ready to go and make it be used.

Thank You,
Joseph Armbruster
___
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 Extension Building Network

2007-10-16 Thread Joseph Armbruster

Mike,

I had been working on getting my box ready to function as one of these:
http://wiki.python.org/moin/BuildbotOnWindows.

However, I will help out in whatever way possible.  If the team feels it 
could be better utilized doing this, let's do it.

VS2005 only fits in because I happen to own a single license :-) It 
seems like most people in the community do not have ready-access to one, 
so I figured this could be a benefit.

Let me know,
Mr. Joseph Armbruster


Mike wrote:
> Dear Ms. Armbruster,
> 
> Steve Holden thought I should contact you. We are working on
> developing a network of volunteers to build binary Python extensions
> for Windows. In a thread on c.l.py, Lundh told us that we should
> compile against 2.3 on up.
> 
> I have been experimenting with compiling some extensions with open
> source tools only, namely the MingW compiler. I also have Visual
> Studio 2003 to use for comparison. I guess what I'm asking is if you'd
> like to be a part of the network. Right now, it's just me with
> Holden's backing.
> 
> How does Visual Studio 2005 fit in exactly? From my research, Python
> 2.4/2.5 were compiled with VS2003. Is VS2005 being  used for 2.6+?
> 
> Anyway, let me know what you think. You can see some of my stuff here:
> 
> http://www.pythonlibrary.org/python_modules.htm
> 
> Mike Driscoll
> 


___
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] (no subject)

2007-11-22 Thread Joseph Armbruster
Christian,

When will the third party library versions be finalized for Py3k?  For the time 
being I am building with:

bzip2-1.0.3
db-4.4.20
openssl-0.9.8g
sqlite-source-3.3.4
tcl8.4.12
tix-8.4.0
tk8.4.12

I had an slight issue with the PCbuild9 solution with OpenSSL, I will open a 
bug and submit a patch in a few.  I have a few hours before turkey time :-)

Good Day!
Joseph Armbruster


Christian Heimes wrote:
> Just for your information: I've back-ported the PCbuild9 directory from
> py3k to the trunk. You now can build Python 2.6 and 3.0 with the new
> Visual Studio 2008. As far as I've heard from other it works with the
> free Express Edition.
> 
> MSDN subscribers with the Standard or Professional version can also
> create PGO builds with the new directory. Preliminary tests are showing
> that PGO builds are roughly 10% faster than standard builds.
> 
> Have fun!
> 
> Christian
> 
> ___
> 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/josepharmbruster%40gmail.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


[Python-Dev] Statsvn output for /python/branches/py3k

2007-11-28 Thread Joseph Armbruster
All,

I was looking at statsvn today at work and gave it a test-run on a repo there. 
  I wondered what it would look like for python3k.  And... here are the results:

http://www.joevial.com/statsvn/

Enjoy,
Joseph Armbruster
___
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] builtin_format function code-spacing in bltinmodule.c

2007-12-11 Thread Joseph Armbruster
All,

Not sure if this is significant or not but the spacing of the builtin_format
function is not consistent with the
rest of the bltinmodule.c file.

Joseph Armbruster
___
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] sliceobject Py_None step inquiry

2007-12-11 Thread Joseph Armbruster

I was playing around with sliceobject.c this evening and noticed the following 
behavior.  If you slice with a step 0, you receive a ValueError but when you 
slice with a step of None, the step is set to 1.  As an example, observe the 
following interactive session:

 >>> a = [1,2,3,4,5,6]
 >>> b = slice(0,5,None)
 >>> a[b]
[1, 2, 3, 4, 5]
 >>> b = slice(0,5,0)
 >>> a[b]
Traceback (most recent call last):
   File "", line 1, in 
ValueError: slice step cannot be zero
 >>>

Within the code, it looks like Py_None performs a step of 1.  Does it make 
sense to create a patch so that None and 0 behave the same in this respect?

 >>> a = [1,2,3,4,5,6]
 >>> b = slice(0,5,None)
 >>> a[b]
Traceback (most recent call last):
   File "", line 1, in 
ValueError: slice step cannot be None
 >>> b = slice(0,5,0)
 >>> a[b]
Traceback (most recent call last):
   File "", line 1, in 
ValueError: slice step cannot be zero
 >>> b = slice(0,5)
 >>> a[b]
[1, 2, 3, 4, 5]
 >>>


Joe
___
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] Issues 1559298 and 1475 consolidation

2007-12-14 Thread Joseph Armbruster
Should these two issues be consolidated?  It looks as if they are attacking
the same problem.

Thoughts?
Joseph Armbruster
___
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] integer subclass range behavior

2007-12-19 Thread Joseph Armbruster
All,

I posted this up to comp.lang.python earlier today and asked a few questions 
around IRC.  The general consensus appeared to be that this was a bug.  Before 
opening up an issue on it, I wanted to run it by this list first (just in case) 
  Here is a copy / paste from comp.lang.python:

URL:

http://groups.google.com/group/comp.lang.python/browse_frm/thread/801f227fceff4066#e0305608a5931af1

Post:

I was wondering what would happen, so I tried this out for the heck of it with:
Python 3.0a2 (py3k:59572M, Dec 19 2007, 15:54:07) [MSC v.1500 32 bit (Intel)] 
on win32

class a(int):
   def __new__(cls,number):
 return int.__new__(cls,number)

for x in range(0,a(5)):
   print(x)

Which resulted in a:

Traceback (most recent call last):
   File "", line 1, in 
   File "a.py", line 5, in 
 for x in range(0,a(5)):
SystemError: ..\Objects\longobject.c:400: bad argument to internal
function
[41030 refs]

It looks like the rangeobject performs a FitsInLong test on each of
the parameters to range, which uses the function
_PyLong_FitsInLong(PyObject *vv) within longobject.c.  In tern, this
performs a typecheck:  #define PyLong_CheckExact(op) (Py_TYPE(op) ==
&PyLong_Type) that fails.

Interesting!
___
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] test_sys failures

2007-12-20 Thread Joseph Armbruster
I am unable to reproduce this in windows with:

Python 3.0a2 (py3k:59584M, Dec 20 2007, 16:24:12) [MSC v.1500 32 bit
(Intel)] on win32

Running the test via rt and in isolation does not appear to fail.  In
isolation produces 16 OKs.

Joe

On Dec 20, 2007 3:58 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:

> When I build from scratch and run most tests (regrtest.py -uall) I get
> some strange failures with test_sys.py:
>
> test test_sys failed -- Traceback (most recent call last):
>  File "/usr/local/google/home/guido/python/py3kd/Lib/test/test_sys.py",
> line 302, in test_43581
>self.assertEqual(sys.__stdout__.encoding, sys.__stderr__.encoding)
> AssertionError: 'ascii' != 'ISO-8859-1'
>
> The same test doesn't fail when run in isolation.
>
> Interestingly, I saw this with 2.5 as well as 3.0, but not with 2.6!
>
> Any ideas?
>
> --
> --Guido van Rossum (home page: 
> http://www.python.org/~guido/
> )
> ___
> 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/josepharmbruster%40gmail.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


[Python-Dev] svn.python.org ?

2007-12-22 Thread Joseph Armbruster

Is svn.python.org ok?  I am unable to perform an update at the moment.

Joseph Armbruster
___
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] Contributing to Python

2008-01-03 Thread Joseph Armbruster
Titus,

Having a "core mentor" would be great but do they really have time for
that?  I've been lucky at finding people in #python / #python-dev) that can
answer development inquiries (or at least verify something is or is not a
bug).

With respects to the bug tracker, when I select Search and Python 2.6, I
retrieved 208 open bugs.  At a quick glance, I found two that were windows,
but not tagged appropriately.  If it's worthwhile, I can spend some time
this evening browsing the list of current 2.6 bugs to see if there are any
duplicates, collisions, etc.

Joseph Armbruster


On Jan 3, 2008 2:53 PM, Titus Brown <[EMAIL PROTECTED]> wrote:

> On Thu, Jan 03, 2008 at 02:49:27PM -0500, Fred Drake wrote:
> -> On Jan 3, 2008, at 2:15 PM, Guido van Rossum wrote:
> -> > My main gripe is with code contributions to Py3k and 2.6; Py3k is
> -> > mostly done by a handful of people, and almost nobody is working much
> -> > on 2.6.
> ->
> -> For those of us still using Python 2.4 and earlier, it's hard to be
> -> motivated to worry about Python 3.0, no matter how wonderful it
> -> looks.  (It doesn't help that my own available time appears to
> -> decrease daily with the kids and all.)
> ->
> -> Python 2.6 seems to be entirely targeted at people who really want to
> -> be on Python 3, but have code that will need to be ported.  I
> -> certainly don't view it as interesting in it's own right.
>
> 3k and 26 are, however, the only place where we can propose new features
> -- which makes it the place for cleanup and additional testing, as well
> as backwards-incompatible bug fixes...
>
> --titus
> ___
> 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/josepharmbruster%40gmail.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


[Python-Dev] function call syntax oddity

2008-01-04 Thread Joseph Armbruster
All,

I was showing a co-worker some python today (using the trunk) when I
stumbled upon this.  I was not sure what to think since I have never really
experimented with using spaces like this.  So here tis.  Be careful to
notice the spaces as they are significant here.

>>> 1.3.__str__()
'1.3'

>>> 1.3.__str__()
'1.3'

>>> a = " somestring   "

>>> a  .split()
['somestring']

>>> a. split()
['somestring']


Cool I suppose, except here's an odd man out:

>>> 1.__str__()
  File "", line 1
1.__str__()
^
SyntaxError: invalid syntax

>>> 1 .__str__()
'1'

Joseph Armbruster
___
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] Coverity Scan, Python upgraded to rung 2

2008-01-10 Thread Joseph Armbruster
I am not a developer but i'm interested in browsing it.  Is it
possible to be added?

On Jan 10, 2008 10:57 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Neal Norwitz wrote:
> > I think only Coverity can add people.  You can send them a message if
> > you would like to be added: [EMAIL PROTECTED]  Or you can send
> > mail to me and I can forward along all the people that would like to
> > be added.
> >
> > I'll wait a few days to collect names so I can batch up the request.
>
> Count me in!
>
> Christian
>
> ___
> 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/josepharmbruster%40gmail.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


[Python-Dev] bugs.pythong.org bug?

2008-02-06 Thread Joseph Armbruster
All,

I attempted to search for all issues created by me today so I could catch up
since i've been out of the loop for a bit.  I performed the following steps:

- went to bugs.python.org
- clicked search (on the lhs of the page)
- typed in josepharmbruster as creator
- clicked search

I will create an issue if deemed necessary.

Joseph Armbruster


*exceptions.KeyError*:

Debugging information follows

   1. While evaluating the standard:'request/batch' expression on line 23
   Current variables:
*templates*
   *repeat* *false*0 *context* *
   utils* *db* *nothing*None *i18n*<
   roundup.cgi.TranslationService.TranslationService instance at
   0x2ab2b759e200> *true*1 *default*<
   roundup.cgi.PageTemplates.TALES.Default instance at 0x2ab2b6353b90> *
   request*, 'classname':
   'issue', 'special_char': '@', 'dispname': None, 'group': [('+',
   'priority')], '_client': , 'template': 'index', 'input': , 'columns': ['title', 'id', 'activity', 'status'], 'sort':
   [('+', 'activity')], 'env': {'HTTP_AUTHORIZATION': None, 'SERVER_PORT':
   '8080', 'SERVER_NAME': 'localhost', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=
   0.5', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'GET', 'HTTP_HOST':
   'localhost:8080', 'PATH_INFO': 'issue', 'CONTENT_TYPE': 'text/plain',
   'QUERY_STRING':
   
'%40search_text=&title=&%40columns=title&id=&%40columns=id&creation=&creator=josepharmbruster&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&severity=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=1&%40columns=status&resolution=&%40pagesize=50&%40startwith=0&%40action=search',
   'TRACKER_NAME': 'tracker'}, 'form': FieldStorage(None, None,
   [MiniFieldStorage('@columns', 'title'), MiniFieldStorage('@columns', 'id'),
   MiniFieldStorage('creator', 'josepharmbruster'),
   MiniFieldStorage('@columns', 'activity'), MiniFieldStorage('@sort',
   'activity'), MiniFieldStorage('@group', 'priority'),
   MiniFieldStorage('status', '1'), MiniFieldStorage('@columns', 'status'),
   MiniFieldStorage('@pagesize', '50'), MiniFieldStorage('@startwith', '0'),
   MiniFieldStorage('@action', 'search'), MiniFieldStorage('@filter',
   'creator'), MiniFieldStorage('@filter', 'status')]), 'nodeid': None, 'base':
   'http://bugs.python.org/', 'user': ,
   'search_text': None, 'pagesize': 50, 'filterspec': {'status': ['1'],
   'creator': []}, 'filter': ['creator', 'status'], 'client': <
   roundup.cgi.client.Client instance at 0x2ab2b759e128>}> *tracker*<
   roundup.instance.Tracker instance at 0x2ab2b64bccf8> *template* *config*<
   roundup.configuration.CoreConfig instance at 0x2ab2b64bcd40>
*options*{'ok_message':
   [], 'error_message': []} *loop*<
   roundup.cgi.PageTemplates.TALES.SafeMapping instance at
   0x2ab2b75ad9e0> *status_notresolved*'-1,1,3' *columns_showall*
   'id,activity,title,creator,assignee,status' *kw_create*0
*attrs*{'tal:define':
   'batch request/batch', 'tal:condition': 'context/is_view_ok'} *columns
   *'id,activity,title,creator,status'
   2. A problem occurred in your template "issue.index.html".

 Full traceback:

Traceback (most recent call last):
  File 
"/home/roundup/roundup-production//lib/python2.4/site-packages/roundup/cgi/client.py",
line 770, in renderContext
result = pt.render(self, None, None, **args)
  File 
"/home/roundup/roundup-production//lib/python2.4/site-packages/roundup/cgi/templating.py",
line 323, in render
getEngine().getContext(c), output, tal=1, strictinsert=0)()
  File 
"/home/roundup/roundup-production//lib/python2.4/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 192, in __call__
self.interpret(self.program)
  File 
"/home/roundup/roundup-production//lib/python2.4/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
  File 
"/home/roundup/roundup-production//lib/pyt

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-26 Thread Joseph Armbruster
Martin,

What is the rationale behind using an MSI ?  Has anyone attempted to create
a Python installer using something a bit simpler, like NSIS [
http://nsis.sourceforge.net/Main_Page]?  If not, what are the reasons?

Joe

On Wed, Nov 26, 2008 at 3:03 PM, "Martin v. Löwis" <[EMAIL PROTECTED]>wrote:

> > I always wondered why it was necessary to write msi.py in the first
> > place. Maintaining it is surely a big effort and requires understanding
> > of a dark library which a few people have (IMO it's a much higher effort
> > than setting up automated tests in a bunch of VM, which you said is "not
> > worth it").
> >
> > There are plenty of MSI installer generator programs
>
> Originally it was written because none of the MSI generator programs
> were capable of packaging Python. In particular, none was capable of
> creating 64-bit packages (which were first needed to create the
> Itanium packages).
>
> > and Python's needs
> > do not seem so weird to require a custom MSI generator.
>
> Python's needs are fairly weird, so I'm very skeptical that any other
> generator is capable of doing what msi.py does (or, if it was capable
> of doing that, that it was then any simpler than msi.py).
>
> The critical part is that you need a powerful way to specify what files
> to package (having to select them in a UI is unacceptable, as the set
> of files constantly changes - the current generator can cope with many
> types of file additions without needing any change).
>
> > I'm sure the
> > Python Software Foundation would easily get a free license of one of the
> > good commercial MSI installer generators.
>
> Can you recommend a specific one?
>
> In addition, I'm also skeptical wrt. commercial setup tools. We had been
> using Wise for a while, and it was a management problem because the
> license was only available on a single machine - so it was difficult
> for anybody else to jump in and do a release.
>
> > In short: if msi.py and the fact it breaks is part of the issue here,
> > it's very easy to solve in my opinion.
>
> I'm very skeptical that this statement is actually true.
>
> Regards,
> Martin
> ___
> 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/josepharmbruster%40gmail.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