Python-Dev
Threads by month
- ----- 2024 -----
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
January 2008
- 119 participants
- 135 discussions
Neal Norwitz wrote:
>> For codeobject.c, line 327 should not be reachable.
...
Christian Heimes wrote:
> Please suppress the warning. I removed the last
> two lines and GCC complained ...
Either way, it would be worth adding a comment to the source code so
this doesn't come up again.
-jJ
1
0
Hi all,
I am fairly new to the Python community so please forgive me (and
correct me) if I am going about this wrong.
I think it would be convenient and pythonic if dict objects
implemented the PySequence_Concat method. I see there was once a
short-lived discussion about this here:
http://mail.python.org/pipermail/patches/2004-March/014323.html
I have also been following the discussion about contributing to
Python. It seems to me that this would be a fairly easy feature to
implement (perhaps naively?), and I would be glad to try writing a
patch for this if there is at least some chance of it making it into
one of the branches. Can someone please advise me on what the correct
order for going about this would be? Do I need to first write a PEP
justifying why I think it would be an improvement? Which version of
Python (if any), should a patch be targeted at?
Otherwise, is there a good reason dicts do not already implement this
method? I somewhat understand the complaint about commutativity, but
as mentioned in the previous discussion, list concatenation is not
commutative either. Seeing as update is the only builtin method for
concatenation of dicts in the first place, it doesn't seem all that
confusing that 'summing' two dicts should conveniently return a new
instance that is the (only form of) concatenation of the two dicts.
regards,
jared
1
0
ACTIVITY SUMMARY (01/04/08 - 01/11/08)
Tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue
number. Do NOT respond to this message.
1323 open (+31) / 11946 closed (+18) / 13269 total (+49)
Open issues with patches: 436
Average duration of open issues: 674 days.
Median duration of open issues: 951 days.
Open Issues Breakdown
open 1309 (+31)
pending 14 ( +0)
Issues Created Or Reopened (51)
_______________________________
documentation on metaclasses is incomplete and misleading 01/05/08
CLOSED http://bugs.python.org/issue1734 reopened georg.brandl
filecmp.dircmp does exact match only 01/04/08
http://bugs.python.org/issue1738 created flxkid
Testing CIA.vc 01/05/08
CLOSED http://bugs.python.org/issue1739 created loewis
use unittest for test_logging 01/06/08
http://bugs.python.org/issue1740 created pitrou
patch
.pypirc not found on windows 01/06/08
http://bugs.python.org/issue1741 created gerdus
os.path.relpath fails when path == start 01/06/08
CLOSED http://bugs.python.org/issue1742 created townerj
IDLE fails to launch 01/06/08
http://bugs.python.org/issue1743 created richjtd
readline module - set/get quote delimiters 01/06/08
http://bugs.python.org/issue1744 created loic
patch
Backport of PEP 3102 "keyword-only arguments" to 2.6 01/06/08
http://bugs.python.org/issue1745 created robin.stocker
patch
ZIP files with archive comments longer than 4k not recognized as 01/06/08
http://bugs.python.org/issue1746 created alanmcintyre
issubclass(NotSubclassOfObject, InstanceOfAbcMeta) fails instead 01/06/08
CLOSED http://bugs.python.org/issue1747 created jyasskin
patch
contextlib.contextmanager does not use functools.wraps 01/06/08
http://bugs.python.org/issue1748 created pitrou
Test: This is title 01/06/08
CLOSED http://bugs.python.org/issue1750 created loewis
Fast BytesIO implementation + misc changes 01/07/08
http://bugs.python.org/issue1751 created alexandre.vassalotti
patch
logging.basicConfig misleading behaviour 01/07/08
CLOSED http://bugs.python.org/issue1752 created imax
TextIOWrapper.write writes utf BOM for every string 01/07/08
CLOSED http://bugs.python.org/issue1753 created erickt
WindowsError messages are not properly encoded 01/07/08
http://bugs.python.org/issue1754 created Romulo A. Ceccon
Misspelling in future.c in 2.5.1 source (handl should be handle) 01/07/08
CLOSED http://bugs.python.org/issue1755 created brad
-m broken in trunk 01/07/08
CLOSED http://bugs.python.org/issue1756 created gvanrossum
Decimal hash depends on current context 01/07/08
CLOSED http://bugs.python.org/issue1757 created marketdickinson
Wrong link in documentation 01/07/08
CLOSED http://bugs.python.org/issue1758 created martin.marcher
Backport of PEP 3129 "class decorators" 01/08/08
http://bugs.python.org/issue1759 created tiran
patch
PEP 341 is not reflected in the documentation 01/08/08
http://bugs.python.org/issue1760 created Yinon
Bug in re.sub() 01/08/08
CLOSED http://bugs.python.org/issue1761 created jmravon
Inheriting from ABC slows Decimal down. 01/08/08
http://bugs.python.org/issue1762 created jyasskin
Winpath module - easy access to Windows directories like My Docu 01/08/08
http://bugs.python.org/issue1763 created tiran
patch
Remove cmp parameter to list.sort() and builtin.sorted() 01/09/08
http://bugs.python.org/issue1771 created gvanrossum
popen fails when there are two or more pathnames/parameters with 01/09/08
http://bugs.python.org/issue1772 created shoermann
Reference to Python issue tracker incorrect 01/09/08
CLOSED http://bugs.python.org/issue1773 created aioryi
Reference to New style classes documentation is incorrect 01/09/08
CLOSED http://bugs.python.org/issue1774 created aioryi
filehandle.write() does not return None (Python 3.0a2) 01/09/08
http://bugs.python.org/issue1775 created aroberge
__import__ must not accept filenames 01/09/08
CLOSED http://bugs.python.org/issue1776 created tiran
ElementTree/cElementTree findtext inconsistency 01/09/08
http://bugs.python.org/issue1777 created gmonroe
SyntaxError.offset sometimes wrong 01/09/08
http://bugs.python.org/issue1778 created AchimGaedke
int("- 1") is valud, but float("- 1") isn't. Which is right? 01/10/08
http://bugs.python.org/issue1779 created gvanrossum
Decimal constructor accepts newline terminated strings 01/10/08
http://bugs.python.org/issue1780 created marketdickinson
ConfigParser: add_section('DEFAULT') causes duplicate sections. 01/10/08
http://bugs.python.org/issue1781 created tlesher
PyModule_AddIntConstant and PyModule_AddStringConstant can leak 01/10/08
http://bugs.python.org/issue1782 created hniksic
nonexistent data items declared as exports in sysmodule.h 01/10/08
http://bugs.python.org/issue1783 created jlaurila
Error with OptionParser.parse_args() 01/10/08
CLOSED http://bugs.python.org/issue1784 created draghuram
"inspect" gets broken by some descriptors 01/10/08
http://bugs.python.org/issue1785 created dmaurer
pdb should set stdin+stdout around exec call 01/11/08
http://bugs.python.org/issue1786 created gvanrossum
patch
segfault in obmalloc.c 01/11/08
CLOSED http://bugs.python.org/issue1787 created ctheune
Outdated link in the tutorial 01/11/08
CLOSED http://bugs.python.org/issue1788 created spe-anatol
incorrect assumption about unsigned long byte size 01/11/08
http://bugs.python.org/issue1789 created spe-anatol
xmlrpclib ServerProxy page has out-of-date content 01/11/08
http://bugs.python.org/issue1790 created vilya
The Library Reference still refers to the old bug tracker. 01/11/08
CLOSED http://bugs.python.org/issue1791 created vilya
o(n*n) marshal.dumps performance for largish objects with patch 01/11/08
http://bugs.python.org/issue1792 created aaron_watters
patch
ctypes.util.find_msvcrt() function 01/11/08
http://bugs.python.org/issue1793 created theller
patch
Hot keys must work in any keyboard layout 01/11/08
http://bugs.python.org/issue1794 created Nashev
logging: need a way to discard Logger objects 01/06/08
http://bugs.python.org/issue932563 reopened georg.brandl
Issues Now Closed (349)
_______________________
2to3 crashes on input files with no trailing newlines 136 days
http://bugs.python.org/issue1001 admin
pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat) 134 days
http://bugs.python.org/issue1020 admin
Tkinter binding involving Control-spacebar raises unicode error 133 days
http://bugs.python.org/issue1028 admin
patch
py3k _bsddb.c patch to use the new buffer API 133 days
http://bugs.python.org/issue1036 admin
patch
Ill-coded identifier crashes python when coding spec is utf-8 132 days
http://bugs.python.org/issue1037 admin
[py3k] pdb does not work in python 3000 132 days
http://bugs.python.org/issue1038 admin
ssl.py shouldn't change class names from 2.6 to 3.x 129 days
http://bugs.python.org/issue1065 admin
Implement PEPs 3109, 3134 129 days
http://bugs.python.org/issue1066 admin
patch
test_smtplib failures (caused by asyncore) 128 days
http://bugs.python.org/issue1067 admin
patch
invalid file encoding results in "SyntaxError: None" 129 days
http://bugs.python.org/issue1069 admin
unicode identifiers in error messages 129 days
http://bugs.python.org/issue1070 admin
file.seek allows float arguments 127 days
http://bugs.python.org/issue1081 admin
Warning required when calling register() on an ABCMeta subclass 37 days
http://bugs.python.org/issue1109 admin
patch
_curses issues on 64-bit big-endian (e.g, AIX) 125 days
http://bugs.python.org/issue1114 akuchling
patch
Document inspect.getfullargspec() 122 days
http://bugs.python.org/issue1121 admin
No tests for inspect.getfullargspec() 122 days
http://bugs.python.org/issue1127 admin
patch
Idle - Save (buffer) - closes IDLE and does not save file (Windo 121 days
http://bugs.python.org/issue1130 admin
Parsing a simple script eats all of your memory 120 days
http://bugs.python.org/issue1134 admin
patch
pyexpat patch for changing buffer_size 121 days
http://bugs.python.org/issue1137 AchimGaedke
patch
Fixer needed for __future__ imports 119 days
http://bugs.python.org/issue1138 admin
test_urllib2net fails on test_ftp 116 days
http://bugs.python.org/issue1157 admin
Should itertools.count work for arbitrary integers? 113 days
http://bugs.python.org/issue1165 admin
allow subclassing of bytes type 111 days
http://bugs.python.org/issue1171 admin
patch
Paticular decimal mod operation wrongly output NaN. 110 days
http://bugs.python.org/issue1182 marketdickinson
test fixes for immutable bytes change 108 days
http://bugs.python.org/issue1184 admin
patch
os.system() encoding bug on Windows 105 days
http://bugs.python.org/issue1193 admin
Restrict Google search to docs when in the docs subtree? 101 days
http://bugs.python.org/issue1218 georg.brandl
3.0 library/stdtypes.rst 96 days
http://bugs.python.org/issue1229 admin
option.dest not set when callback called with optparse 90 days
http://bugs.python.org/issue1243 gvanrossum
subprocess Popen wait() function hangs when stdout is > 20480 88 days
http://bugs.python.org/issue1256 tiran
PEP 3137: make bytesobject.c methods 88 days
http://bugs.python.org/issue1261 admin
patch
PEP 3137 patch - str8/str comparison should return false 87 days
http://bugs.python.org/issue1263 admin
patch
pdb bug with "with" statement 87 days
http://bugs.python.org/issue1265 admin
Py3K cannot run as ``python -S`` 77 days
http://bugs.python.org/issue1267 admin
patch
PyBytes (buffer) .extend method needs to accept any iterable of 83 days
http://bugs.python.org/issue1283 admin
patch
Fixes for profile/cprofile 79 days
http://bugs.python.org/issue1302 admin
patch
adapt str8 constructor to bytes constructor 79 days
http://bugs.python.org/issue1303 admin
patch
fix a few PyInt_Check vs PyLong_Check problems 75 days
http://bugs.python.org/issue1316 admin
patch
zipimport.zipimporter.archive undocumented and untested 73 days
http://bugs.python.org/issue1325 georg.brandl
Fix truncate on Windows, this time for real 73 days
http://bugs.python.org/issue1330 admin
patch
More fixes for Windows 73 days
http://bugs.python.org/issue1331 admin
patch
Fix for test_netrc on Windows 71 days
http://bugs.python.org/issue1345 admin
patch
BaseHTTPServer writing strings to bytes interface 71 days
http://bugs.python.org/issue1347 admin
patch
more uses of ord() in plat-mac/ic.py 71 days
http://bugs.python.org/issue1349 admin
patch
Add getsize() to io instances 70 days
http://bugs.python.org/issue1351 admin
patch
Two bsddb tests temporarily commented out in py3k branch 66 days
http://bugs.python.org/issue1371 admin
turn off socket timeout in test_xmlrpc 65 days
http://bugs.python.org/issue1373 admin
patch
test_import breaks on Linux 59 days
http://bugs.python.org/issue1377 admin
reloading imported modules sometimes fail with 'parent not in sy 64 days
http://bugs.python.org/issue1379 admin
patch
fix for test_asynchat and test_asyncore on pep3137 branch 64 days
http://bugs.python.org/issue1380 admin
patch
py3k-pep3137: patch for test_ctypes 63 days
http://bugs.python.org/issue1382 admin
patch
Windows fix for inspect tests 63 days
http://bugs.python.org/issue1384 admin
patch
hmac module violates RFC for some hash functions, e.g. sha512 63 days
http://bugs.python.org/issue1385 admin
py3k-pep3137: patch to ensure that all codecs return bytes 63 days
http://bugs.python.org/issue1386 admin
patch
py3k-pep3137: patch for hashlib on Windows 63 days
http://bugs.python.org/issue1387 admin
patch
py3k-pep3137: possible ref leak in ctypes 63 days
http://bugs.python.org/issue1388 admin
py3k-pep3137: struct module is leaking references 63 days
http://bugs.python.org/issue1389 admin
py3k-pep3137: issue warnings / errors on str(bytes()) and simila 62 days
http://bugs.python.org/issue1392 admin
patch
function comparing lacks NotImplemented error 61 days
http://bugs.python.org/issue1393 gvanrossum
py3k: duplicated line endings when using read(1) 62 days
http://bugs.python.org/issue1395 admin
py3k-pep3137: patch for mailbox 61 days
http://bugs.python.org/issue1396 admin
patch
Py3k's print() flushing problem 60 days
http://bugs.python.org/issue1400 admin
py_compile and compileall need unit tests 59 days
http://bugs.python.org/issue1403 admin
Use widechar api for os.environ 59 days
http://bugs.python.org/issue1406 admin
patch
new keyword-only function parameters interact badly with nested 59 days
http://bugs.python.org/issue1409 admin
Fix for refleak tests 58 days
http://bugs.python.org/issue1414 admin
patch
py3k: pythonw.exe fails because std streams a missing 58 days
http://bugs.python.org/issue1415 admin
Unicode literals in tokenize.py and tests. 56 days
http://bugs.python.org/issue1420 admin
patch
Writing to an invalid fd doesn't raise an exception 56 days
http://bugs.python.org/issue1422 admin
py3k: readline and rlcompleter doesn't list choices 56 days
http://bugs.python.org/issue1424 admin
readline: no display matches hook set 56 days
http://bugs.python.org/issue1425 admin
readline module needs a review 56 days
http://bugs.python.org/issue1426 admin
Calling base class methods is slow due to __instancecheck__ over 54 days
http://bugs.python.org/issue1438 admin
proposed 3000 patch for socket.py - "socket GC worries" 54 days
http://bugs.python.org/issue1439 admin
patch
Checks for PySys_GetObject("std???") == Py_None 54 days
http://bugs.python.org/issue1440 admin
patch
SSL patch for Python 3000 52 days
http://bugs.python.org/issue1451 admin
patch
VS2008, quick hack for distutils.msvccompiler 50 days
http://bugs.python.org/issue1455 admin
patch
inet_pton redefined while building with windows SDK 6.0 48 days
http://bugs.python.org/issue1464 admin
patch
SSL tests leak memory 48 days
http://bugs.python.org/issue1469 admin
py3k unit tests are removing %TEMP% dir on Windows 48 days
http://bugs.python.org/issue1470 admin
Drop _EXPORTS macros in PCbuild9 48 days
http://bugs.python.org/issue1473 admin
pythoncore.vcproj fails to generate buildinfo (when spaces in pa 47 days
http://bugs.python.org/issue1478 admin
patch
csv module is leaking references 47 days
http://bugs.python.org/issue1479 admin
sqlite module is leaking lots of references 47 days
http://bugs.python.org/issue1480 admin
PCBuild9 _ssl.vcproj improperly launches build 45 days
http://bugs.python.org/issue1488 admin
patch
Patch to remove unbound methods 44 days
http://bugs.python.org/issue1493 admin
patch
add str.maketrans() 43 days
http://bugs.python.org/issue1496 admin
patch
Patch to remove API to create new unbound methods 42 days
http://bugs.python.org/issue1497 admin
patch
Rename __builtins__ to __root_namespace__? 41 days
http://bugs.python.org/issue1498 admin
failure behaviour of compile() is missing 41 days
http://bugs.python.org/issue1499 georg.brandl
0 ** 0 documentation 41 days
http://bugs.python.org/issue1501 georg.brandl
Changes to PyMethod_New breaks ctypes on Windows 40 days
http://bugs.python.org/issue1505 admin
Removal of stale code in _csv.c / pyexpat.c 40 days
http://bugs.python.org/issue1508 admin
Problem with static libs on Windows 37 days
http://bugs.python.org/issue1527 admin
patch
sys.maxfloat patch 37 days
http://bugs.python.org/issue1534 admin
patch
Rename __builtin__ to builtins 36 days
http://bugs.python.org/issue1535 admin
patch
test_collections: failing refleak test 35 days
http://bugs.python.org/issue1539 admin
Port Python/import.c to py3k branch 34 days
http://bugs.python.org/issue1551 admin
import distutils.msvccompiler hangs when the environment is too 32 days
http://bugs.python.org/issue1557 admin
x64 platform doesn't define _WIN64 32 days
http://bugs.python.org/issue1558 admin
64bit
Decimal can't be subclassed useful 32 days
http://bugs.python.org/issue1562 facundobatista
The set implementation should special-case PyUnicode instead of 31 days
http://bugs.python.org/issue1564 admin
Better description of 'L' repr removal in "What's New" 29 days
http://bugs.python.org/issue1571 admin
404 report of SimpleXMLRPCServer is broken 29 days
http://bugs.python.org/issue1572 admin
Improper use of the keyword-only syntax makes the parser crash 29 days
http://bugs.python.org/issue1573 admin
Problems in win_getpass 28 days
http://bugs.python.org/issue1578 admin
Documentation patch for reversed() and __reversed__() 27 days
http://bugs.python.org/issue1582 georg.brandl
IDLE uses non-existent xrange() function (Py30a2) 27 days
http://bugs.python.org/issue1585 admin
IDLE no longer shows colour syntax highlighting in the Shell (Py 26 days
http://bugs.python.org/issue1586 admin
instancemethod wrapper for PyCFunctions 26 days
http://bugs.python.org/issue1587 admin
patch
popen2.Popen3 class (Unix) documentation misleading / confusing 26 days
http://bugs.python.org/issue1591 georg.brandl
spacing of the builtin_format function is inconsistent 26 days
http://bugs.python.org/issue1593 admin
patch
IDLE not working correctly on Windows (Py30a2/IDLE30a1) 26 days
http://bugs.python.org/issue1601 admin
Patch for TCL 8.5 support 25 days
http://bugs.python.org/issue1607 admin
patch
test_str.py crashes 27 days
http://bugs.python.org/issue1608 gvanrossum
Makefile's VPATH feature is broken 24 days
http://bugs.python.org/issue1613 admin
New @spam.getter property syntax modifies the property in place 24 days
http://bugs.python.org/issue1620 admin
patch
test_distutils unit test is failing rev:59499 23 days
http://bugs.python.org/issue1628 admin
sys.maxint is documented but should not be 23 days
http://bugs.python.org/issue1630 admin
Float patch for inf and nan on Windows (and other platforms) 23 days
http://bugs.python.org/issue1635 admin
patch
urlparse.urlparse misparses URLs with query but no path 20 days
http://bugs.python.org/issue1637 gvanrossum
Make socket support TIPC. 21 days
http://bugs.python.org/issue1646 tiran
patch
Make math.{floor,ceil}(float) return ints per PEP 3141 19 days
http://bugs.python.org/issue1656 admin
patch
-E command line parameter intent 18 days
http://bugs.python.org/issue1668 georg.brandl
patch
"World" tool ported to py3k 17 days
http://bugs.python.org/issue1671 admin
patch
what is decimal.Context.get_manager()? 16 days
http://bugs.python.org/issue1680 georg.brandl
parameter name for optparse parse_args incorrect 16 days
http://bugs.python.org/issue1681 georg.brandl
Syntax Error exception dosen't print string; not informative 14 days
http://bugs.python.org/issue1692 admin
patch
Please check merge from trunk 14 days
http://bugs.python.org/issue1693 admin
urlparse and usernames containing @ 14 days
http://bugs.python.org/issue1698 orsenthil
patch
Word "alias" used in confusing way to compare open() and file() 10 days
http://bugs.python.org/issue1702 georg.brandl
Small errors in new-style classes doc 6 days
http://bugs.python.org/issue1712 georg.brandl
Cosmetic patch for doc/code mismatch (msilib.UuidCreate) 4 days
http://bugs.python.org/issue1719 georg.brandl
_tkinter.c:903: AsObj: Assertion `size < size * sizeof(Tcl_UniCh 4 days
http://bugs.python.org/issue1721 admin
-1e-1000 converted incorrectly 2 days
http://bugs.python.org/issue1725 gvanrossum
patch
Remove Python/atof.c from PCBuild/pythoncore.vcproj 3 days
http://bugs.python.org/issue1726 admin
patch
VC6 build patch for python3000 3 days
http://bugs.python.org/issue1727 admin
patch
Documentation corrections for os module 2 days
http://bugs.python.org/issue1730 georg.brandl
patch
Random errors on interpreter shutdown 6 days
http://bugs.python.org/issue1731 gvanrossum
documentation on metaclasses is incomplete and misleading 2 days
http://bugs.python.org/issue1734 georg.brandl
Windows installer issue (ObjectBrowser.py) 4 days
http://bugs.python.org/issue1737 loewis
Testing CIA.vc 0 days
http://bugs.python.org/issue1739 loewis
os.path.relpath fails when path == start 0 days
http://bugs.python.org/issue1742 georg.brandl
issubclass(NotSubclassOfObject, InstanceOfAbcMeta) fails instead 0 days
http://bugs.python.org/issue1747 jyasskin
patch
Test: This is title 3 days
http://bugs.python.org/issue1750 georg.brandl
logging.basicConfig misleading behaviour 0 days
http://bugs.python.org/issue1752 vsajip
TextIOWrapper.write writes utf BOM for every string 0 days
http://bugs.python.org/issue1753 alexandre.vassalotti
Misspelling in future.c in 2.5.1 source (handl should be handle) 0 days
http://bugs.python.org/issue1755 georg.brandl
-m broken in trunk 0 days
http://bugs.python.org/issue1756 gvanrossum
Decimal hash depends on current context 1 days
http://bugs.python.org/issue1757 facundobatista
Wrong link in documentation 0 days
http://bugs.python.org/issue1758 loewis
Bug in re.sub() 3 days
http://bugs.python.org/issue1761 amaury.forgeotdarc
Reference to Python issue tracker incorrect 0 days
http://bugs.python.org/issue1773 akuchling
Reference to New style classes documentation is incorrect 0 days
http://bugs.python.org/issue1774 facundobatista
__import__ must not accept filenames 0 days
http://bugs.python.org/issue1776 tiran
Error with OptionParser.parse_args() 0 days
http://bugs.python.org/issue1784 gvanrossum
segfault in obmalloc.c 0 days
http://bugs.python.org/issue1787 gvanrossum
Outdated link in the tutorial 0 days
http://bugs.python.org/issue1788 facundobatista
The Library Reference still refers to the old bug tracker. 0 days
http://bugs.python.org/issue1791 facundobatista
How to install some stuff to /usr/sbin 2331 days
http://bugs.python.org/issue452144 tiran
Tcl event loop callback woes 2330 days
http://bugs.python.org/issue452973 tiran
Improve the ZipFile Interface 2286 days
http://bugs.python.org/issue467924 georg.brandl
python directory not added to PATH 2240 days
http://bugs.python.org/issue482531 tiran
Portable compiler option specification 2219 days
http://bugs.python.org/issue490264 tiran
Print line number of string if at EOF 2011 days
http://bugs.python.org/issue577295 tiran
option for not writing .py[co] files 1956 days
http://bugs.python.org/issue602345 georg.brandl
patch
need easy way of decoding a literal 1920 days
http://bugs.python.org/issue617979 tiran
Windows binary missing IPv6 support 1918 days
http://bugs.python.org/issue618593 tiran
refcount problem involving debugger 1764 days
http://bugs.python.org/issue699594 tiran
Easy tutorial printing should be possible 1739 days
http://bugs.python.org/issue714469 georg.brandl
event handling support 1674 days
http://bugs.python.org/issue750423 tiran
Thread in threading.py can only be started once 1671 days
http://bugs.python.org/issue751260 tiran
inspect.getmembers broken (?) 1658 days
http://bugs.python.org/issue759525 georg.brandl
Zero Configuration Networking? 1559 days
http://bugs.python.org/issue813922 tiran
Digital Unix build fails to create ccpython.o 1512 days
http://bugs.python.org/issue842171 tiran
Check for signals during regular expression matches 1510 days
http://bugs.python.org/issue846388 facundobatista
patch
PyErrr_Display and traceback.format_exception_only behaviour 1483 days
http://bugs.python.org/issue860326 admin
patch
distutils doesn't see user-directories set via VisStudio 7.1 1442 days
http://bugs.python.org/issue883969 tiran
Python configured with --disable-unicode fails tests, more 1389 days
http://bugs.python.org/issue919614 georg.brandl
There ought to be a way to uninstall 1314 days
http://bugs.python.org/issue963845 tiran
Ctrl-C causes odd behaviour 1312 days
http://bugs.python.org/issue964949 tiran
getattr(object,name) accepts only strings 1280 days
http://bugs.python.org/issue985094 tiran
os constants missing 1269 days
http://bugs.python.org/issue990749 tiran
PyErr_Clear() vs. AsynchronousException 1236 days
http://bugs.python.org/issue1009929 tiran
patch
Seting defaultencoding through an environment variable 1170 days
http://bugs.python.org/issue1052098 tiran
Memory leak in socket.py on Mac OS X 10.3 1103 days
http://bugs.python.org/issue1092502 tiran
subprocess fails on GetStdHandle in interactive GUI 1055 days
http://bugs.python.org/issue1124861 dserodio
No os.statvfs on FreeBSD 1048 days
http://bugs.python.org/issue1145231 tiran
No os.spawn*p* on Windows 1023 days
http://bugs.python.org/issue1166378 tiran
Time module is missing inverse of gmtime() 894 days
http://bugs.python.org/issue1245224 georg.brandl
patch
cross compile and mingw support 800 days
http://bugs.python.org/issue1339673 tiran
patch
PythonD new file: python2.4/plat-ms-dos5/djstat.py 788 days
http://bugs.python.org/issue1351036 tiran
patch
socket.recv(OOB) raises exception on closed socket 757 days
http://bugs.python.org/issue1379209 facundobatista
re search infinite loop 668 days
http://bugs.python.org/issue1448325 tiran
Add .format() method to str and unicode 644 days
http://bugs.python.org/issue1463370 admin
patch
Make -tt the default 634 days
http://bugs.python.org/issue1469190 admin
patch
Fix test_augassign in p3yk 632 days
http://bugs.python.org/issue1470424 admin
patch
fix test_exceptions in p3yk 632 days
http://bugs.python.org/issue1470459 admin
patch
fix test_bisect in p3yk 632 days
http://bugs.python.org/issue1470460 admin
patch
Mention coercion removal in Misc/NEWS 632 days
http://bugs.python.org/issue1470502 admin
partially fix test_class in p3yk 632 days
http://bugs.python.org/issue1470504 admin
patch
fix test_descrtut in p3yk 632 days
http://bugs.python.org/issue1470515 admin
patch
fix test_enumerate in p3yk 632 days
http://bugs.python.org/issue1470522 admin
patch
Fix test_descr in p3yk 632 days
http://bugs.python.org/issue1470536 admin
patch
fix test_getargs2 in p3yk 632 days
http://bugs.python.org/issue1470543 admin
patch
fix test_inspect in p3yk 632 days
http://bugs.python.org/issue1470560 admin
patch
fix test_itertools in p3yk 632 days
http://bugs.python.org/issue1470566 admin
patch
Forbid iteration over strings 630 days
http://bugs.python.org/issue1471291 admin
patch
make range be xrange 628 days
http://bugs.python.org/issue1472639 admin
patch
Remove types.InstanceType and new.instance 590 days
http://bugs.python.org/issue1495675 admin
patch
Fix test_exceptions.py 589 days
http://bugs.python.org/issue1496135 admin
patch
deprecate METH_OLDARGS 587 days
http://bugs.python.org/issue1496957 admin
patch
Change *args from a tuple to list 585 days
http://bugs.python.org/issue1498441 admin
patch
(py3k) Remove the sets module 581 days
http://bugs.python.org/issue1500611 admin
patch
Remove the repr()-backticks 581 days
http://bugs.python.org/issue1500623 admin
patch
There should be a Python build using Visual Studio 2005 572 days
http://bugs.python.org/issue1504947 tiran
Add some dicts to datetime module 570 days
http://bugs.python.org/issue1506296 tiran
Remove reduce() 559 days
http://bugs.python.org/issue1513249 admin
patch
Move reduce() to functools 558 days
http://bugs.python.org/issue1513870 admin
patch
Under OS X, compiling against local readline fails 552 days
http://bugs.python.org/issue1516068 tiran
Remove sys.exitfunc 552 days
http://bugs.python.org/issue1516375 admin
patch
Add some explication to PEP 3100 542 days
http://bugs.python.org/issue1522038 admin
patch
Remove operator.truth() and operator.abs() 542 days
http://bugs.python.org/issue1522059 admin
patch
tarfile chokes on ipython archive on Windows 532 days
http://bugs.python.org/issue1527974 lars.gustaebel
tarfile __slots__ addition 511 days
http://bugs.python.org/issue1540385 lars.gustaebel
patch
xrange that supports longs, etc 500 days
http://bugs.python.org/issue1546078 admin
patch
Create a real zip iterator object; not using itertools.izip 500 days
http://bugs.python.org/issue1546297 admin
patch
set literals 497 days
http://bugs.python.org/issue1547796 admin
patch
"if x in setliteral" peepholer optimization 496 days
http://bugs.python.org/issue1548082 admin
patch
set comprehensions 496 days
http://bugs.python.org/issue1548388 admin
patch
Implementation of PEP 3102 Keyword Only Argument 494 days
http://bugs.python.org/issue1549670 admin
patch
Ellipsis literal "..." 492 days
http://bugs.python.org/issue1550786 admin
patch
make exec a function 492 days
http://bugs.python.org/issue1550800 admin
patch
shutil.copyfile incomplete on NTFS 477 days
http://bugs.python.org/issue1559684 georg.brandl
copy() method of dictionaries is not "deep" 481 days
http://bugs.python.org/issue1560327 akuchling
RE (regular expression) matching stuck in loop 470 days
http://bugs.python.org/issue1566086 georg.brandl
help(x) for keywords too 456 days
http://bugs.python.org/issue1572210 georg.brandl
modulefinder changes for py3k 436 days
http://bugs.python.org/issue1585966 admin
patch
__bool__ instead of __nonzero__ 411 days
http://bugs.python.org/issue1600346 admin
patch
sys.intern() 409 days
http://bugs.python.org/issue1601678 admin
patch
Optional Argument Syntax 400 days
http://bugs.python.org/issue1607548 admin
patch
tempfile.TemporaryFile differences between linux and windows 389 days
http://bugs.python.org/issue1615275 georg.brandl
extended slicing for bytes objects 385 days
http://bugs.python.org/issue1617678 admin
patch
sys.intern() 2to3 fixer 383 days
http://bugs.python.org/issue1619049 admin
patch
Bug fixes for int unification branch 382 days
http://bugs.python.org/issue1619846 admin
patch
update to PEP 344 - exception attributes 369 days
http://bugs.python.org/issue1626538 admin
patch
backticks will not be used at all 368 days
http://bugs.python.org/issue1627052 admin
patch
Win32: Fix build when you have TortoiseSVN but no .svn/* 367 days
http://bugs.python.org/issue1628061 admin
patch
Win32: Add bytesobject.c to pythoncore.vcproj 367 days
http://bugs.python.org/issue1628062 admin
patch
clarify 80-char limit 366 days
http://bugs.python.org/issue1628906 admin
The Unicode "lazy strings" patches 366 days
http://bugs.python.org/issue1629305 admin
patch
Implement named exception cleanup 364 days
http://bugs.python.org/issue1630248 admin
patch
New exception syntax 362 days
http://bugs.python.org/issue1631942 admin
patch
Py3k: Fix pybench so it runs 359 days
http://bugs.python.org/issue1634499 admin
patch
PyFloat_FromString deprecated form 338 days
http://bugs.python.org/issue1650903 admin
Hide iteration variable in list comprehensions 325 days
http://bugs.python.org/issue1660500 admin
patch
inspect.getargspec() fails with keyword-only arguments 315 days
http://bugs.python.org/issue1668565 admin
methods for bytes 314 days
http://bugs.python.org/issue1669633 admin
patch
Remove Py_PROTO from socket in py3k 313 days
http://bugs.python.org/issue1670209 admin
patch
Class Decorators 312 days
http://bugs.python.org/issue1671208 admin
patch
New File I/O type for Python 3000, plus .h and unit tests 312 days
http://bugs.python.org/issue1671314 admin
patch
PEP 3114 -- next() -> __next__() 306 days
http://bugs.python.org/issue1675363 admin
patch
Removal of Tuple Parameter Unpacking [PEP3113] 302 days
http://bugs.python.org/issue1678060 admin
patch
Lib/io.py open uses unset "bs" 300 days
http://bugs.python.org/issue1679498 admin
remove sys.exitfunc, rewrite atexit in C 298 days
http://bugs.python.org/issue1680961 admin
patch
PEP 3115 patch 298 days
http://bugs.python.org/issue1681101 admin
patch
subprocess.Popen fails with socket._fileobject on Windows 297 days
http://bugs.python.org/issue1681674 tiran
xreload.py won't update class docstrings 294 days
http://bugs.python.org/issue1683288 admin
modindex.html builds incorrectly in Python 3 292 days
http://bugs.python.org/issue1684811 admin
Add IllegalStateError 291 days
http://bugs.python.org/issue1685642 admin
patch
More PEP 3116 classes 290 days
http://bugs.python.org/issue1686273 admin
patch
csv sniff example 290 days
http://bugs.python.org/issue1686390 georg.brandl
Inconsistent Exceptions for Readonly Attributes 289 days
http://bugs.python.org/issue1687163 admin
Remove redundant code in ntpath.walk() 273 days
http://bugs.python.org/issue1696393 georg.brandl
patch
Property with -> annotation triggers assert 272 days
http://bugs.python.org/issue1697248 admin
types.InstanceType is missing but used by pydoc 271 days
http://bugs.python.org/issue1697782 admin
getstate/setstate for incremental codecs 270 days
http://bugs.python.org/issue1698994 admin
patch
'nonlocal x' at top level crashes interpreter 259 days
http://bugs.python.org/issue1705365 admin
Implementation of @abstractmethod for PEP 3119 257 days
http://bugs.python.org/issue1706989 admin
patch
Make isinstance/issubclass overloadable for PEP 3119 255 days
http://bugs.python.org/issue1708353 admin
patch
PEP 3132: extended unpacking 249 days
http://bugs.python.org/issue1711529 admin
patch
Patch for PEP 3109 245 days
http://bugs.python.org/issue1713889 admin
patch
PEP 3123 implementation 238 days
http://bugs.python.org/issue1718153 admin
patch
Remove backslash escapes from tokenize.c. 235 days
http://bugs.python.org/issue1720390 admin
patch
automatic imports 237 days
http://bugs.python.org/issue1720992 juanmabc3
dict size changes during iter 227 days
http://bugs.python.org/issue1724999 admin
patch
subprocess: unreliability of returncode not clear from docs 223 days
http://bugs.python.org/issue1727024 georg.brandl
First steps towards new super (PEP 3135) 223 days
http://bugs.python.org/issue1727209 admin
patch
os._execvpe raises assignment error in python 3000 svn 217 days
http://bugs.python.org/issue1730441 admin
Kill StandardError 209 days
http://bugs.python.org/issue1735485 admin
patch
Interactive help raise exception while listing modules 201 days
http://bugs.python.org/issue1739659 admin
struni: fix for test_cmd_line 180 days
http://bugs.python.org/issue1751493 admin
patch
struni: Replace assert_(==) with failUnlessEqual 180 days
http://bugs.python.org/issue1751515 admin
patch
struni: str() doesn't call __str__() of subclasses of str 180 days
http://bugs.python.org/issue1751598 admin
Dict comprehensions 179 days
http://bugs.python.org/issue1751800 admin
patch
Patch for Windows build 179 days
http://bugs.python.org/issue1751801 admin
patch
struni: Three ctypes tests are SEGFAULTing 179 days
http://bugs.python.org/issue1751885 admin
struni: help() is broken 179 days
http://bugs.python.org/issue1751932 admin
struni: gettext fixes 179 days
http://bugs.python.org/issue1751958 admin
patch
Typo in Lib/lib-tk/ScrolledText.py 179 days
http://bugs.python.org/issue1751965 admin
patch
Use the bytes type in asynchat 179 days
http://bugs.python.org/issue1752173 admin
patch
PyHeapTypeObject fix 179 days
http://bugs.python.org/issue1752184 admin
patch
struni: for for poll, pep263, bigmem and a bit pickletool 179 days
http://bugs.python.org/issue1752195 admin
patch
struni: _fileio fixes for Windows 179 days
http://bugs.python.org/issue1752225 admin
patch
Use the Unicode API in dlmodule.c 179 days
http://bugs.python.org/issue1752229 admin
patch
reference leak in _PyUnicode_AsDefaultEncodedString 179 days
http://bugs.python.org/issue1752317 admin
patch
fix failing unit tests in mmap in struni branch 178 days
http://bugs.python.org/issue1752647 admin
patch
Lib/regrtest.py -x 'test_xxx' does not work 178 days
http://bugs.python.org/issue1753310 admin
patch
struni: assertion in Windows debug build 177 days
http://bugs.python.org/issue1753395 admin
test_urllib2.test_fie passes 177 days
http://bugs.python.org/issue1753889 admin
patch
struni: Bytes support for TextIOWrapper.write() 175 days
http://bugs.python.org/issue1754339 admin
patch
struni: Various patches for windows 175 days
http://bugs.python.org/issue1754484 admin
patch
document default values for sort parameters 174 days
http://bugs.python.org/issue1755097 georg.brandl
urllib2 tests pass 174 days
http://bugs.python.org/issue1755133 admin
patch
struni: corrections for test_cProfile 174 days
http://bugs.python.org/issue1755176 admin
patch
Deadlocks with fork() and multithreading 175 days
http://bugs.python.org/issue1755179 facundobatista
struni: corrections in ftplib 174 days
http://bugs.python.org/issue1755206 admin
patch
struni: correction for sockets on win32 174 days
http://bugs.python.org/issue1755214 admin
patch
struni: correction for _winreg module 174 days
http://bugs.python.org/issue1755229 admin
patch
Add support for seeking/writing beyond EOF to io.BytesIO 170 days
http://bugs.python.org/issue1757683 admin
patch
struni: make test_ucn pass 170 days
http://bugs.python.org/issue1757758 admin
patch
struni: fix str/bytes errors for test_oldmailbox 170 days
http://bugs.python.org/issue1757774 admin
patch
struni: make test_mailbox and test_old_mailbox pass 170 days
http://bugs.python.org/issue1757839 admin
patch
struni: Fix test_macostools 168 days
http://bugs.python.org/issue1758570 admin
patch
pyexpat unit tests - str/uni branch 167 days
http://bugs.python.org/issue1759016 admin
patch
struni pulldom: Don't use 'types' to check strings 166 days
http://bugs.python.org/issue1759922 admin
patch
struni: Fix test_aepack by converting 4cc's to bytes 164 days
http://bugs.python.org/issue1761465 admin
patch
struni: test_xml_etree.py 163 days
http://bugs.python.org/issue1762412 admin
patch
struni: test_urllib2, test_cookielib 162 days
http://bugs.python.org/issue1762940 admin
patch
Fix for test_socketserver for Py3k 159 days
http://bugs.python.org/issue1764815 admin
patch
Fix for test_zipimport 157 days
http://bugs.python.org/issue1766592 admin
patch
test_csv struni fixes + unicode support in _csv 156 days
http://bugs.python.org/issue1767398 admin
patch
test_asyncore fix 155 days
http://bugs.python.org/issue1767834 admin
patch
Fix for failing test_scriptpackages in py3k-struni 153 days
http://bugs.python.org/issue1768976 admin
patch
Fix for failing test_plistlib in py3k-struni 153 days
http://bugs.python.org/issue1769016 admin
patch
struni: test_xml_etree_c 152 days
http://bugs.python.org/issue1769767 admin
patch
Remove cStringIO usage 151 days
http://bugs.python.org/issue1770008 admin
patch
ctypes: c_char now uses bytes and not str (unicode) 151 days
http://bugs.python.org/issue1770355 admin
patch
Errors in site.py not reported properly 150 days
http://bugs.python.org/issue1771260 admin
Misc improvements for the io module 150 days
http://bugs.python.org/issue1771364 admin
patch
dir() on traceback objects returns an empty list 148 days
http://bugs.python.org/issue1772489 admin
exec() doesn't take an open file 147 days
http://bugs.python.org/issue1772686 admin
Unify __builtins__ -> __builtin__ 145 days
http://bugs.python.org/issue1774369 admin
patch
Make it possible to use SVK to develop Python 145 days
http://bugs.python.org/issue1774414 admin
patch
Binding <Control-space> fails 144 days
http://bugs.python.org/issue1774736 admin
Override flags set by IOBase in io.StringIO 144 days
http://bugs.python.org/issue1774828 admin
patch
Convert str to bytes in io.BytesIO.__init__ 144 days
http://bugs.python.org/issue1774833 admin
patch
utf-32 codecs 143 days
http://bugs.python.org/issue1775604 admin
patch
memoryview('test') is causing a segfault 141 days
http://bugs.python.org/issue1777057 admin
Top Issues Most Discussed (10)
______________________________
19 Move Demo/classes/Rat.py to Lib/rational.py and fix it up. 21 days
open http://bugs.python.org/issue1682
13 Decimal constructor accepts newline terminated strings 2 days
open http://bugs.python.org/issue1780
13 Bug in re.sub() 3 days
closed http://bugs.python.org/issue1761
12 logging: need a way to discard Logger objects 5 days
open http://bugs.python.org/issue932563
11 IDLE fails to launch 5 days
open http://bugs.python.org/issue1743
10 option for not writing .py[co] files 1956 days
closed http://bugs.python.org/issue602345
10 WindowsError messages are not properly encoded 4 days
open http://bugs.python.org/issue1754
9 Winpath module - easy access to Windows directories like My Doc 3 days
open http://bugs.python.org/issue1763
9 Do not assume signed integer overflow behavior 29 days
open http://bugs.python.org/issue1621
9 Paticular decimal mod operation wrongly output NaN. 110 days
closed http://bugs.python.org/issue1182
1
0
I recently posted the following to c.l.py, and didn't get much feedback. I'm
planning to add a new class to the logging package, and before I do so I'd
like to get feedback from python-dev. I know many of the devs may not be
monitoring c.l.py, so I'm reposting here for your feedback.
Some users of the logging package have raised an issue regarding the
difficulty of passing additional contextual information when logging. For
example, the developer of a networked application may want to log, in
addition to specifics related to to the network service being provided,
information about the IP address of the remote machine and the username of
the person logged into and using the service.
Python 2.4 introduced an 'extra' keyword argument which was intended to hold
a dict-like object containing additional information to be added to a
LogRecord. The additional information would then be printed via placeholders
in a format string.
While this works, it is a little unwieldy to use in practice, because users
need to provide the 'extra' parameter in every logging call. This has led
people in some instances to create context-specific Logger instances (e.g.
one logger for every connection). This has a drawback in that a logger name
can only provide limited contextual information, and moreover, if the number
of connections is effectively unbounded over time, the number of Logger
instances will also grow in an unbounded way. (Logger instances are never
garbage collected, because references to them are always held in the logging
package. This alleviates a burden on users in that they never have to pass
loggers around, but means that creating a lot of Logger instances will lead
to a long-lived memory burden.)
One solution is to create a generic wrapper around loggers to which a logger
name and contextual information can be passed. The wrapper would delegate
logging calls to the logger with the specified name, but would manipulate
the arguments passed to the logging call to insert the contextual
information. I have created such a wrapper class, called LoggerAdapter,
which is in the example script located at
http://dpaste.com/30613/
I would welcome your views on whether the LoggerAdapter class is suitable
for adding to the logging package in Python 2.6/3.0. Does it do what might
reasonably be expected out of the box? LoggerAdapters are, of course,
garbage collected in the normal way and so impose no particular memory
burden.
I'll wait a few days for any comments/suggestions from this list, then
(assuming no adverse comments) go ahead and add the LoggerAdapter class and
update the docs.
Best regards,
Vinay Sajip
3
3
I read the announcement of the Python Users list and figured out that
some of the other core developers might be interested in the news, too.
Among other projects Python was upgraded to Rung 2 on the Coverity Scan
list: http://scan.coverity.com/
Christian
7
16
Hello!
We are discussing name space packages on the stdlib reorg list. For
Python 3.0 we plan to organize the packages by purpose, e.g. put all
database related packages like sqlite and shelve in a 'databases' name
space.
Of course we want to have the name spaces extensible by 3rd party
software. The Python world as currently two ways to create extensible
name space packages: pkgutil and pkg_resource.
pkgutil is part of Python 2.5. pkg_resource is scheduled for Python 2.6
and 3.0 in PEP 365 [1]. The PEP hasn't been accepted yet.
Questions:
* PJE: Is pkg_resource ready for Python 2.6 and 3.0?
* GvR: Are you going to accept Phillip's PEP?
* PJE: Does pkg_resource have an easy way to overwrite a package in a
name space package? E.g. an user wants to overwrite Python's
databases.sqlite with a newer version of sqlite. Can he simply do it by
inserting a package into sys.path before Lib/ ?
Christian
[1] http://www.python.org/dev/peps/pep-0365/
15
41
10 Jan '08
Hi everyone,
Some time ago I've stumbled upon a problem with compiling py2exe with
mingw: it resulted in invalid executable run.exe. At first I dismissed
it as some very strange problem, but recently I decided to look into
it again and found that the reason for this is a .def file, supplied
during compilation, that causes linker to produce executable with
IMAGE_FILE_DLL in its PE Header Characteristics field, and operating
system refuses to execute it.
I traced this problem to the following block in distutils/cygwinccompiler.py:
# handle export symbols by creating a def-file
# with executables this only works with gcc/ld as linker
if ((export_symbols is not None) and
(target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
Removing 'or self.linker_dll == "gcc"' obviously helps. To me this
sounds like a bug (introduced in revision 17747 on trunk, more that 7
years old!), but I was wondering if there's any logic behind
generating a .def file for the executable (sidenote: look at
distutils/emxccompiler.py where .def file is generated for executables
only). To me it's very unlikely that anyone *ever* needs to export
symbols from an executable (I'm not even sure if it can work as
intended on Windows). Even then, if there's anyone at all who needs
such a machinery (again, what for?), at the very least it shouldn't
produce "LIBRARY" line. As minimal change as this:
# Generate .def file
contents = [
"LIBRARY %s" % os.path.basename(output_filename),
"EXPORTS"]
if target_desc == self.EXECUTABLE:
contents.pop(0)
Did the trick (generated executable runs fine).
Is anyone interested in a bug report for this? Also, is there any
chance that if there is interest it could end up in release25-maint?
Best regards,
Alexey.
1
0
Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages
by Phillip J. Eby 10 Jan '08
by Phillip J. Eby 10 Jan '08
10 Jan '08
At 10:47 AM 1/10/2008 +0000, Paul Moore wrote:
>On 09/01/2008, Steve Holden <steve(a)holdenweb.com> wrote:
> > The idea that users would /program their own computers/ was totally
> > alien to the Windows mindset.
>
>Actually, the alien idea is that more than one person would use the
>same (Windows) computer. Not surprising as these were *personal*
>computers. It's Windows as a server OS that's the bizarre idea...
multiuser != server
I've been in a couple of organizations where PCs were shared and thus
had different users logging into them. Cash registers and call
centers, for example.
1
0
Hi,
I've taken a look at some bugs in the bugtracker. I think these should be
closed:
http://bugs.python.org/issue1720992 is about automatic imports.
http://bugs.python.org/issue1448325
and
http://bugs.python.org/issue1566086
is about the regular expression engine "hanging". These are duplicates of
http://bugs.python.org/issue1662581 and should be closed.
Regards,
- Ralf
2
1
I've attached the first public draft of my first PEP. A working patch
against the py3k branch is available at http://bugs.python.org/issue1576
Christian
PEP: 369
Title: Lazy importing and post import hooks
Version: $Revision$
Last-Modified: $Date$
Author: Christian Heimes <christian(at)cheimes(dot)de>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 02-Jan-2008
Python-Version: 2.6, 3.0
Post-History:
Abstract
========
This PEP proposes enhancements for the import machinery to add lazy
importing and post import hooks to Python.
It is intended primarily to support the wider use of abstract base
classes that is expected in Python 3.0.
Rationale
=========
In current Python an import always loads a module from the disk even if
the importing module never actually uses the module named in the import
statement. It requires some extra code to conditionally import modules
or the unnecessary imports can slow down a small script.
Embedding import statements inside functions is no solution, as doing
so invokes the import machinery every time the function is called.
Hiding the import inside a function also makes the modules dependencies
less clear.
Python also has no API to hook into the import machinery and execute code
*after* a module is successfully loaded. The import hooks of PEP 302 are
about finding modules and loading modules but they were not designed to
as post import hooks.
- An import always loads the module from the disk which may cause a
considerable speed impact on the execution time of a small script.
- Conditional imports make the code harder to read and may lead to slow
and ugly function level imports.
- Python can't notify code when a module is loaded.
Use cases
=========
A use case for a post import hook is mentioned in Nick Coghlan's initial
posting [1]_. about callbacks on module import. It was found during the
development of Python 3.0 and its ABCs. We wanted to register classes
like decimal.Decimal with an ABC but the module should not be imported
on every interpreter startup. Nick came up with this example::
@imp.when_imported('decimal')
def register(decimal):
Inexact.register(decimal.Decimal)
The function ``register`` is registered as callback for the module named
'decimal'. When decimal is imported the function is called with the module
object as argument.
While this particular example isn't necessary in practice, (as
decimal.Decimal will inherit from the appropriate abstract Number base
class in 2.6 and 3.0), it still illustrates the principle.
Existing implementations
========================
There are two major implementations for lazy imports in the Python world.
PJE's peak.util.imports [3] supports lazy modules an post load hooks. My
implementation shares a lot with his and it's partly based on his ideas.
Zope 3's zope.deferredimport doesn't have post import hooks but it has
additional methods for deprecation warnings.
Post import hook implementation
===============================
Post import hooks are called after a module has been loaded. The hooks
are callable which take one argument, the module instance. They are
registered by the dotted name of the module, e.g. 'os' or 'os.path'.
The callable are stored in the dict ``sys.post_import_hooks`` which
is a mapping from names (as string) to a list of callables or None.
States
------
No hook was registered
''''''''''''''''''''''
sys.post_import_hooks contains no entry for the module
A hook is registered and the module is not loaded yet
'''''''''''''''''''''''''''''''''''''''''''''''''''''
The import hook registry contains an entry
sys.post_import_hooks["name"] = [hook1]
A module is successfully loaded
'''''''''''''''''''''''''''''''
The import machinery checks if sys.post_import_hooks contains post import
hooks for the newly loaded module. If hooks are found then the hooks are
called in the order they were registered with the module instance as first
argument. The processing of the hooks is stopped when a method raises an
exception. At the end the entry for the module name is removed from
sys.post_import_hooks, even when an error has occured.
A module can't be loaded
''''''''''''''''''''''''
The import hooks are neither called nor removed from the registry. It may be
possible to load the module later.
A hook is registered but the module is already loaded
'''''''''''''''''''''''''''''''''''''''''''''''''''''
The hook is fired immediately.
C API
-----
New PyImport_* API functions
''''''''''''''''''''''''''''
PyObject* PyImport_GetPostImportHooks(void)
Returns the dict sys.post_import_hooks or NULL
PyObject* PyImport_NotifyModuleLoaded(PyObject *module)
Notify the post import system that a module was requested. Returns the
module or NULL if an error has occured.
PyObject* PyImport_RegisterPostImportHook(PyObject *callable, PyObject *mod_name)
Register a new hook ``callable`` for the module ``mod_name``
The PyImport_PostImportNotify() method is called by PyImport_ImportModuleLevel()::
PyImport_ImportModuleLevel(...)
{
...
result = import_module_level(name, globals, locals, fromlist, level);
result = PyImport_PostImportNotify(result);
...
}
Python API
----------
The import hook registry and two new API methods are exposed through the ``sys``
and ``imp`` module.
sys.post_import_hooks
The dict contains the post import hooks: {"name" : [hook1, hook2, ...], ...}
imp.register_post_import_hook(hook, name)
imp.notify_module_loaded(module) -> module
The when_imported function decorator is also in the imp module,
which is equivalent to:
def when_imported(name):
def register(hook):
register_post_import_hook(hook, name)
return register
Lazy import implementation
==========================
Lazy import (also known as deferred import) makes a module object available
without locating and loading the actual file for the module. The real module
is loaded upon the first attribute access using the standard import mechanism.
Only a limited set of attributes can be read w/o loading the real module, that
is ``__name__`` and ``__lazy_import__``. The former variable is used to load
the actual module while the second signals the lazyness of the module. It's
not required for the C implementation but it was added for user implementation
of lazy modules as requested by PJE <<Reference here would be good>>.
Every read attempt to another attribute or every write attempt causes the
real module to be loaded. If the load fails a ``LazyImportError`` (subclass of
``ImportError`` is raised and future access of the module object will raise
the same error.
The real module doesn't replace the lazy module. References to the lazy module
are still valid and don't cause another read attempt. The implementation
assigns real->md_dict lazy->md_dict (the __dict__ attributes) so that every read
and write to the former lazy module ends up in the real module's namespace
__dict__. The code also tries to unload the real module but it may not be
possible when e.g mod_a loads mod_b, mod_b loads mod_c and mod_c import mod_a
again. This doesn't cause a problem with the namespace dict but
the identity check ``mod_c.mod_a is mod_a`` may be false.
A puer Python implementation of the loader code may look like this (pseudo code)::
lazy = sys.modules[name]
del sys.modules[name]
real = __import__(name)
lazy.__dict__ = real.__dict__
sys.modules[name] = lazy
The real module or an imported module by the real module may keep a reference
to the real module instance. Because both the formerly lazy module instance
and the real module share the same __dict__ every modification on one module
is instantly available on the other object.
C API
-----
The module object struct gains two more entries. ``md_name`` holds the name of
a lazy module (the __name__ attribute) and ``md_lazy`` signals the import
status.
PyModuleType changes
''''''''''''''''''''
typedef enum {
Py_MOD_INVALID = -1,
Py_MOD_LOADED,
Py_MOD_LAZY,
Py_MOD_KEEP_DICT
} PyModule_State;
typedef struct {
PyObject_HEAD
PyObject *md_dict;
PyObject *md_name;
PyModule_State md_lazy;
} PyModuleObject;
PyObject * PyModule_NewLazy(const char *name)
Creates a new lazy module instance
int PyModule_IsLazy(PyObject *module)
Checks if the module is lazy. The function first checks module->md_lazy.
If ``md_lazy`` is Py_MOD_LOADED it also checks the attribute
__lazy_import__.
Py_MOD_INVALID
real module can't be loaded, further attribute access raises an error
Py_MOD_LOADED
module is loaded
Py_MOD_LAZY
module is lazy, write and read access except __name__ and
__lazy_import__ will load the real module.
Py_MOD_KEEP_DICT
Intermediate state of a real module, md_dict isn't cleared
The last state is requires to prevent ``module_dealloc`` from replacing the
values of the module dict with None.
Python API
----------
``__lazy_import__`` module attribute
The module attribute ``__lazy_import__`` can be used by 3rd party
implements of lazy modules to signal the laziness of a module.
imp.is_lazy(mod) -> bool
Checks if the module is lazy, falls back to ``__lazy_import__``
imp.import_lazy(name) -> module instance (lazy)
Imports a module lazy, e.g. ``import_lazy("spam.ham")`` puts
*spam.ham* in sys modules and returns the *spam.ham* module
with actually loading it.
imp.new_lazy_module(name) -> module instance
Create a new lazy module instance w/o putting it into sys.modules
imp.when_imported(name) -> decorator function
for @when_imported(name) def hook(module): pass
Open issues
===========
Nick: There also needs to be a discussion of the import lock and potential hidden
deadlock issues. Specifically, the first access to the lazy module that causes
the real module to be loaded will attempt to acquire the import lock. Carelessly
mixing lazy importing with threaded code is a recipe for trouble
Backwards Compatibility
=======================
The new features and API don't conflict with old import system of Python and
don't cause any backward compatibility issues for most software. However
systems like PEAK and Zope which implement their own lazy import magic need
to follow some rules.
The post import hook and lazy modules were carefully designed to cooperate
with existing systems. It's the suggestion of the PEP author to replace
own on-load-hooks with the new hook API. The alternative lazy or deferred
imports will still work but the implementations must call the
``imp.notify_module_loaded`` function.
Reference Implementation
========================
A reference implementation is already implemented and working. It still
requires some cleanups, documentation updates and additional unit tests.
Acknowledgments
===============
Nick Coghlan, for proof reading and the initial discussion
Phillip J. Eby, for his implementation in PEAK and help with my own implementation
Copyright
=========
This document has been placed in the public domain.
References
==========
.. [1] Interest in PEP for callbacks on module import
http://permalink.gmane.org/gmane.comp.python.python-3000.devel/11126
.. [2] PEP 302: New Import Hooks
http://www.python.org/dev/peps/pep-0302/
.. [3] peak.utils.imports
http://svn.eby-sarna.com/Importing/peak/util/imports.py?view=markup
.. [4] zope.deferredimport
http://svn.zope.org/zope.deferredimport/trunk/src/zope/deferredimport/
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:
11
15