[issue3840] if TESTFN == "/tmp/@test", some tests fail

2013-03-18 Thread R. David Murray

R. David Murray added the comment:

To clarify Colin's comment (we worked on this at the sprints), in 2.7 and later 
regrtest no longer will generate a TESTFN that starts with /tmp in any 
circumstance, so that includes cygwin.  (Instead regrtest creates a temporary 
directory in which the tests are run.)  So, indeed, this bug is now out of date.

--
resolution:  -> out of date
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17453] logging.config.fileConfig error

2013-03-18 Thread Hervé Coatanhay

New submission from Hervé Coatanhay:

In python 2.7 this code works:

>>> import logging.config
>>> import StringIO
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(StringIO.StringIO(a))
>>> 

whereas in python 3.3 it raises an exception:

>>> import logging.config
>>> import io
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(io.StringIO(a))
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py",
 line 70, in fileConfig
formatters = _create_formatters(cp)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py",
 line 114, in _create_formatters
class_name = cp[sectname].get("class")
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/configparser.py",
 line 942, in __getitem__
raise KeyError(key)
KeyError: 'formatter_""'
>>>

--
components: Library (Lib)
messages: 184435
nosy: Alzakath
priority: normal
severity: normal
status: open
title: logging.config.fileConfig error
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue17450] Failed to build _sqlite3

2013-03-18 Thread Ezio Melotti

Ezio Melotti added the comment:

The module is not needed (unless you are planning to use sqlite), so you can 
simply ignore the warning.  See also 
http://docs.python.org/devguide/setup.html#build-dependencies.

--
nosy: +ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17454] ld_so_aix not used when linking c++ (scipy)

2013-03-18 Thread alef

New submission from alef:

error: Command "xlC_r xlC_r -bI:/pathp/to/lib/python2.7/config/python.exp ...".

unixccompiler.py at line 251 override linker[0] with self.compiler_cxx[0]. This 
is not true for AIX that uses the script ld_so_aix, and not xlC_r.

--
assignee: eric.araujo
components: Distutils
messages: 184437
nosy: alef, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: ld_so_aix not used when linking c++ (scipy)
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue17445] Return the type you accept

2013-03-18 Thread Nick Coghlan

Nick Coghlan added the comment:

At a glance, this just looks like a bug in difflib - it should use
different literals when handling bytes. (Given that difflib newline
processing assumes ASCII compatibility, a latin-1 based decode/encode
solution may also be viable).

--

___
Python tracker 

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



[issue2786] Names in traceback should have class names, if they're methods

2013-03-18 Thread Illia Polosukhin

Illia Polosukhin added the comment:

Talked with David Murray (r.david.murray) at @pycon2013 sprints - will try to 
address this.

--
nosy: +ilblackdragon

___
Python tracker 

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



[issue17452] ftplib raises exception if ssl module is not available

2013-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0842c5411ed6 by Giampaolo Rodola' in branch 'default':
(issue 17452 / ftplib) fix TypeError occurring in case ssl module is not 
installed
http://hg.python.org/cpython/rev/0842c5411ed6

--
nosy: +python-dev

___
Python tracker 

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



[issue17452] ftplib raises exception if ssl module is not available

2013-03-18 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Fixed, thanks.

--
assignee:  -> giampaolo.rodola
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, yes.

--

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-03-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file29433/test_cpickle_fileio.patch

___
Python tracker 

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



[issue17455] ImportError (xml.dom.minidom) in /usr/lib/python2.7/dist-packages/apport/report.py

2013-03-18 Thread Felix Matenaar

New submission from Felix Matenaar:

We're getting the following exception in a custom testing framework using 
sqlalchemy. Our process is running several days and the exception seems to 
occurs unproducably during runtime, sometimes after a day and sometimes after a 
couple of hours. The same code is executed many times before.

To me it looks like SQLAlchemy crashed which then leads to the import error. 
Maybe I'll have to issue a bug for this specific project but first wanted to 
ask you guys.

