[issue15061] hmac.secure_compare() leaks information about length of strings
Serhiy Storchaka storch...@gmail.com added the comment: We could handle all bytes-compatible objects, using the buffer API. It is timing unsafe. How so? I checked myself, and I see that most likely I was wrong. At least for bytes and bytearrays it is timing safe. I don't think that's the right answer, because people will instead e.g. encode('utf-8'), and suddently the encodingly will not be timing-safe. And what of that? It is outside of the timingsafe_eq function. People can also do other timing unsafe operations with the secret key (for example reading it from file or from DB) or not to use timingsafe_eq at all. The secret key should be pre-encoded. The error will be if code works for developer from ASCII word, and then on the other side of ocean it will no longer work with non-ASCII strings. You are expected to be familiar with such issues. In any case, the obvious (and simplest, and fastest) way to check that a string is ASCII-only is try to encoded it to ASCII. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15061 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list
New submission from Chris Jerdonek chris.jerdo...@gmail.com: It would be nice if unittest.TestProgram(), aka unittest.main(), allowed one to set self.testNames by programmatically passing in a list of test names. Currently, unittest.main() almost allows this: the constructor sets self.testNames to a 1-tuple containing the value of the defaultTest argument. But defaultTest can only be a string, not a list of test names. A way around this is to pass the test names explicitly via the argv argument, but this seems less elegant as a programmatic API. Moreover, this approach isn't equivalent because test names passed via argv first get passed to a _convert_names() function. It seems like it would be a natural and simple change to enhance unittest.TestProgram() to accept not just a name but also a list of names for the defaultTest argument. Thanks. -- components: Library (Lib) keywords: easy messages: 163386 nosy: cjerdonek priority: normal severity: normal status: open title: Let unittest.TestProgram()'s defaultTest argument be a list type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15133] tkinter.BooleanVar.get() docstring is wrong
New submission from Mark Summerfield m...@qtrac.eu: Python 3.2.2 (default, Jun 4 2012, 11:15:16) [GCC 4.4.5] on linux2 Type copyright, credits or license() for more information. from tkinter import * help(BooleanVar.get) Help on function get in module tkinter: get(self) Return the value of the variable as a bool. On my system it actually returns an int. (I wish it did return a bool though.) -- components: Tkinter messages: 163387 nosy: mark priority: normal severity: normal status: open title: tkinter.BooleanVar.get() docstring is wrong versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Interesting, I need to see what is the reason for that. Possibly, sem_* primitives used there are so cheap that they don't matter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15134] urllib.request.thishost() fails on OSX 10.7
New submission from Ronald Oussoren ronaldousso...@mac.com: I just noticed that test_urllib fails for me because urllib.request.thishost() fails: == ERROR: test_thishost (test.test_urllib.Utility_Tests) Test the urllib.request.thishost utility function returns a tuple -- Traceback (most recent call last): File /Users/ronald/Projects/python/rw/default/Lib/test/test_urllib.py, line 1155, in test_thishost self.assertIsInstance(urllib.request.thishost(), tuple) File /Users/ronald/Projects/python/rw/default/Lib/urllib/request.py, line 2236, in thishost _thishost = tuple(socket.gethostbyname_ex(socket.gethostname())[2]) socket.gaierror: [Errno 8] nodename nor servname provided, or not known -- This is because this host's hostname (Gondolin.local) is not in DNS because my mDNSReponder detected a conflict and picked a different name to advertise in the .local zone without updating the hostname. The reason I report this anyway is that URLopener.open_local_file seems to assume that thishost() cannot fail, and the error condition on my machine could easily happen on other systems as well. BTW. The use of this host() in URLopener.open_local_file is wrong for other reasons as well: it assumes that the local machine has exactly 1 IP address, and won't correctly detect that a file is local when the IP address is one of the other IP addresses on a multi homed system. -- components: Library (Lib) messages: 163389 nosy: ronaldoussoren priority: normal severity: normal status: open title: urllib.request.thishost() fails on OSX 10.7 versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15061] hmac.secure_compare() leaks information about length of strings
Christian Heimes li...@cheimes.de added the comment: The error will be if code works for developer from ASCII word, and then on the other side of ocean it will no longer work with non-ASCII strings. You are expected to be familiar with such issues. In any case, the obvious (and simplest, and fastest) way to check that a string is ASCII-only is try to encoded it to ASCII. No, the fastest way is to check the kind attribute of the unicode object in C code. That doesn't involve any additional conversion or Python function call. The function is deliberately limited. The ASCII fallback is very useful as most people will store hex encoded bytes of their passphrases in their databases. With ASCII support you can do timingsafe_compare(hex_from_db, hmac.hexdigest()). Maciej: http://pastebin.com/ZAAjSkJh The C function is one order of magnitude faster and the spread is one order smaller. 1e-07 is within the noise level on my idle computer. A busy server will have a higher noise level. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15061 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15081] No documentation for PyState_FindModule()
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 55e8cba34b11 by Martin v. Löwis in branch 'default': Issue #15042: Add PyState_AddModule and PyState_RemoveModule. http://hg.python.org/cpython/rev/55e8cba34b11 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15042] Implemented PyState_AddModule, PyState_RemoveModule
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 55e8cba34b11 by Martin v. Löwis in branch 'default': Issue #15042: Add PyState_AddModule and PyState_RemoveModule. http://hg.python.org/cpython/rev/55e8cba34b11 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count
Larry Hastings la...@hastings.org added the comment: Fifth iteration of my patch. Everything is done, and I really think it's ready to be checked in. * The documentation is done, including Misc/NEWS. * All the code is now 80 columns. * The docstrings have been double- and triple-checked. * It passes all regression tests on Linux 64-bit; it processes the regression test suite identically to trunk on Windows 32-bit. -- Added file: http://bugs.python.org/file26080/larry.os.keyword.arguments.collapse.5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14769] Add test to automatically detect missing format units in skipitem()
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ace45d23628a by Larry Hastings in branch 'default': Issue #14769: test_capi now has SkipitemTest, which cleverly checks http://hg.python.org/cpython/rev/ace45d23628a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14769] Add test to automatically detect missing format units in skipitem()
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15081] No documentation for PyState_FindModule()
Christian Heimes li...@cheimes.de added the comment: Thanks! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15135] HOWTOs doesn't link to Idioms and Anti-Idioms article
New submission from Pan Yongzhi fossi...@users.sourceforge.net: In the py3k docs howtos table of contents, http://docs.python.org/py3k/howto/index.html, the link to the article Idioms and Anti-Idioms in Python is gone, but the article is still in the doc. It is at http://docs.python.org/py3k/howto/doanddont.html. Should it have a link at the howtos section? -- assignee: docs@python components: Documentation messages: 163396 nosy: docs@python, fossilet priority: normal severity: normal status: open title: HOWTOs doesn't link to Idioms and Anti-Idioms article type: enhancement versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15135] HOWTOs doesn't link to Idioms and Anti-Idioms article
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
New submission from Jon Clements jon...@googlemail.com: I'm not a numeric expert but I was looking at a post on S/O which related to converting a Fraction to a certain amount of decimal places. I've had a hunt on the tracker but couldn't find anything relevant, but if I've missed it, I apologise. # F=Fraction, D=Decimal classes If I try num = D( F(5, 7) ) I get: TypeError: Cannot convert Fraction(5, 7) to Decimal So I do: D(f.numerator) / D(f.denominator) Decimal('0.7142857142857142857142857143') Which I think is the correct result? I guess my question is - should Decimal do this implicitly for Fraction? -- components: Library (Lib) messages: 163397 nosy: joncle priority: normal severity: normal status: open title: Decimal accepting Fraction type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Ramchandra Apte maniandra...@gmail.com added the comment: +1 -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Mark Dickinson dicki...@gmail.com added the comment: I guess my question is - should Decimal do this implicitly for Fraction? I'd prefer not. All other cases of Decimal construction (from float, from string, etc.) are lossless with results that don't depend on the current context; construction from a Fraction will usually involve rounding, with results depending on the current rounding-mode and precision. Having the division operation explicit (making it obvious that there's rounding involved) looks better to me. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Jon Clements jon...@googlemail.com added the comment: Mark - I bow to your superiour knowledge here. However, would not a classmethod of .from_fraction be welcome? ie, I could write: d = D.from_fraction(5, 7) Then the documents labour the point about what you've mentioned? Just an idea, but fully realise you're the man best suited to decide, so I'll be happy with whatever you say. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Jon Clements jon...@googlemail.com added the comment: Not sure what's going on with my machine today: keep sending things to early. I meant: D.from_fraction(F) where if F is not of type Fraction, then the args are used to construct a Fraction - so can use an existing or create one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Mark Dickinson dicki...@gmail.com added the comment: would not a classmethod of .from_fraction be welcome? That depends. :-) Certainly a new classmethod seems better to me than extending the constructor to allow Fractions. I'm not convinced that there's a real need for this feature, though, especially given how easy it is do directly. So I'm -1 on extending the constructor, -0 on adding a .from_fraction method. I'm adding other decimally people to the nosy for their opinions. -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +rhettinger, skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4749] Issue with RotatingFileHandler logging handler on Windows
Thom Nichols tmnich...@gmail.com added the comment: I just ran into this issue, clearly it is old and Python 2.6, but I just experienced it in a single-process linux app running on a production embedded system. root@at91sam9g20ek:~# python Python 2.6.5 (r265:79063, Sep 28 2011, 11:52:59) [GCC 4.3.3] on linux2 The symptom is the original ValueError: I/O operation on closed file. I see one log file that has reached its max size and never rolls over and as a result, the app is unable to log anything. Has anyone since experienced related issues that could exhibit this behavior? -- nosy: +Thom.Nichols ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I cannot repro. On my ubuntu virtualbox I get: before: kristjan@kristjan-VirtualBox:~/cpython$ ./python -m timeit -s from _thread import allocate_lock allocate_lock() 1000 loops, best of 3: 0.0768 usec per loop kristjan@kristjan-VirtualBox:~/cpython$ ./python -m timeit -s from _thread import allocate_lock;l=allocate_lock() l.acquire();l.release() 100 loops, best of 3: 0.209 usec per loop after: kristjan@kristjan-VirtualBox:~/cpython$ ./python -m timeit -s from _thread import allocate_lock allocate_lock() 1000 loops, best of 3: 0.069 usec per loop kristjan@kristjan-VirtualBox:~/cpython$ ./python -m timeit -s from _thread import allocate_lock;l=allocate_lock() l.acquire();l.release() 1000 loops, best of 3: 0.182 usec per loop I did this a few times with consistent results. But virtual machines aren't the most stable of beasts. Perhaps someone with a proper unix box can test it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Mark Dickinson dicki...@gmail.com added the comment: BTW, the StackOverflow question helped me understand the use-case here: http://stackoverflow.com/q/11154954/270986 The perspective is that of a *Fraction* user who wants to be able to easily see the Decimal expansion of a Fraction to an arbitrary number of decimal places. (I was trying to understand why a *Decimal* user would care about converting from Fraction instances, but that's the wrong way around.) That desire to have an easy way to see the digits of a Fraction seems reasonable to me, but I'm not sure that having a Decimal method is the right way to go about it. Another possible solution would be to implement a decent __format__ method for Fraction, so that somebody could do: format(Fraction(1, 7), '.17g') '0.14285714285714286' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Antoine Pitrou pit...@free.fr added the comment: 64-bit Linux: ./python -m timeit -s from _thread import allocate_lock allocate_lock() - before: 0.0712 usec per loop - after: 0.0556 usec per loop ./python -m timeit -s from _thread import allocate_lock;l=allocate_lock() l.acquire();l.release() - before: 0.177 usec per loop - after: 0.168 usec per loop So there's a small improvement on artificial benchmarks. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Ronald Oussoren ronaldousso...@mac.com added the comment: The attached patch (issue1390-version1.txt) is not tested very well at the moment because I'm running into another problem when building on OSX 10.5, but should improve the build situation With this patch: * Configure will automatically pick clang when gcc is llvm-gcc (which miscompiles python3.3) * Configure will use the compiler embedded in Xcode.app when there is no compiler in /usr/bin (e.g. when using a clean install of Xcode 4.3) * Configure picks the most recent available SDK when using --with-universalsdk (cannot use '/' as the -isysroot because Xcode4.3 won't install headers in /usr/include unless you install the unix tools) * Distutils uses the configured compiler when available, and uses the same algorithm as configure when the configured compiler cannot be found * Distutils will remove '-arch ppc' from the compiler flags when that architecture is not supported (such as with recent Xcode 4 releases) I have build the tree on 10.7 and 10.6 with working tests. I'm now trying to build on 10.5 to generate the 32-bit installer, but ran into problems on my 10.5 machine: python.exe claims it cannot find the std. library. This is likely the known issue of Apple's GCC miscompiling python, but I haven't excluded other possibilities yet. -- Added file: http://bugs.python.org/file26081/issue1390-version1.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Kristján Valur Jónsson krist...@ccpgames.com added the comment: well, I'm thinking for example about threading.Condition, where Lock objects are being created and erased willy nilly. Also, locks are normally uncontested. The unconstested case is the one to optimize for. As such, the test cases are not artificial at all. The implementers of RLock in _threadingmodule obviously thought this was important, I'm merely bringing that same benefit to the Lock object. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
New submission from Zearin zea...@users.sourceforge.net: Cleaned up the source of the Standard Library’s `cmd` module. Attempted to focus on readability by changing things like using booleans instead of 0/1, newer syntax for string formatting, lining up variable declarations (judgement call), and adding comments between groups of methods. Used ace45d23628a to start my work. -- components: Library (Lib) files: cmd.py messages: 163409 nosy: zearin priority: normal severity: normal status: open title: Cleaned source of `cmd` module type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file26082/cmd.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The output of hg diff would be much appreciated, it's the only way for reviewers to realize the changes you made. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Antoine Pitrou pit...@free.fr added the comment: Also, locks are normally uncontested. The unconstested case is the one to optimize for. As such, the test cases are not artificial at all. Ok. I don't have any problem with the patch in principle (I didn't read it in detail). I was just a bit surprised that you cared so much about performance of lock allocation. If you want the patch to go in 3.3, you will have to commit it before the beta release, which is very soon (this week-end I think). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
Zearin zea...@users.sourceforge.net added the comment: Does `hg diff` produce different output than regular `diff`? If so, the patch created by regular `diff` is attached. (I basically did my work without using a local repo, and I have very little experience with patching. I basically just looked up how to create a patch with vanilla `diff`.) -- Added file: http://bugs.python.org/file26083/patch-cmd.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
R. David Murray rdmur...@bitdance.com added the comment: I appreciate the work and thought that went into this, but this is not normally the kind of change that we apply. Any change has a chance of introducing bugs (see, for example, issue 15109, where a seemingly innocuous change from % formatting to .format formatting caused a regression in 2.7.3 compared to 2.7.2). The other option, applying it just to default, is also not normally done, because then the code base between versions is gratuitously different, making merging more difficult. So, our general policy is that we do cleanups only when we are changing that area of code in order to fix a bug or add an enhancement. And as you can see from issue 15109, even then we sometimes get in trouble. Now, if you are interested in the maintenance of the cmd module, and can suggest one or more fix/enhancement + cleanup patches like Lucasz Lagna did for configparser, that would be wonderful. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
R. David Murray rdmur...@bitdance.com added the comment: Also as an FYI, triple double quote marks are our standard for docstrings. I don't believe we normally align assignments, but I don't know if that is specifically called out in PEP8. I haven't looked at the patch in detail, but in scanning it quickly, while some of your whitespace changes (spaces around operators) agree with our standards, others (extra spaces after a comma in a function call, for example) do not. Again, I appreciate your putting in this effort, and regret that it isn't something we can use. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Éric Araujo mer...@netwok.org added the comment: distutils.spawn.find_executable* -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Éric Araujo mer...@netwok.org added the comment: _binary_on_path looks unnecessary: distutils.util has a function to do that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.
Meador Inge mead...@gmail.com added the comment: At a guess, BITS.M should therefore look like Field type=c_int, ofs=0:17, bits=1 instead. Refined guess: it should be Field type=c_short, ofs=2:1, bits=1. This refined guess seems reasonable. Although, bitfield allocation order for GCC is dependent on the target ABI. What you have above is at least consistent with the System V i386 [1] and x86-64 [2] psABIs. Not sure about others (other targets and MSVC++ related ones). I tested the original test case plus the cases listed in the i386 psABI, all which seem to work. I did notice that this doesn't seem to be right for big-endian machines: from ctypes import * class S(BigEndianStructure): ... _fields_ = [(A, c_int, 17), (B, c_short, 1)] ... class T(LittleEndianStructure): ... _fields_ = [(A, c_int, 17), (B, c_short, 1)] ... s = S() s.B = 1 s.B -1 t = T() t.B = 1 t.B 0 The current implementation got the expected answer of -1 for 't.B' (although that is actually incorrect anyway because bitfields should never be treated as signed). So some big-endian tests and some tests that check the values stored in the fields will be useful. Finally, I think proposed allocation seems correct, but I must admit I am not clever enough to follow why the following part works :-) +/* Adjust current bit offset if necessary so that the next field + doesn't straddle a multiple of 8*dict-size. */ +if (*pbitofs ( +(*pbitofs + bitsize - 1) % (8*dict-size) != +bitsize + (*pbitofs - 1) % (8*dict-size))) +*pbitofs += (8*dict-size) - 1 - (*pbitofs - 1) % (8*dict-size); [1] http://www.uclibc.org/docs/psABI-i386.pdf [2] http://www.x86-64.org/documentation/abi.pdf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.
Changes by Meador Inge mead...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.
Mark Dickinson dicki...@gmail.com added the comment: Finally, I think proposed allocation seems correct, but I must admit I am not clever enough to follow why the following part works :-) Nor am I, any more, though it made sense when I wrote it. I'll see if I can make that a bit more readable. I see two goals here: (1) make the allocation sane and self-consistent, and also ideally document the algorithm ctypes uses (I know there's another issue already open for this), and (2) make the allocation match common compilers. (2) may not be easy / possible... I did some random testing on my machine (x64, OS X, gcc 4.2), which seems to show that the bitfield allocation algorithm for gcc works roughly like this: def simulated_layout(flags): bitpos = 0 for ctype, width in flags: if width is None: # Plain old integer field (not a bitfield) width = 8 * sizeof(ctype) space = -bitpos % (8 * sizeof(ctype)) if width space: bitpos += space offset, start = divmod(bitpos, 8 * sizeof(ctype)) yield offset * sizeof(ctype), start, width bitpos += width At least, my simple and limited random tests have yet to discover a case where this differs from what gcc actually does on my machine, while they're pretty quick to find differences between what gcc does and what ctypes does. I've attached the script in case it's of interest (please don't judge too harshly---it was written quickly and the style leaves something to be desired). In particular, I didn't include signed integers in the tests; sounds like that's a potential complicating factor. -- Added file: http://bugs.python.org/file26084/ctypes_bitfields.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.
Mark Dickinson dicki...@gmail.com added the comment: this doesn't seem to be right for big-endian machines Right; I didn't pay too much attention to the big-endian case; definitely there should be lots of tests there, so that at least the buildbots have a chance of picking up problems. (Do we currently *have* any big-endian buildbots? I see one Sparc and one PPC machine, but it looks like they're both currently offline.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
New submission from Guido van Rossum gu...@python.org: This bug is still present in Python 3.3. Some people use urlsafe strings *a lot*. And they find that the (obvious) implementation in base64.py is way too slow. In fact, I found myself writing the following a few times in App Engine libraries: # This is 3-4x faster than urlsafe_b64decode() urlsafe = base64.b64encode(arg) return urlsafe.rstrip('=').replace('+', '-').replace('/', '_') Someone from YouTube told me they patch the stdlib for the same reason (they claim their solution is 10x faster). IIUC the cause of the slowness is the (mostly irrelevant) generality in b64encode and the _translate() function. -- components: Library (Lib) keywords: easy messages: 163420 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: base64.urlsafe_b64**code are too slow type: performance versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Ronald Oussoren ronaldousso...@mac.com added the comment: Thanks, I'll add it to the patch when I have a working build again. Looks like I get a failure because pybuilddir.txt is not created, and that's because ./python.exe setup.py build crashes when distutils.sysconfig tries to import subprocess (which tries to import time, which cannot be found because it is not build yet. I'm switching to os.popen in my patch, that should be good enough for that code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Jesús Cea Avión j...@jcea.es added the comment: This is a feature request, not a bug. Marking for 3.3. -- nosy: +jcea versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
New submission from Kristján Valur Jónsson krist...@ccpgames.com: This patch is based on work previously done locally in python 2.7, see http://blog.ccpgames.com/kristjan/2012/05/25/optimizing-python-condition-variables-with-telemetry/ The idea is to acquire the signaling Lock() of the threading.Condition object _and_ the outer lock, without releasing and re-aquiring the GIL in between that is, as an atomic operation from the program's point of view. _thread.LockType objects, used by the Condition object, now have an _acquire_condition method which knows how to do it for LockType and RLock objects. Both lock types grow _release_save and _acquire_restore methods, the latter of which is a no-op. _acquire_coindition() will ignore any other kinds of locks, including subclasses (if such things exist). The result of this is a very marked improvement in signaling time on a contested machine. A file, queuetest.py is provided which measures the wakeup delay. Typical before the change: best:totaltime: 0.167006, avg delay: 0.004766, delay_stddev: 0.002058 typical: totaltime: 0.154271, avg delay: 0.027621, delay_stddev: 0.007479 after the change typical: totaltime: 0.169217, avg delay: 0.001410, delay_stddev: 0.000722 -- components: Interpreter Core, Library (Lib) files: condition.patch keywords: patch messages: 163423 nosy: kristjan.jonsson priority: normal severity: normal status: open title: Speed up threading.Condition wakeup type: performance versions: Python 3.3 Added file: http://bugs.python.org/file26085/condition.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Changes by Kristján Valur Jónsson krist...@ccpgames.com: Added file: http://bugs.python.org/file26086/queuetest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Jesús Cea Avión j...@jcea.es added the comment: Guido, would your patch be enough?. Is a 3x improvement enough?. What improvement could be acceptable?. Implemented in C in binascii module? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Lock release (the silly saninty check) and acquisition of an uncontested lock. I was waiting for that other windows lock stuff to go in before doing this, because I thought they might actually overlap in implementation, which they didn't. I'll check this in later. Meanwhile look at the other, slightly more contentious patch, issue #15139. (condition variables are the whole reason I've been messing around with locks of late, since I had to make sure my threadpool-related HTTP requests on the PS3 performed adequately) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9527] Add aware local time support to datetime module
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10592] pprint module doesn't work well with OrderedDicts
Changes by Matt Barr mar...@gmail.com: -- nosy: +Matt.Barr ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10592 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Antoine Pitrou pit...@free.fr added the comment: I think this should wait for 3.4. It's a bit too late now. -- nosy: +pitrou, sbt stage: - patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15083] Rewrite ElementTree tests in a cleaner and safer way
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Kristján Valur Jónsson krist...@ccpgames.com added the comment: aw, that's too bad. Since this is not a feature implementat, we have the entire beta cycle to shake out any possible bugs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Antoine Pitrou pit...@free.fr added the comment: aw, that's too bad. Since this is not a feature implementat, we have the entire beta cycle to shake out any possible bugs. We treat performance improvements as new features, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9527] Add aware local time support to datetime module
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 88a5f2730579 by Alexander Belopolsky in branch 'default': Issue #9527: datetime.astimezone() method will now supply a class http://hg.python.org/cpython/rev/88a5f2730579 New changeset 336c53c1f547 by Alexander Belopolsky in branch 'default': Issue #9527: datetime.astimezone() method will now supply a class http://hg.python.org/cpython/rev/336c53c1f547 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Guido van Rossum gu...@python.org added the comment: Why would it be a feature? There is no change in semantics, only in speed. Do we have a policy that forbids performance enhancements in bugfix releases? (It doesn't really matter, I'm just curious. Also, if it really was a feature request, it couldn't be introduced once the 3.3 beta has started, which would strike me as silly.) Anyway, I don't think my hack should be applied literally; I was more thinking of memoizing the translation table and inlining the _translate call. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10142] Support for SEEK_HOLE/SEEK_DATA
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset de2a0cb6ba52 by Jesus Cea in branch 'default': Closes #10142: Support for SEEK_HOLE/SEEK_DATA http://hg.python.org/cpython/rev/de2a0cb6ba52 -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Antoine Pitrou pit...@free.fr added the comment: Do we have a policy that forbids performance enhancements in bugfix releases? Yes, except when it fixes a regression. I don't know where that policy is codified, but it seems quite ingrained. It also means the window for getting it in 3.3 is getting narrow, the beta being so soon :) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Jon Clements jon...@googlemail.com added the comment: The more I think about this - the shades of grey kick in. D.from_fraction(F or creatable F) Then it would be 'reasonable to assume' for a F.to_decimal() to exist. Possibly with an optional context argument. Then, what happens if I do D('2.45') * F(24 / 19)... I'll leave it to the experts, but have noticed Raymond has ideas for this, but not yet commented? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7582] Use ISO timestamp in diff.py
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ec95b94ea831 by Alexander Belopolsky in branch 'default': Issue #7582: Use ISO timestamp in diff.py http://hg.python.org/cpython/rev/ec95b94ea831 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Guido van Rossum gu...@python.org added the comment: Here's a patch. It makes urlsafe_b64{en,de}code about 4x faster on my machine. The tests in base64_test.py still pass. -- keywords: +patch Added file: http://bugs.python.org/file26087/base64.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Kristján Valur Jónsson krist...@ccpgames.com added the comment: hm, still one more day. It will be a pity to wait two more years, perhaps Georg is feeling lucky :) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15116] remove out-of-date Mac application scripting documentation
hhas h...@users.sourceforge.net added the comment: @Ned: The whole page has been needing updated for years, but no-one's ever quite managed to complete it. In that light, might I suggest a two-step approach? 1. Edit the existing text now to remove all the obsolete info (e.g. section 4.1.2. is also defunct) and check in those changes before end of this month. 2. Develop whatever shiny new content you think is needed at your leisure. That way, if step 2 takes longer than expected (and creating new material always does), at least the current errors won't appear in the next release. The update to the OSA page can also be done immediately, as that's just a straight text deletion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14591] Value returned by random.random() out of valid range on 64-bit
Mark Dickinson dicki...@gmail.com added the comment: Raymond, can this patch be applied? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Serhiy Storchaka storch...@gmail.com added the comment: $ ./python -m timeit -s from base64 import urlsafe_b64encode; url=bytes(range(256)) urlsafe_b64encode(url) 1 loops, best of 3: 73.5 usec per loop $ ./python -m timeit -s from base64 import b64encode; url=bytes(range(256)) b64encode(url).replace(b'+', b'-').replace(b'/', b'_') 10 loops, best of 3: 18.9 usec per loop $ ./python -m timeit -s from base64 import b64encode; url=bytes(range(256)); tr=bytes.maketrans(b'+/', b'-_') b64encode(url).translate(tr) 10 loops, best of 3: 15.6 usec per loop -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Guido van Rossum gu...@python.org added the comment: Heh. I'd forgotten about maketrans. Here's a patch that kills the _translate() helper function completely. -- Added file: http://bugs.python.org/file26088/base64.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Serhiy Storchaka storch...@gmail.com added the comment: You're faster than me. I think that asserts should be replaced by if/raise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9527] Add aware local time support to datetime module
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a7237f157625 by Alexander Belopolsky in branch 'default': Issue #9527: Fixes for platforms without tm_zone http://hg.python.org/cpython/rev/a7237f157625 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15138] base64.urlsafe_b64**code are too slow
Guido van Rossum gu...@python.org added the comment: I didn't touch that assert. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4489] shutil.rmtree is vulnerable to a symlink attack
Hynek Schlawack h...@ox.cx added the comment: Here is my revised patch with Martin's code integrated. Differences: - fixed docs - added some tests, test_on_errors could still use some refactorings though - renamed _rmtree_safe to _rmtree_safe_fd so we can implement more of them - _rmtree_safe_fd _rmtree_unsafe don't need default arguments and the unsafe version also doesn't need argument normalization as both get onerror filled out by rmtree. If nobody objects, I'd commit it soonish (definitely before Sunday). -- Added file: http://bugs.python.org/file26089/mvl-revisited-plus-docs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15121] devguide doesn't document all bug tracker components
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15121 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9527] Add aware local time support to datetime module
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7582] Use ISO timestamp in diff.py
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13556] When tzinfo.utcoffset is out-of-bounds, the exception message is misleading
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Fixed in changeset a7237f157625. -- resolution: - fixed status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13556 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5023] Segfault in datetime.time.strftime(%z)
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Since no one is able to reproduce this crash, I am going to close this issue. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5023 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8355] diff.py produce unified format by default
anatoly techtonik techto...@gmail.com added the comment: Reopening for Python 3. Does anybody still use context diffs nowadays? -- status: closed - open versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8355 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7582] Use ISO timestamp in diff.py
anatoly techtonik techto...@gmail.com added the comment: Thanks. I am glad OS TZ support finally issue took off. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15140] PEP 384 inconsistent with implementation
New submission from Antoine Pitrou pit...@free.fr: In PEP 384, the PyType_Spec struct has a const char *doc that is not present in the implementation (Include/object.h). -- assignee: docs@python components: Documentation messages: 163449 nosy: docs@python, loewis, pitrou priority: normal severity: normal stage: needs patch status: open title: PEP 384 inconsistent with implementation type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15140 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8355] diff.py produce unified format by default
Éric Araujo mer...@netwok.org added the comment: The reasons for rejecting this still apply. -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8355 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15114] Deprecate strict mode of HTMLParser
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15114 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15083] Rewrite ElementTree tests in a cleaner and safer way
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8355] diff.py produce unified format by default
anatoly techtonik techto...@gmail.com added the comment: The reasons for rejecting this still apply. Which specifically are valid for 3.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8355 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- assignee: - belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15141] IDLE horizontal scroll bar missing (Win-XPsp3)
New submission from Pat pasqual...@ymail.com: There is no horizontal scroll bar at the bottom of the IDLE editor window. When a program line exceeds the window area, the window has to be widened, or text has to be manually selected beyond the window to see or edit that portion of the line. No major problem, just a minor inconvenience. Even with this bug, IDLE is still a great editor. Thank you. Pat -- components: IDLE messages: 163452 nosy: NyteHawk priority: normal severity: normal status: open title: IDLE horizontal scroll bar missing (Win-XPsp3) versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15141 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1644987] ./configure --prefix=/ breaks, won't build C modules
Jesús Cea Avión j...@jcea.es added the comment: Closing, since this is ancient. Please, open a new bug if still relevant (for 2.7, 3.2 or 3.3). -- assignee: tarek - serwy nosy: +serwy resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1644987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue444582] Finding programs in PATH, adding shutil.which
R. David Murray rdmur...@bitdance.com added the comment: Added some review comments on latest patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue444582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset dfc7fd24983a by Kristjan Valur Jonsson in branch 'default': Issue #15124: Optimize _thread.LockType deletion and acquisition when http://hg.python.org/cpython/rev/dfc7fd24983a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
Nicu Stiurca supernic2...@gmail.com added the comment: Re-selecting Python 2.6 under version (I think it was accidentally unselected). Here as another related error: if I try to add dest=baz to the a.add_argument() call, it throws ValueError: dest supplied twice for positional argument -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
R. David Murray rdmur...@bitdance.com added the comment: Nope, it was intentionally unselected. We use versions for the versions in which we will fix the bug, and 2.6 gets only security patches at this point. In any case, argparse isn't part of the stdlib in 2.6. -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1644987] ./configure --prefix=/ breaks, won't build C modules
R. David Murray rdmur...@bitdance.com added the comment: I took the five minutes to test this. It does not fail in 2.7. I remember we fixed some other issues with '-prefix=/', so I presume this got fixed at that time as a byproduct. Either that, or it was a Fedora bug of some sort. -- assignee: serwy - nosy: +r.david.murray resolution: out of date - fixed stage: test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1644987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15140] PEP 384 inconsistent with implementation
Martin v. Löwis mar...@v.loewis.de added the comment: It's a bug in the PEP: users need to provide the module documentation through Py_tp_doc (which actually is mentioned in the PEP). I'll fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15140 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14785] Add sys._debugmallocstats()
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d63a80abfbec by David Malcolm in branch 'default': Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues http://hg.python.org/cpython/rev/d63a80abfbec -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
R. David Murray rdmur...@bitdance.com added the comment: Oh, and to make sure your second report doesn't get lost, could you open another issue for the other bug, and give a complete example? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14837] Better SSL errors
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 96513d71e650 by Antoine Pitrou in branch 'default': Issue #14837: SSL errors now have `library` and `reason` attributes describing precisely what happened and in which OpenSSL submodule. http://hg.python.org/cpython/rev/96513d71e650 New changeset e193fe3d017e by Antoine Pitrou in branch 'default': Add forgotten files for #14837. http://hg.python.org/cpython/rev/e193fe3d017e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14837] Better SSL errors
Antoine Pitrou pit...@free.fr added the comment: There it is, Georg :) As mentioned in the commit message, this unfortunately creates a reference leak, which is apparently related to the use of the stable ABI. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com