[issue775964] fix test_grp failing when NIS entries present

2010-10-25 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

I am encountering this issue with py3k on a Debian machine. test_grp 
consistently fails due to a line with a plus sign in /etc/group

I believe that the previous patch attached to this bug is not correct due to 
the issues others have raised: It only handles lines with a plus sign as the 
name (not any name starting with '+' or '-') and it breaks out of the loop when 
it finds one, silently discarding any remaining lines.

I've attached a new patch which preserves the functionality of getgrall but 
updates its docstring to document that any group names starting with '+' or '-' 
represent NIS-related entries. The patch fixes the test itself so that it skips 
over NIS-related entries rather than attempting to look them up with 
grp.getgrnam.

With this patch applied (to the py3k branch HEAD), all regression tests pass on 
my machine.

--
nosy: +bobbyi
title: fix test_grp failing on RedHat 6.2 -> fix test_grp failing when NIS 
entries present
versions: +Python 3.2, Python 3.3
Added file: http://bugs.python.org/file19364/test_grp.patch

___
Python tracker 
<http://bugs.python.org/issue775964>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue775964] fix test_grp failing when NIS entries present

2010-11-07 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Martin, are you able to check in this fix? If not, what should I do and whom 
should I talk to so this can be checked in?

Thanks.

--

___
Python tracker 
<http://bugs.python.org/issue775964>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10397] Unified Benchmark Suite fails on py3k with --track-memory

2010-11-12 Thread Bobby Impollonia

New submission from Bobby Impollonia :

Steps to reproduce (requires linux because the --track-memory (-m) option to 
perf.py is linux-only):
hg clone http://hg.python.org/benchmarks/ py2benchmarks
mkdir py3benchmarks
cd py3benchmarks
../py2benchmarks/make_perf3.sh ../py2benchmarks
py3k perf.py -f -m -b normal_startup old_py3k new_py3k

With --track-memory, the normal_startup benchmark (which is part of the py3k 
benchmark group) invokes the interpreter under test as:
py3k -c 'for _ in xrange(20): pass'

This fails on py3k due to the use of xrange, which is not caught by 2to3 since 
it appears inside a quoted string (the command line argument).

A patch is attached that resolves the issue by changing the for loop with 
xrange into a while loop.

--
assignee: collinwinter
components: Benchmarks
files: perf.patch
keywords: patch
messages: 121060
nosy: bobbyi, collinwinter, pitrou
priority: normal
severity: normal
status: open
title: Unified Benchmark Suite fails on py3k with --track-memory
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file19582/perf.patch

___
Python tracker 
<http://bugs.python.org/issue10397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-12 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

> Can you please post an example Python module that has this markup you are 
> asking for, so I can show you how to achieve what you want without the markup?

Hi, Martin. Here's a real-world example:
http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/types.py?rev=6884:b181f1e53603

The syntax is:
# Py3K
# 
# Py2K

# end Py2K

For example, starting on line 152 we have,
# Py3K
#return unicode(self.compile())
# Py2K
return unicode(self.compile()).\
encode('ascii', 'backslashreplace')
# end Py2K

When the code is converted with 2to3, the py3k code on line 153 will be 
uncommented and used to replace the py2k code on lines 155-156. Having the py3k 
version commented before conversion resolves the issue that "you must not use 
syntax that is exclusively Python 3 in an if-python3 block".

Here is their modified version of 2to3 to support this syntax:
http://www.sqlalchemy.org/trac/browser/sa2to3.py

Their explanation is:
"This tool monkeypatches a preprocessor onto lib2to3.refactor.RefactoringTool, 
so that conditional sections can replace non-fixable Python 2 code sections for 
the appropriate Python 3 version before 2to3 is run."

--
nosy: +bobbyi

___
Python tracker 
<http://bugs.python.org/issue10070>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-12 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Consider here:
http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/engine/base.py?rev=6884:b181f1e53603#L1329
the py3k code uses the "raise ... from" syntax which isn't legal in Python 2. 
Using either  "Approach A" or "Approach B" would prevent the program from 
working in py2k due to syntax errors.

I agree that the markup hrufu proposed didn't solve that problem either. SQLA's 
trick of having the py3k code commented out is the critical part that they add.

Additionally, the runtime cost prevents Approach A from being general solution 
for libraries like SQLA who have put a lot of work into reducing the number of 
function calls and checks in their critical paths.

Approach B isn't a general solution because it requires you to replace entire 
functions at a time. If you have a 25 line function where only 1 line needs to 
be changed for py3k, you either end up with 24 duplicated lines of code, or you 
have to factor that single line out into its own function, confusing the flow 
of the code and incurring runtime cost.

--

___
Python tracker 
<http://bugs.python.org/issue10070>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia

New submission from Bobby Impollonia :

After checking out and converting the benchmark suite to py3k, the py3k 
benchmark set fails because of an ImportError in bm_pickle.py.  

Steps to reproduce:
hg clone http://hg.python.org/benchmarks/ py2benchmarks
mkdir py3benchmarks
cd py3benchmarks
../py2benchmarks/make_perf3.sh ../py2benchmarks
py3k perf.py -f -b py3k old_py3k new_py3k

The ImportError comes from the new py2k/ py3k compatibility code. bm_pickle 
imports "long" from compat.py. However, when 2to3 is run, it changes the import 
line from saying "import ... long" to saying "import ... int", which fails 
because compat.py does not define "int".

Is this a bug in lib2to3? I would not expect names used as lvalues to get 
converted. I'm using lib2to3 from python 2.6.5.