File "/home/test/research/testing/db.py", line 101, in addException
self.testrun.exceptions.append(exc)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 168, 
in _get_
return self.impl.get(instance_state(instance),dict_)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 453, 
in get
value = self.callable_(state, passive)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 563, 
in _load_for_state
result = q.all()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 1947, in 
all
return list(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2057, in 
_iter_
return self._execute_and_instances(context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2070, in 
_execute_and_instances
close_with_result=True)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2061, in 
_connection_from_session
**kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 719, in 
connection
close_with_result=close_with_result)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 723, in 
_connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 266, in 
_connection_for_bind
conn = bind.contextual_connect()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2340, 
in contextual_connect
self.pool.connect(),
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 210, in connect
return _ConnectionFairy(self).checkout()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 371, in _init_
rec = self._connection_record = pool._do_get()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 758, in _do_get
return self._create_connection()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 174, in 
_create_connection
return _ConnectionRecord(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 256, in _init_
self.connection = self.__connect()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 316, in 
__connect
connection = self.__pool._creator()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 
80, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 280, 
in connect
return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (OperationalError) unable to open database 
file None None
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in 
apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/_init_.py", line 1, in 
from apport.report import Report
File "/usr/lib/python2.7/dist-packages/apport/report.py", line 15, in 
import xml.dom, xml.dom.minidom
ImportError: No module named minidom

Original exception was:
Traceback (most recent call last):
File "./test", line 72, in 
prog.run()
File "./test", line 67, in run
ts.run(self._getStorageBackend())
File "/home/test/research/testing/testsets.py", line 104, in run
storage.addException(exc)
File "/home/test/research/testing/db.py", line 101, in addException
self.testrun.exceptions.append(exc)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 168, 
in _get_
return self.impl.get(instance_state(instance),dict_)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 453, 
in get
value = self.callable_(state, passive)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 563, 
in _load_for_state
result = q.all()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 1947, in 
all
return list(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2057, in 
_iter_
return self._execute_and_instances(context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2070, in 
_execute_and_instances
close_with_result=True)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2061, in 
_connection_from_session
**kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 719, in 
connection
close_with_result=close_with_result)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 723, in 
_connection_for_

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Matt Clarke

Matt Clarke added the comment:

Hi Amaury.

I have tried removing pack and using /Zp1, but it makes no difference.
The size of callback_t and the one in C are 8 bytes.

Thanks,

Matt

On 13 March 2013 13:19, Amaury Forgeot d'Arc  wrote:

>
> Amaury Forgeot d'Arc added the comment:
>
> Is "_pack_ = 1" correct? Did you compile your C library with /Zp1 or
> similar?
> Also check that ctypes.sizeof(callback_t) matches the one given by the C
> compiler.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase

klappnase added the comment:

I am not familiar with python's test unit, but I tried my best.

As far as I see there are three possibilities to invoke the function:
* without pattern -> return tuple with all themes
* with pattern that matches one or more themes
* with pattern that matches no themes -> return empty tuple

So I tried to add a method to test_style.StyleTest() :

def test_themes(self):
installed_themes = self.style.themes()
some_themes = self.style.themes('*e*')
no_themes = self.style.themes('foobarbaz')

self.assertTrue(isinstance(installed_themes, tuple))
self.assertTrue(isinstance(some_themes, tuple))
self.assertTrue(isinstance(no_themes, tuple))

Oddly enough this fails on my own system (debian squeeze, tk-8.5.8, 
python-3.1.3 / -2.6.6):

$ python3 test_style.py
test_configure (__main__.StyleTest) ... ok
test_layout (__main__.StyleTest) ... ok
test_lookup (__main__.StyleTest) ... ok
test_map (__main__.StyleTest) ... ok
test_theme_use (__main__.StyleTest) ... ok
test_themes (__main__.StyleTest) ... ERROR

==
ERROR: test_themes (__main__.StyleTest)
--
Traceback (most recent call last):
  File "test_style.py", line 97, in test_themes
no_themes = self.style.themes('foobarbaz')
  File "/usr/lib/python3.1/tkinter/ttk.py", line 536, in themes
return self.tk.splitlist(self.tk.call('ttk::themes', pattern))
TypeError: Can't convert '_tkinter.Tcl_Obj' object to str implicitly

--
Ran 6 tests in 0.086s

FAILED (errors=1)
Traceback (most recent call last):
  File "test_style.py", line 108, in 
run_unittest(*tests_gui)
  File "/usr/lib/python3.1/test/support.py", line 955, in run_unittest
_run_suite(suite)
  File "/usr/lib/python3.1/test/support.py", line 938, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "test_style.py", line 97, in test_themes
no_themes = self.style.themes('foobarbaz')
  File "/usr/lib/python3.1/tkinter/ttk.py", line 536, in themes
return self.tk.splitlist(self.tk.call('ttk::themes', pattern))
TypeError: Can't convert '_tkinter.Tcl_Obj' object to str implicitly

The same error occurs with python-2.6.6 (same tk). Apparently this is because:

$ python3
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
>>> from tkinter import ttk
>>> r=Tk()
>>> s=ttk.Style()
>>> x = s.themes('foo')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.1/tkinter/ttk.py", line 536, in themes
return self.tk.splitlist(self.tk.call('ttk::themes', pattern))
TypeError: Can't convert '_tkinter.Tcl_Obj' object to str implicitly
>>> x=r.tk.call('ttk::themes', 'foo')
>>> x

>>> str(x)
''
>>> 

Called from wish the same call returns an empty string as expected:

$ wish
% ttk::themes
classic default clam alt
% ttk::themes *e*
default
% ttk::themes foobarbaz
%

In python2.6, when setting Tkinter.wantobjects to 0, themes('foo') returns an 
empty tuple as expected.
So I guess this is due to a bug in debian's python/tkinter install. Can anyone 
confirm this?

--

___
Python tracker 

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



[issue17456] os.py (unexpected character)

2013-03-18 Thread Corto Nexus

New submission from Corto Nexus:

In Python 3.3 (Windows 32bits) the lib os.py start with an uncommented letter 
'r'.

--
messages: 184446
nosy: corto.nexus
priority: normal
severity: normal
status: open
title: os.py (unexpected character)
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Benjamin has fixed this in the changeset 6aab72424063.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17456] os.py (unexpected character)

2013-03-18 Thread Ezio Melotti

Ezio Melotti added the comment:

