You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) #48293
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2008-10-15.21:06:11.145>created_at=<Date2008-10-04.22:30:08.827>labels= ['expert-IDLE', 'type-bug']
title='Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)'updated_at=<Date2008-10-15.21:06:11.122>user='https://bugs.python.org/craigh'
In Python 2.6, attempting to import depecated modules in IDLE raises a
TypeError exception. I verified this with sets, mimify, and MimeWriter.
Here's the output for sets:
>> import sets
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>import sets
File "C:\Python26\Lib\sets.py", line 85, in <module>
stacklevel=2)
File "C:\Python26\Lib\warnings.py", line 29, in _show_warningfile.write(formatwarning(message, category, filename, lineno, line))
TypeError: idle_formatwarning_subproc() takes exactly 4 arguments (5 given)
The other modules give a similar trace.
Normally, I wouldn't consider this a serious issue, but there are some
major packages out there that still use deprecated modules such as
these. For example, MySQLdb 1.2.2 and SQLAlchemy 4.7p1 import the sets
module so they can't be used at all in IDLE.
changed the title [-]Attempting to import deprecated modules in IDLE raises TypeError[/-][+]Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)[/+]on Oct 4, 2008
craigh commented on Oct 5, 2008
craighmannequin
MannequinAuthor
More actions
I should have checked this more carefully, but apparently you can still
use the imported module after the exception.
craigh commented on Oct 5, 2008
craighmannequin
MannequinAuthor
More actions
Okay, I think I've got it now:
If you import sets, it raises TypeError. However, if you import it a
second time, it seems to work properly.
Trying to import a module that relies on the deprecated module (ie,
sqlalchemy) fails no matter how many times it's imported.
Activity
craigh commentedon Oct 4, 2008
In Python 2.6, attempting to import depecated modules in IDLE raises a
TypeError exception. I verified this with sets, mimify, and MimeWriter.
Here's the output for sets:
The other modules give a similar trace.
Normally, I wouldn't consider this a serious issue, but there are some
major packages out there that still use deprecated modules such as
these. For example, MySQLdb 1.2.2 and SQLAlchemy 4.7p1 import the sets
module so they can't be used at all in IDLE.
craigh commentedon Oct 4, 2008
Actually, it looks like ANY warning will raise this error in IDLE. For
example:
[-]Attempting to import deprecated modules in IDLE raises TypeError[/-][+]Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)[/+]craigh commentedon Oct 5, 2008
I should have checked this more carefully, but apparently you can still
use the imported module after the exception.
craigh commentedon Oct 5, 2008
Okay, I think I've got it now:
If you import sets, it raises TypeError. However, if you import it a
second time, it seems to work properly.
Trying to import a module that relies on the deprecated module (ie,
sqlalchemy) fails no matter how many times it's imported.
russblau commentedon Oct 15, 2008
This error is caused by line 27 in run.py:
needs to be changed to --
so that the function signature matches that of warnings.formatwarning
benjaminp commentedon Oct 15, 2008
Fixed in r66905.