A similar case is that the line
unicode = str
in compat.py gets changed by 2to3 to:
str = str
This isn't currently causing any problems because no one is trying to import 
"unicode" from compat, but if they did, they would fail on py3k.

Regardless, a patch is attached that fixes bm_pickle by using "int_" as the 
name for our typedef instead of "long".

--
assignee: collinwinter
components: Benchmarks
files: compat.patch
keywords: patch
messages: 121154
nosy: bobbyi, collinwinter, pitrou
priority: normal
severity: normal
status: open
title: Pickle benchmark fails after converting Benchmark Suite to py3k
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file19598/compat.patch

___
Python tracker 
<http://bugs.python.org/issue10411>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Are there any files in performance/ that need 2to3?

--

___
Python tracker 
<http://bugs.python.org/issue10411>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10412] Add py3k support for "slow" pickle benchmark in Benchmark Suite

2010-11-13 Thread Bobby Impollonia

New submission from Bobby Impollonia :

A patch is attached that does the following:
1) Add py3k support for the "slow" (pure-Python) pickle/ unpickle benchmarks.
2) Add a runtime check to the pickle benchmark verifying that we do or don't 
have the C accelerators as expected.
3) Rename the cPickle versions to "fastpickle"/ "fastunpickle" and add a group 
called "pickle" that contains all of the pickling benchmarks.
4) Add the "pickle" benchmark group to the py3k and 2n3 groups.

--
assignee: collinwinter
components: Benchmarks
files: slowpickle.patch
keywords: patch
messages: 121167
nosy: bobbyi, collinwinter, pitrou
priority: normal
severity: normal
status: open
title: Add py3k support for "slow" pickle benchmark in Benchmark Suite
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file19600/slowpickle.patch

___
Python tracker 
<http://bugs.python.org/issue10412>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Patch is attached for make_perf3.sh to have it not convert things that don't 
need to be converted. This fixes the issue and with the patch all the py3k 
benchmarks run successfully after running the script.

--
Added file: http://bugs.python.org/file19602/make_perf3.patch

___
Python tracker 
<http://bugs.python.org/issue10411>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Attached is a patch for perf.py that goes along with the previous patch for 
make_perf3.sh. This patch changes the py3k group to include everything in the 
2n3 group since we can still run all those tests after converting.

Previously, nqueens, unpack_sequance and richards weren't run as part of -b py3k

--
Added file: http://bugs.python.org/file19603/perf.patch

___
Python tracker 
<http://bugs.python.org/issue10411>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10448] Add Mako template benchmark to Python Benchmark Suite

2010-11-17 Thread Bobby Impollonia

New submission from Bobby Impollonia :

The Benchmark Suite currently contains two template benchmarks (Django and 
Spitfire) for Python 2.x, but none that support 3.x.

The attached patch adds a benchmark using Mako (http://www.makotemplates.org/), 
a popular, pure-Python, performance-oriented template system that supports both 
2.x and 3.x via 2to3 conversion.

Mako is added to the "py3k" benchmark group and a new group called "template" 
with all three template benchmarks is added (that will only work on 2.x since 
it uses Django and Spitfire).

I added the Mako benchmark and lib to the lists in the README file and also 
updated the descriptions of the pickle benchmarks there since I had missed that 
before. Also fixed a path in there that was referring to perf.py as 
unladen-benchmarks/perf.py.

--
assignee: collinwinter
components: Benchmarks
files: mako.patch
keywords: patch
messages: 121378
nosy: bobbyi, collinwinter, pitrou
priority: normal
severity: normal
status: open
title: Add Mako template benchmark to Python Benchmark Suite
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file19628/mako.patch

___
Python tracker 
<http://bugs.python.org/issue10448>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10448] Add Mako template benchmark to Python Benchmark Suite

2010-11-17 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

Did you convert the project using make_perf3.sh? This benchmark is in the 2to3 
group and not the 2n3 group because it won't work without conversion.

Using the attached patch, the following sequence of commands works for me to 
run the benchmark with python 3.1:

hg clone http://hg.python.org/benchmarks/ py2benchmarks
cd py2benchmarks/
hg import mako.patch 
mkdir ../py3benchmarks
cd ../py3benchmarks
../py2benchmarks/make_perf3.sh ../py2benchmarks
python3.1 perf.py -f -b mako python3.1 python3.1

--

___
Python tracker 
<http://bugs.python.org/issue10448>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10448] Add Mako template benchmark to Python Benchmark Suite

2010-11-17 Thread Bobby Impollonia

Bobby Impollonia  added the comment:

It's working okay for me using a python binary that I just built off the the 
py3k branch on 64-bit linux.

FWIW, in the crashing line
util.SetLikeDict(**parent.topleveldefs)
, util.SetLikeDict is a subclass of dict defined in python that just adds an 
extra method (union) and parent.topleveldefs is an instance of the same class.

--

___
Python tracker 
<http://bugs.python.org/issue10448>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue874900] threading module can deadlock after fork

2010-12-15 Thread Bobby Impollonia

Changes by Bobby Impollonia :


--
nosy: +bobbyi

___
Python tracker 
<http://bugs.python.org/issue874900>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2010-12-15 Thread Bobby Impollonia

Changes by Bobby Impollonia :


--
nosy: +bobbyi

___
Python tracker 
<http://bugs.python.org/issue6721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4106] multiprocessing occasionally spits out exception during shutdown

2009-05-17 Thread Bobby Impollonia

Changes by Bobby Impollonia :


--
nosy: +bobbyi

___
Python tracker 
<http://bugs.python.org/issue4106>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com