os.py starts with:
r"""OS routines for Mac, NT, or Posix depending on what system we're on.
[...]

Do you see only the 'r'?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17456] os.py (unexpected character)

2013-03-18 Thread Anuj Gupta

Anuj Gupta added the comment:

http://docs.python.org/3/tutorial/introduction.html#strings

This seems like a good opportunity for you to learn about "raw" strings. :)

--
nosy: +anuj

___
Python tracker 

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



[issue17456] os.py (unexpected character)

2013-03-18 Thread Christian Heimes

Changes by Christian Heimes :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-18 Thread Popa Claudiu

New submission from Popa Claudiu:

There is a problem with unittest discovering and namespace packages. Given the 
following folder structure, where a namespace package X lies, the following 
command fails with the following error:

-testbug
   - flufl (namespace package with some tests in it, importable with __import__)
  - test_a.py
  - test_b.py


C:\>py -3 -m unittest discover flufl
Traceback (most recent call last):
  File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "C:\Python33\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
  File "C:\Python33\lib\unittest\__main__.py", line 12, in 
main(module=None)
  File "C:\Python33\lib\unittest\main.py", line 124, in __init__
self.parseArgs(argv)
  File "C:\Python33\lib\unittest\main.py", line 144, in parseArgs
self._do_discovery(argv[2:])
  File "C:\Python33\lib\unittest\main.py", line 242, in _do_discovery
self.test = loader.discover(start_dir, pattern, top_level_dir)
  File "C:\Python33\lib\unittest\loader.py", line 205, in discover
start_dir = os.path.abspath(os.path.dirname((the_module.__file__)))
AttributeError: 'module' object has no attribute '__file__'

This happens because TestLoader.discover assumes that the given dotted package 
name has the attribute __file__, which seems to not be true in the case of 
namespace packages. The same error occurs when giving to `discover` a builtin 
module.
The attached patch tries naively to solve this issue, but it assume in 
TestLoader._find_tests that it should iterate over all subfolders (the 
commented line from the patch), unlike the previous way of checking the 
presence of __init__.py file.
Thanks in advance for your response.

--
components: Library (Lib)
files: unittest.patch
keywords: patch
messages: 184450
nosy: Popa.Claudiu
priority: normal
severity: normal
status: open
title: Unittest discover fails with namespace packages and builtin modules
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29441/unittest.patch

___
Python tracker 

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



[issue16575] ctypes: unions as arguments

2013-03-18 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy: +theller

___
Python tracker 

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



[issue17458] Automatic type conversion from set to frozenset

2013-03-18 Thread Jose Antonio Martin H

New submission from Jose Antonio Martin H:

Is it possible to consider the automatic type conversion from set to frozenset 
whenever a set is declared inside a set, as the key of a Counter and as the key 
of a Dict? Tha is, the case when a set is used but a hashable object is 
requested.

Having to deal with typing frozenset every time is very uncomfortable and it is 
quite natural to work with sets of sets.

If you get an exception when trying to create a set of set then why not 
deferring such exception to the case of trying to modify an immutable set?

--
components: Library (Lib)
messages: 184451
nosy: jamartinh
priority: normal
severity: normal
status: open
title: Automatic type conversion from set to frozenset
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue17459] unittest.assertItemsEqual reports wrong order

2013-03-18 Thread Matthijs van der Vleuten

New submission from Matthijs van der Vleuten:

When calling assertItemsEqual(first,second), if the items in a and b differ, 
the AssertionError treats second as the first sequence and first as the second 
sequence.

Repro code:

>>> from unittest.case import TestCase
>>> class Foo(TestCase):
... def runTest(self):
... self.assertItemsEqual([1],[])
... 
>>> Foo().runTest()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in runTest
  File "/usr/lib/python2.7/unittest/case.py", line 899, in assertItemsEqual
self.fail(msg)
  File "/usr/lib/python2.7/unittest/case.py", line 408, in fail
raise self.failureException(msg)
AssertionError: Element counts were not equal:
First has 0, Second has 1:  1

This happens because of this code in unittest/case.py:

def assertItemsEqual(self, expected_seq, actual_seq, msg=None):
# (skip docstring)
first_seq, second_seq = list(actual_seq), list(expected_seq)

list(actual_seq) is assigned to first_seq, even though it's actually the second 
argument.

This would be fixed either by swapping expected_seq and actual_seq in the 
function's arguments, or swapping the assignment of first_seq and second_seq.

--
components: Library (Lib)
messages: 184452
nosy: Zr40
priority: normal
severity: normal
status: open
title: unittest.assertItemsEqual reports wrong order
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue17459] unittest.assertItemsEqual reports wrong order

2013-03-18 Thread Matthijs van der Vleuten

Matthijs van der Vleuten added the comment:

Duplicate of 14832.

--
status: open -> closed

___
Python tracker 

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



[issue1291] test_resource fails on recent linux systems

2013-03-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

The last commit 59292f366b53  was for fixing issue12921 and not this. Wrongly 
linked.

--
nosy: +orsenthil

___
Python tracker 

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



[issue17458] Automatic type conversion from set to frozenset

2013-03-18 Thread Ezio Melotti

Ezio Melotti added the comment:

I think this is python-ideas material.  Automatic conversions are usually not a 
good idea though.

--
nosy: +ezio.melotti
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-03-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Sorry for taking long time to respond. full_url has been in the shape it is for 
many versions, changing it in backwards incompatible way be do more harm than 
good.

- I would be really interested to know why the present form of full_url 
presented any limitation for developing an client? Apart from get_full_url 
there are other ways to get full_url and url associated. Any details on "Why 
this is must"? The explain snippet below gives the assumption on full_url 
setting, I could not get need for change from this. Personally, I am 0 to -1 on 
this too, as in I cannot see a clear need for this change.

--

___
Python tracker 

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



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Sorry, I asked the wrong question; callback_t is a function pointer, so 8 bytes 
is expected.
What is sizeof(myst_args) both in C and Python?

--

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Senthil Kumaran

New submission from Senthil Kumaran:

issue10711 Removed the HTTP 0.9 support in 3.2 and deprecated strict and 
related params in 3.2. It is time to remove those in 3.4.

--
assignee: orsenthil
messages: 184458
nosy: orsenthil, pitrou
priority: normal
severity: normal
status: open
title: Remove the strict and related params completely removing the 0.9 support

___
Python tracker 

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



[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-18 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X

2013-03-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I'm not sure if hw.availcpu is the right value to use as it is not documented 
at all (neither in a manpage, nor in a headerfile).

hw.activecpu seems to be the one that should be used: it is documented as "The 
number of processors currently available for executing threads." in the 
sysctl.h header file and that comment also mentions that it should be used to 
determine the amount of threads to start in an SMP application.

--

___
Python tracker 

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



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Matt Clarke

Matt Clarke added the comment:

Hi Amaury.

They are both 12 bytes.

Matt

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-03-18 Thread Demian Brecht

Demian Brecht added the comment:

No worries.

The change is not backwards incompatible. test_urllib2 test pass without any 
modification (I'm getting a segfault in test_heapq atm so can't run the full 
suite). I've simply moved the side effects cause by __init__ to a setter so 
that full_url may be set after instantiation and will still incur the same 
results as after initial creation.

The biggest problem with this particular attribute and the way that it's 
currently handled is inconsistent with the rest of the class. The only other 
attribute that incurs side effects when set (data) is implemented with 
@property getter and setters. When set, it incurs side effects on the headers 
(removing Content-Length). Unless I'm missing something, other attributes are 
directly mutable and do not incur side effects on instance state when set.

In my mind, if full_url is publicly accessible, then it should be publicly 
accessible /and/ settable. It currently is not without causing invalid state 
within a given Request instance.

--

___
Python tracker 

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



[issue17461] Carole should be Carol in PEP 396

2013-03-18 Thread Ramchandra Apte

New submission from Ramchandra Apte:

In here, "now get it from the Cheeseshop.

Carole maintains several namespace packages,"

--
messages: 184462
nosy: Ramchandra Apte
priority: normal
severity: normal
status: open
title: Carole should be Carol in PEP 396

___
Python tracker 

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



[issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X

2013-03-18 Thread John Szakmeister

John Szakmeister added the comment:

Ronald: it is mentioned in some books (a Google search can turn them up), but 
they don't really offer much description behind the intent.  When I looked into 
this several years ago, it was very unclear what `hw.activecpu` was intended 
for.  It sounded more like a report about how many processors are active, 
versus targetting your SMP aware application to that number.

But since you've turned some information in sysctl.h, I think we should follow 
that advice and use hw.activecpu.  I've attached a new patch with the change.

--
Added file: http://bugs.python.org/file29442/use-activecpu.patch

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Tested this patch and all tests pass.

--
keywords: +patch
Added file: http://bugs.python.org/file29443/17460.patch

___
Python tracker 

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



[issue17453] logging.config.fileConfig error

2013-03-18 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue17409] resource.setrlimit doesn't respect -1

2013-03-18 Thread Paul Price

Paul Price added the comment:

The OSX manpage for setrlimit includes:

COMPATIBILITY
 setrlimit() now returns with errno set to EINVAL in places that histori-
 cally succeeded.  It no longer accepts "rlim_cur = RLIM_INFINITY" for
 RLIM_NOFILE.  Use "rlim_cur = min(OPEN_MAX, rlim_max)".

It's strange that this is not mentioned in the corresponding manpage on Ubuntu 
12.04.

It seems the reason we can't use -1 for RLIMIT_NOFILE is because this requests 
'unlimited' (RLIM_INFINITY), while there is always a limit on the number of 
open files (e.g., OPEN_MAX).

Looking at the code (Modules/resource.c), python is doing the sensible thing.  
It seems that resource.setrlimit would have to be special-cased for 
RLIMIT_NOFILE to work as documented when specifying a "-1", but then python 
would be diverging from the behaviour of the underlying system call.

I therefore propose that the documentation simply be adjusted to note the 
observed behaviour (i.e., specifying -1 means 'unlimited', and does not work in 
general for RLIMIT_NOFILE).  I would be happy to provide a patch if this is 
desired.

--

___
Python tracker 

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



[issue17461] Carole should be Carol in PEP 396

2013-03-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

http://hg.python.org/peps/rev/dee47f9b87a4

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17455] ImportError (xml.dom.minidom) in /usr/lib/python2.7/dist-packages/apport/report.py

2013-03-18 Thread Christian Heimes

Christian Heimes added the comment:

apport and sqlalchemy are both third-party extensions. apport is a part of 
Debian's / Ubuntu's Python infrastructure. There is nothing we can do about the 
two issues.

--
nosy: +christian.heimes
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread anatoly techtonik

New submission from anatoly techtonik:

http://stackoverflow.com/questions/3217673/why-use-argparse-rather-than-optparse

Too many votes. This should be confirmed by the official documentation.

--
assignee: docs@python
components: Documentation
messages: 184468
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: argparse FAQ: how it is different from optparse

___
Python tracker 

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



[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread Andrew Svetlov

Andrew Svetlov added the comment:

The patch is welcome

--
nosy: +asvetlov

___
Python tracker 

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



[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread Ezio Melotti

Ezio Melotti added the comment:

Is http://docs.python.org/dev/library/argparse.html#upgrading-optparse-code not 
enough?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread anatoly techtonik

anatoly techtonik added the comment:

@asvetlov: I still don't have the answer which licence - Academic Free License 
v2.1 or Apache 2.0 should I choose to license my patches. What is the 
difference?

Ezio: It explains what you should replace, but doesn't explain why.

--
versions: +Python 2.7, Python 3.3

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-03-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Hi Sven, I was about to apply this (sorry for the delay), and I realized 
there's one more thing. We have an example AST unparser in Tools/parser that 
needs to be updated for AST changes. You can run it's test suite by running 
test_tools in the main test suite.

--

___
Python tracker 

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



[issue17463] Fix test discovery for test_pdb.py

2013-03-18 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: asvetlov
priority: normal
severity: normal
status: open
title: Fix test discovery for test_pdb.py
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue17463] Fix test discovery for test_pdb.py

2013-03-18 Thread Roundup Robot

New submission from Roundup Robot:

New changeset 50af6682c6a7 by Andrew Svetlov in branch '3.3':
Issue #17463: Fix test discovery for test_pdb.py
http://hg.python.org/cpython/rev/50af6682c6a7

New changeset 30530f6c24bb by Andrew Svetlov in branch 'default':
Issue #17463: Fix test discovery for test_pdb.py
http://hg.python.org/cpython/rev/30530f6c24bb

--
nosy: +python-dev

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be in 3.4 an exception should be raised? HTTPConnection('python.org', 80, 
False) now silently returns wrong result.

--
components: +Library (Lib)
nosy: +serhiy.storchaka
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.4

___
Python tracker 

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



[issue17463] Fix test discovery for test_pdb.py

2013-03-18 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann

Changes by Matt Bachmann :


Added file: http://bugs.python.org/file29444/acks.patch

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-03-18 Thread Sven Brauch

Sven Brauch added the comment:

Hi Benjamin,

the delay is not a problem -- as long as this is in time for Python 3.4, 
everything is fine.

Attached is a patch which adjusts the unparser to the changes. Acoording to the 
tests, this is all that needs to be updated.

Cheers,
Sven

--
Added file: http://bugs.python.org/file29445/81302-adjust-unparser.diff

___
Python tracker 

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



[issue12160] codecs doc: what is StreamCodec?

2013-03-18 Thread Nick Weinhold

Nick Weinhold added the comment:

I've noticed that this issue hasn't been looked at in a while, and from looking 
through the current docucmentation, it looks like this issue still exists. 

I've uploaded a patch with the changes that Marc-Andre mentioned.

--
nosy: +ncweinhold
Added file: http://bugs.python.org/file29446/codecs_docs.patch

___
Python tracker 

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



[issue17450] Failed to build _sqlite3

2013-03-18 Thread Christina Chan

Christina Chan added the comment:

Hi,

I am new to python and I am actually running script developed by others using 
python. So,
In order for the script to use SQLite, does it means that it will have import 
SQLite in the script or how could one tell if SQLite is needed?

For the build dependencies, as the make is successful other than SQLite, does 
it means to execute both yum line and then re-execute make again?

Thanks.

Christina

On Mar 18, 2013, at 3:20 AM, Ezio Melotti  wrote:

> 
> Ezio Melotti added the comment:
> 
> The module is not needed (unless you are planning to use sqlite), so you can 
> simply ignore the warning.  See also 
> http://docs.python.org/devguide/setup.html#build-dependencies.
> 
> --
> nosy: +ezio.melotti
> resolution:  -> invalid
> stage:  -> committed/rejected
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase

klappnase added the comment:

Update: I just tried Python-3.3.0 on WinXP, the same error, so it is obviously 
_not_ a bug specific to the debian python install.

--

___
Python tracker 

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



[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

This has the test in the wrong place and I am actively expanding it. I will 
reopen later today.

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

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7c5c678e4164 by Benjamin Peterson in branch 'default':
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
http://hg.python.org/cpython/rev/7c5c678e4164

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 219c997b880b by Benjamin Peterson in branch 'default':
add Sven Brauch for his #16795 contribution
http://hg.python.org/cpython/rev/219c997b880b

--

___
Python tracker 

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



[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

2013-03-18 Thread Lukas Lueg

Lukas Lueg added the comment:

Another proposal: Add a new BaseClass that, if inherited from, causes an 
exception to be uncatchable (e.g. class HardMemoryError(MemoryError, 
UncatchableException)).

--

___
Python tracker 

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



[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks similar to issue16809 and requires a similar solution.

--

___
Python tracker 

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



[issue5024] sndhdr.whathdr returns -1 for WAV file frame count

2013-03-18 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

Added bytes literal 'b', made it a real patch, changed test to account for WAV 
files actually returning number of frames from this function.

--
keywords: +patch
nosy: +n
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file29447/issue5024.diff

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-03-18 Thread Sven Brauch

Sven Brauch added the comment:

Thanks for reviewing this, and thanks for guiding me through the implementation 
process. ;)

--

___
Python tracker 

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



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Changes by Matt Bachmann :


--
components: +Tests
type:  -> enhancement

___
Python tracker 

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



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

New submission from Matt Bachmann:

Adds some test coverage to pydoc.

--
files: pydoctests.patch
keywords: patch
messages: 184486
nosy: Matt.Bachmann
priority: normal
severity: normal
status: open
title: Improve Test Coverage Of Pydoc
versions: Python 3.5
Added file: http://bugs.python.org/file29448/pydoctests.patch

___
Python tracker 

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



[issue17445] Return the type you accept

2013-03-18 Thread Greg Ward

Greg Ward added the comment:

The original reproduction I posted was incorrect -- it makes difflib look worse 
than it should. (I passed strings rather than lists of strings.) Here is a more 
accurate version:

>>> import difflib
>>> a = [b'hello']
>>> b = [b'hello!']
>>> '\n'.join(line for line in difflib.unified_diff(a, b))
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
  File "/home/greg/src/cpython/3.3/Lib/difflib.py", line 1223, in unified_diff
yield '-' + line
TypeError: Can't convert 'bytes' object to str implicitly

So it still crashes, but the exception makes it pretty clear what the problem 
is.

--

___
Python tracker 

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



[issue1745722] please add wsgi to SimpleXMLRPCServer

2013-03-18 Thread Sanjeev Paskaradevan

Changes by Sanjeev Paskaradevan :


--
nosy: +Sanjeev

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-18 Thread Mark Dickinson

Mark Dickinson added the comment:

I'd suggest less generic names for the temporary variables, just to minimise 
the chance of accidental name collisions.  _py_xincref_tmp and _py_xdecref_tmp, 
perhaps?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue17465] Gut devinabox

2013-03-18 Thread Brett Cannon

New submission from Brett Cannon:

While devinabox was originally designed such that anyone running a core dev 
sprint could have an easy way to grab everything, it has turned out only core 
devs end up using it. That makes having a script to do checkouts, builds, etc. 
is overkill.

What devinabox should become instead is a README listing what people should 
checkout/download and build. Probably the only other file should be a shell 
script to do the thorough coverage.py run as found at 
http://docs.python.org/devguide/coverage.html#coverage-results-for-modules-imported-early-on
 since it's the most touchy. This would also allow for ripping out the details 
from the devguide and just point to the shell script at hg.python.org.

--
assignee: brett.cannon
messages: 184489
nosy: brett.cannon, ncoghlan, r.david.murray
priority: low
severity: normal
stage: needs patch
status: open
title: Gut devinabox

___
Python tracker 

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



[issue17445] Return the type you accept

2013-03-18 Thread Greg Ward

Greg Ward added the comment:

Replying to Terry Reedy:
> So a dual string/bytes function would not be completely trivial.

Correct. I have one working, but it makes my eyes bleed. I fail ashamed to have 
written it.

> Greg, can you convert bytes to strings, or strings to bytes

Nope. Here is the hypothetical use case: I have a text file written in Polish 
encoded in ISO-8859-1 committed to a Mercurial repository. (Or saved in a 
filesystem somewhere: doesn't really matter, except that Mercurial repositories 
are immutable, long-term, and *must* *not* *lose* *data*.) Then I decide I 
should play nicely with the rest of the world and transcode to UTF-8, so commit 
a new rev in UTF-8.

Years later, I need to look at the diff between those two old revisions. Rev 1 
is a pile of ISO-8859-2 bytes, and rev 2 is a pile of UTF-8 bytes. The output 
of diff looks like

  - blah blah [iso-8859-2 bytes] blah
  + blah blah [utf-8 bytes] blah

Note this: the output of diff has some lines that are iso-8859-2 bytes and some 
that are utf-8 bytes. *There is no single encoding* that applies.

Note also that diff output must contain the exact original bytes, so that it 
can be consumed by patch. Diffs are read both by humans and by machines.

> Otherwise, I think it might be better to write a new function 
> 'unified_diff_bytes' that did exactly what you want than to try to 
> make unified_diff accept sequences of bytes.

Good idea. That might be much less revolting than what I have now. I'll give it 
a shot.

--

___
Python tracker 

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



[issue17358] imp.load_module() leads to the improper caching of the 'file' argument

2013-03-18 Thread Kushal Das

Kushal Das added the comment:

Working on a patch for this.

--
nosy: +kushaldas

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-18 Thread Illia Polosukhin

Illia Polosukhin added the comment:

That names were my first idea - but then I saw Py_CLEAR uses _py_tmp variable I 
used it.

Should I replace in Py_CLEAR to _py_clear_tmp as well?

--

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I don't know what is the best way to raise an Exception when we are deprecating 
an argument.

1. The options are type checking on timeout parameter and then raising an 
error. This does not look good to me.
2. Making the rest of the arguments as keyword only arguments in order to 
prevent people doing mistakes. I am okay with this, people upgrading from 3.3, 
will face a problem if they already dont have a keyword only argument.

--

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-18 Thread Mark Dickinson

Mark Dickinson added the comment:

Ignore me; I don't know what I was thinking.  _py_tmp is fine.  There's no  
issue with name clashes.

--

___
Python tracker 

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



[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase

klappnase added the comment:

Yes, I happen to encounter these TclObjects occasionally, e.g. (not tested with 
the latest python):

$ python3
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
>>> from tkinter import ttk
>>> r=Tk()
>>> p=ttk.Progressbar(r)
>>> p.cget('mode')

>>> print(p.cget('mode'))
determinate
>>> p.cget('mode') == 'determinate'
False
>>> str(p.cget('mode')) == 'determinate'
True
>>> 

In Python2 the easiest way to work around this imho is to set wantobjects to 0, 
however this does not seem to work in Python3 anymore, not sure if this is for 
some reason intentional or deserves another bug report:

$ python3
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.wantobjects = 0
>>> from tkinter import ttk
>>> r=tkinter.Tk()
>>> p=ttk.Progressbar(r)
>>> p.cget('mode')
''
>>>

To be honest, since these TclObjects never seem to work reliably I had 
preferred it a lot if they would have been turned off by default.

--

___
Python tracker 

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



[issue17053] pydoc should use inspect.signature instead of inspect.getfullargspec

2013-03-18 Thread Sean Reifschneider

Sean Reifschneider added the comment:

This may be related to: http://bugs.python.org/issue17424

Perhaps there is a common fix that can address this for both?

--
nosy: +jafo

___
Python tracker 

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



[issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC

2013-03-18 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

Check if sys.platform == 'win32', if so, skip test.

--
keywords: +patch
nosy: +n
versions: +Python 3.4 -Python 2.7
Added file: http://bugs.python.org/file29449/issue5051.diff

___
Python tracker 

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



[issue17358] imp.load_module() leads to the improper caching of the 'file' argument

2013-03-18 Thread Kushal Das

Kushal Das added the comment:

Can not reproduce it :(

--

___
Python tracker 

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



[issue17424] help() should use the class signature

2013-03-18 Thread Sean Reifschneider

Sean Reifschneider added the comment:

This might be a duplicate of issue17053, but the patch provided there doesn't 
resolve the issue, at least as far as I know it.  Here is an example, from 
David Beazley's talk at PyCon 2013:

from inspect import Parameter, Signature

def make_signature(names):
   return Signature(
 Parameter(name, Parameter.POSITIONAL_OR_KEYWORD) for name in names)

class Structure:
   __signature__ = make_signature([])
   def __init__(self, *args, **kwargs):
  bound = self.__signature__.bind(*args, **kwargs)
  for name, val in bound.arguments.items():
 setattr(self, name, val)

class Stock(Structure):
   __signature__ = make_signature(['name', 'shares', 'price'])

pyth = Stock('PYTH', 100, 50)
help(pyth.__init__)

Which produces:

__init__(self, *args, **kwargs) method of __main__.Stock instance

Instead of:

__init__(self, name, shares, price) method of __main__.Stock instance

--
type:  -> behavior

___
Python tracker 

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



[issue2943] Distutils should generate a better error message when the SDK is not installed

2013-03-18 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

Improved msg per discussion.

I don't see how to test this without messing with the windows registry. I am 
deeply reluctant to do that.

--
keywords: +patch
nosy: +n
Added file: http://bugs.python.org/file29450/issue2943.diff

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Georgiy Treyvus

New submission from Georgiy Treyvus:

The conditions under which this bug occurs I can't explain. I will provide as 
much other information as I can.

This is an issue with both Python2 and Python3. More specifically Python 2.7.3 
and Python 3.2.3 as those are what come with the Fedora 17 repositories. Not 
that it matters I made sure my program is written portably and so works on 
both. This involved stunts like:

if sys.version_info[0]==2:
input=raw_input

Getting back to the point since strings in Python are immutable I instead have 
code that tries to assign a character string to a list of one character strings 
at a given index in that list. Now normally this works quite splendidly. For 
example:

[georgiy@PANTHER mess]$ python
Python 2.7.3 (default, Jul 24 2012, 10:05:38) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> l=list('test')
>>> l
['t', 'e', 's', 't']
>>> l[0]='b'
>>> l
['b', 'e', 's', 't']
>>> 
[georgiy@PANTHER mess]$ python3
Python 3.2.3 (default, Jun  8 2012, 05:36:09) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> l=list('test')
>>> l
['t', 'e', 's', 't']
>>> l[0]='b'
>>> l
['b', 'e', 's', 't']
>>> 
[georgiy@PANTHER mess]$ 

See all is well.

However when I attempt to do the same exact thing namely assign a one character 
string to a list of one character strings at a given index in that list I get 
an error.

Here's what happens when I run my program:

[georgiy@PANTHER mess]$ python gcipher.py

Enter a command. Valid ones are "encrypt", "decrypt", and "exit".
command: encrypt

Enter plaintext. Only alphabetic characters allowed.
plaintext: secretmessagehere

Enter the encryption key. Only alphabetic characters allowed.
key: secretkeyhere

The encrypted version of your input with the given key is:
Traceback (most recent call last):
  File "gcipher.py", line 214, in 
print(encrypt(inText,encryptionKey))
  File "gcipher.py", line 127, in encrypt
letters[index]=letterAdd(letters[index],keystream[index])
TypeError: 'str' object does not support item assignment
[georgiy@PANTHER mess]$ python3 gcipher.py

Enter a command. Valid ones are "encrypt", "decrypt", and "exit".
command: encrypt

Enter plaintext. Only alphabetic characters allowed.
plaintext: secretmessagehere

Enter the encryption key. Only alphabetic characters allowed.
key: secretkeyhere

The encrypted version of your input with the given key is:
Traceback (most recent call last):
  File "gcipher.py", line 214, in 
print(encrypt(inText,encryptionKey))
  File "gcipher.py", line 127, in encrypt
letters[index]=letterAdd(letters[index],keystream[index])
TypeError: 'str' object does not support item assignment
[georgiy@PANTHER mess]$ 


Anyway here is the final proof that we have a bug here and that I am not a 
complete moron that assigned to a string. It says there's a problem on line 
127. Well here are are few very relevant lines 120-126 right before 127 you 
might want to take a look at:

assert(type(plaintext)==str)
letters=list(plaintext) 
assert(type(letters)==list)
assert(type(letters[0])==str)
assert(len(letters[0])==1)
for roundNumber in range(17):
for index in range(plaintextLength):

The point is that all the assertions in the above assert statements held true. 
No AssertionErrors were raised. What was instead raised is a TypeError because 
Python thought I was assigning to an index in a string. Yet clearly right 
before that we have asserted that the variable "letters" is bound to a list 
type. And in line 127 I was assigning a one character string to an index in 
"letters" which again is a list and not a string.

Please look into this. If you need more information let me know and I will do 
my best to provide it. If you want I can also provide you folks with the 
complete source code if you feel it will help you. (I do warn in advance that 
it is quite messy/hacky/unPythonic to the point of me quite possibly becoming 
the laughingstock of the Python developer community. Of course considering the 
rather complicated nature of the transformations made on text during 
(en|de)cryption I'd like to see any critics do it better. Please do not laugh 
too hard when I show it.)

--
components: Interpreter Core
messages: 184501
nosy: wfatp
priority: normal
severity: normal
status: open
title: I can't make assignments to a list.

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Ezio Melotti

Ezio Melotti added the comment:

Have you tried to print "letters" and see what it is?  Have you verified that 
the asserts are executed?
You are probably doing something wrong, and it would be better to ask this on 
python-list.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Radu Voicilas

Radu Voicilas added the comment:

Hi,

Here are some small comments to your otherwise good to have patch:

-- assertEquals has been deprecated in favor of assertEqual, and usually it's 
great to be consistent across the test suite
-- likewise maxDiff should be max_diff mainly because of consistency and 
because of pep8's naming styles
-- self.temp_dir is never cleaned up (on tearDown maybe?) and gettempdir() 
doesn't really look like a good option; maybe you wanted to create a new 
temporary directory rather than pointing to the filesystem's tmp dir ?
-- the patch doesn't apply cleanly, at least for me - the ACKS hunk is failing 
for me

--
nosy: +raduv

___
Python tracker 

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



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

Sure thing, ill make the improvements and upload a new patch. Thanks!

--

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Georgiy Treyvus

Georgiy Treyvus added the comment:

Yes the assert statements are executed. They are not in any sort of if block or 
anything like that. When the encrypt function is called and it was in the above 
examples the assert statements execute period. They really don't have much else 
of a choice. Look at the attached source code and see for yourself.

--
Added file: http://bugs.python.org/file29451/gcipher.py

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Mark Dickinson

Mark Dickinson added the comment:

doQuadraticDistortion returns a string.  Closing as invalid.

--
nosy: +mark.dickinson
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

--Changes assertequals to assertequal
--Removes maxdiff as it should not really be there in the first place
--Creates an explicit testdir, and cleans it up
--Last patch did not actually apply cleanly... I reverted and applied this one 
and this seems to work

--
Added file: http://bugs.python.org/file29452/pydoc_tests_v2.patch

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Mark Dickinson

Mark Dickinson added the comment:

Sorry; that was a bit terse.  To elaborate:  on the first iteration of your for 
loop in the 'encrypt' function, you're correct that letters has type 'list'.  
But on the second iteration, it'll have type 'str', because the line 
"letters=doQuadraticDistortion(letters)" returns a string.  Try moving the 
asserts inside the for loop and you'll see them fail.

--

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Georgiy Treyvus

Georgiy Treyvus added the comment:

wait why was this closed?

--

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Georgiy Treyvus

Georgiy Treyvus added the comment:

ok will try

--

___
Python tracker 

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



[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2013-03-18 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Here is a patch for 2.7
Since 2.7 doesn't have pytime.c, we export floattime() as _Py_floattime out of 
time.c

--
Added file: http://bugs.python.org/file29453/socket.patch

___
Python tracker 

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



[issue17467] Enhancement: give mock_open readline() and readlines() methods

2013-03-18 Thread Toshio Kuratomi

New submission from Toshio Kuratomi:

unittest.mock provides a mock_open convenience function[1].  The convenience 
function handled file.read() but does not handle file.readline() or 
file.readlines().  I'll attach a patch that adds support for both of these 
methods.

[1]: http://docs.python.org/3/library/unittest.mock.html#mock-open

--
files: python3-mock_open-methods.patch
keywords: patch
messages: 184512
nosy: a.badger
priority: normal
severity: normal
status: open
title: Enhancement: give mock_open readline() and readlines() methods
versions: Python 3.3
Added file: http://bugs.python.org/file29454/python3-mock_open-methods.patch

___
Python tracker 

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



[issue17466] I can't make assignments to a list.

2013-03-18 Thread Georgiy Treyvus

Georgiy Treyvus added the comment:

@Mark: You're right. Sorry for the erroneous bug report.

--
resolution: invalid -> 
status: closed -> open

___
Python tracker 

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



[issue17192] libffi-3.0.12 import

2013-03-18 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue17468] Generator memory leak

2013-03-18 Thread Anssi Kääriäinen

New submission from Anssi Kääriäinen:

A generator is leaked to gc.garbage in a situation where `__del__` isn't 
defined. See the attached file for as-minimalistic test case as I could make. 
Tested on Python 3.3.0, 3.2.3 and 2.7.3.

Note that if the try-except is removed from iterator(), then there is no leak.

This is related to Django bug #19895 
(https://code.djangoproject.com/ticket/19895).

--
files: test.py
messages: 184515
nosy: Anssi.Kääriäinen
priority: normal
severity: normal
status: open
title: Generator memory leak
type: resource usage
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file29455/test.py

___
Python tracker 

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



[issue7573] Position independent include of Python.h

2013-03-18 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

Should this be closed?

--
nosy: +n

___
Python tracker 

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



[issue1691387] Call sys.except_hook if exception occurs in __del__

2013-03-18 Thread R. David Murray

R. David Murray added the comment:

Re-reported and fixed in issue 7317.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage: test needed -> committed/rejected
status: open -> closed
superseder:  -> Display full tracebacks when an error occurs asynchronously

___
Python tracker 

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



[issue17469] Fix sys.getallocatedblocks() when running on valgrind

2013-03-18 Thread Piotr Ożarowski

New submission from Piotr Ożarowski:

[Forwarding patch from Julien Cristau ]

_Py_AllocatedBlocks was never incremented in PyObject_Malloc(), but
would still be decremented on failure or in PyObject_Free().

--
components: Interpreter Core
files: obmalloc.patch
keywords: patch
messages: 184517
nosy: piotr
priority: normal
severity: normal
status: open
title: Fix sys.getallocatedblocks() when running on valgrind
Added file: http://bugs.python.org/file29456/obmalloc.patch

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Serhiy - Had a chat with Thomas Wouters and realized that just removing the 
strict is a best way to go. We have been issuing Deprecation warning for 2 
releases now and it should have given enough time for folks to make the changes.

--

___
Python tracker 

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



[issue17423] libffi on 32bit is broken on linux

2013-03-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'm taking care of this with a libffi update per #17192 and #19245.  Thanks for 
the upstream fix into libffi 3.0.13 alex. :)

--
nosy: +gregory.p.smith
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue17423] libffi on 32bit is broken on linux

2013-03-18 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
superseder:  -> ctypes libffi needs to align the x86 stack to 16 bytes

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2013-03-18 Thread Honest Abe

Honest Abe added the comment:

I have been researching this due to the recurring recommendations, on 
stackoverflow.com, to use the queue.Queue + after() technique when using 
multiple threads.

———

>From comments in _tkinter.c:

The Tcl interpreter is only valid in the thread that created it, 
and all Tk activity must happen in this thread, also. 
That means that the mainloop must be invoked in the thread that
created the interpreter. Invoking commands from other threads is possible; 
_tkinter will queue an event for the interpreter thread, which will then 
execute the command and pass back the result. If the main thread is not in the 
mainloop, and invoking commands causes an exception; if the main loop is 
running but not processing events, the command invocation will block.

http://hg.python.org/cpython/file/ef8ea052bcc4/Modules/_tkinter.c#l174

/* This is the main entry point for calling a Tcl command.
It supports three cases, with regard to threading:
1. Tcl is not threaded: Must have the Tcl lock, then can invoke command in
the context of the calling thread.
2. Tcl is threaded, caller of the command is in the interpreter thread:
Execute the command in the calling thread. Since the Tcl lock will
not be used, we can merge that with case 1.
3. Tcl is threaded, caller is in a different thread: Must queue an event to
the interpreter thread. Allocation of Tcl objects needs to occur in the
interpreter thread, so we ship the PyObject* args to the target thread,
and perform processing there. */

http://hg.python.org/cpython/file/ef8ea052bcc4/Modules/_tkinter.c#l1314

———

The following quote seems to imply that it is thread safe:

"Invoking commands from other threads is possible;
_tkinter will queue an event for the interpreter thread, 
which will then execute the command and pass back the result."

But... Allen B. Taylor, author of mtTkinter, states:

The problems stem from the fact that the _tkinter module attempts to gain 
control of the main thread via a polling technique when processing calls from 
other threads. If it succeeds, all is well. If it fails (i.e., after a 
timeout), the application receives an exception with the message: 
"RuntimeError: main thread is not in main loop".

http://tkinter.unpythonic.net/wiki/mtTkinter

This seems to be somewhat validated by the first quote from the source code.
However, the statement "main thread is not in main loop"
seems backwards to me. Wouldn't a loop be in a thread?
How can the thread that spawned the mainloop ever be inside of the mainloop? 
Note that all of my experience is with Python, not C.

--
nosy: +Honest Abe

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c9bf987d80f1 by Senthil Kumaran in branch 'default':
#17460: Remove the strict argument of HTTPConnection and removing the
http://hg.python.org/cpython/rev/c9bf987d80f1

--
nosy: +python-dev

___
Python tracker 

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



  1   2   3   >