[issue1705] trace module does not annotate global statement

2007-12-28 Thread Wummel

New submission from Wummel:

Hi,

the trace module does not properly count the global statement. So
coverage tests of functions that use the global statement always file.

To reproduce write a simple function using the global statement and
store it in "mytest.py" (which is attached). Then run "python -m trace
-c mytest.py".
You'll see that the global statement line will not be covered (ie. there
is no "1:" at the beginning of the line).

I tested with Python 2.5 and 2.4.

--
components: Extension Modules
files: mytest.py
messages: 59021
nosy: calvin
severity: normal
status: open
title: trace module does not annotate global statement
type: behavior
Added file: http://bugs.python.org/file9033/mytest.py

__
Tracker <[EMAIL PROTECTED]>

__# coverage test for the trace module
# run with: "python -m trace -c mytest.py"
t = 1

def f():
global t
t = 2

if __name__ == '__main__':
f()
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706] Force WINVER 0x0500 (Windows 2000)

2007-12-28 Thread Christian Heimes

New submission from Christian Heimes:

Do you think it's a good idea to force Win2k compatibility by defining
WINVER 0x0500 in PC/pyconfig.h? It fixed the problem with Tcl/Tk, #1601.

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

#define WINVER 0x0500
#define _WIN32_WINNT 0x0500

--
assignee: loewis
components: Windows
messages: 59022
nosy: loewis, tiran
severity: normal
status: open
title: Force WINVER 0x0500 (Windows 2000)
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1607] Patch for TCL 8.5 support

2007-12-28 Thread Tal Einat

Tal Einat added the comment:

I say close it, but start a discussion on switching to Tcl/Tk8.5 on the
appropriate list(s).

__
Tracker <[EMAIL PROTECTED]>

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



[issue1607] Patch for TCL 8.5 support

2007-12-28 Thread Christian Heimes

Christian Heimes added the comment:

Can you start a discussion on python-dev please? Tcl/Tk support should
be added to Python trunk (2.6) and ported to 3.0. Is it possible to keep
compatibility with Tcl/Tk 8.4, too?

--
resolution:  -> rejected
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1778443] robotparser.py fixes

2007-12-28 Thread Aristotelis Mikropoulos

Aristotelis Mikropoulos added the comment:

Also, I would like to tell you that my new account name is "Indy", and
not "indy90" anymore (I changed since this issue tracker moved from
SourceForge to here). So, thanks again and I hope this patch will be
helpful.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1704] possible bug in randint

2007-12-28 Thread Rich Marinaccio

Rich Marinaccio added the comment:

I've done some more testing and I can't get this to repeat with randint 
alone. It must be an issue with combination of the len() function used 
as a parameter to randint. The above code is in a loop that further 
down will del preshuffle[randIndex]. Could this be a threading issue 
where len(preshuffle) takes time to update when the list is shortened?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1061803] Source code encoding in IDLE console

2007-12-28 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

Can this be closed? Is it still an issue in 3.0?

--
nosy: +kbk

_
Tracker <[EMAIL PROTECTED]>

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



[issue1706] Force WINVER 0x0500 (Windows 2000)

2007-12-28 Thread Martin v. Löwis

Martin v. Löwis added the comment:

It's definitely not good to define it unconditionally in PC/pyconfig.h,
as that would affect any extensions compiled for Python.

I'm -0 on defining it conditionally for the compilation of Python
itself. I dislike having to constrain Python to Windows 2000; IMO,
windows version dependencies should be resolved at runtime. However,
that option is probably still available with WINVER set.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1704] possible bug in randint

2007-12-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Threading is the likely source of your problems.  If you concur, please 
close this as invalid.

--
nosy: +rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue1707] probable bug in code.py with Python 3.0a2

2007-12-28 Thread Andre Roberge

New submission from Andre Roberge:

There appears to be a bug in code.py in Python 3.0a2/a1.

I believe that the body of
InteractiveConsole().raw_input()
should be changed from

   sys.stdout.write(prompt)
   sys.stdout.flush()
   return sys.stdin.readline()

to
  return input(prompt)

Here's a sample session.

Python 3.0a1 (py3k, Nov 27 2007, 07:40:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import code
>>> console = code.InteractiveConsole()
>>> console.interact()
Python 3.0a1 (py3k, Nov 27 2007, 07:40:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> for i in range(3):
...   print(i)
0
1
2
>>>  # Notice how I could only enter one line inside the loop.
>>>  # Let's try again, with a different definition of raw_input()
>>> import code
>>> console = code.InteractiveConsole()
>>> console.raw_input = input
>>> console.interact()
Python 3.0a1 (py3k, Nov 27 2007, 07:40:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> for i in range(3):
...   print(i)
...
0
1
2
>>>  # Notice how I had to enter an empty line to end the loop - as it
should be.

The same problem affects function definitions - it is impossible to
define a function body with more than one line when running code.interact()

--
components: Library (Lib)
messages: 59030
nosy: aroberge
severity: normal
status: open
title: probable bug in code.py with Python 3.0a2
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1685] linecache .updatecache fails on utf8 encoded files

2007-12-28 Thread PyScripter

PyScripter added the comment:

To reproduce the error:

a) Save the following file in utf-8 format as c:\temp\module1.py
# -*- coding: utf-8 -*-
print("ψ")

b) Run the following script:
import pdb
d = pdb.Pdb()
filename = r"c:\Temp\module1.py"
print(d.set_break(filename,1))

Expected result
None

Actual Result
Line c:\temp\module1.py:1 does not exist

__
Tracker <[EMAIL PROTECTED]>

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



[issue1685] linecache .updatecache fails on utf8 encoded files

2007-12-28 Thread PyScripter

PyScripter added the comment:

Patch file attached

Added file: http://bugs.python.org/file9034/linecache.py.patch

__
Tracker <[EMAIL PROTECTED]>

__

linecache.py.patch
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com