[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
Craig Younkins added the comment: > cgi.escape is for HTML attribute escaping only. It is not safe for HTML attribute escaping because it does not encode single quotes. > "More suitable" for HTML would be the correct interpretation rather make the > "input safe&qu

[issue1172711] long long support for array module

2010-06-23 Thread Craig McQueen
Craig McQueen added the comment: So it looks as though this isn't going in to Python 2.7. How about 3.x? -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issu

[issue9066] Standard type codes for array.array, same as struct

2010-06-23 Thread Craig McQueen
New submission from Craig McQueen : The type codes for array.array are platform-dependent. The type codes are similar to those for the struct module. It would be helpful for array.array to adopt the struct module's "=" format specifier prefix, to specify "

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-07-01 Thread Craig McQueen
Craig McQueen added the comment: A follow-on re the cx_Freeze issue: I looked at the source code, and found it doesn't seem to be doing any thread creation. But I found that in the initscripts/Console.py, there are the following lines: if sys.version_info[:2] >= (2, 5):

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-04 Thread Craig McQueen
New submission from Craig McQueen : Working in Japan, I find it very helpful to be able to read full Unicode arguments in Python 2.x under Windows 2000/XP. So I am using the following: http://stackoverflow.com/questions/846850/how-to-read-unicode-characters-from-command-line-arguments-in

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-04 Thread Craig McQueen
Craig McQueen added the comment: My program currently uses ASCII options, so I can change the Unicode string parameter to byte string. The optparse module still seems to match the option against the incoming Unicode argv, I guess by implicit string conversion

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-05 Thread Craig McQueen
Craig McQueen added the comment: To further explain, I had code e.g.: parser.add_option(u'-s', u'--seqfile', dest='seq_file_name', help=u'Write sequence file output to FILE', metavar=u'FILE') I had to remove the unicode designator for

[issue9195] Link in docs from "String Formatting Operations" to "Template Strings"

2010-07-07 Thread Craig McQueen
New submission from Craig McQueen : I stumbled across "Template Strings" of PEP 292 by accident recently. I'd never heard of it before. I'm familiar with the "string interpolation" aka "String Formatting Operations", and I know to find that in th

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2010-07-08 Thread Craig McQueen
New submission from Craig McQueen : I have just been trying to figure out how string interpolation works for "%s", when Unicode strings are involved. It seems it's a bit complicated, but the Python documentation doesn't really describe it. It just says %s "converts any

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2010-07-08 Thread Craig McQueen
Craig McQueen added the comment: Another thing I discovered, for Example 1: 4. If test_object.__str__() returns a Unicode object (for some reason), and test_object.__unicode__() does not exist, then the Unicode value from the __str__() call is used as-is (no conversion to string, no encoding

[issue7696] Improve Memoryview/Buffer documentation

2010-07-11 Thread Craig McQueen
Craig McQueen added the comment: The documentation implies that memoryview always accesses bytes: * "len(view) returns the total number of bytes in the memoryview, view." * "Taking a single index will return a single byte." But, the following example shows this is misle

[issue7696] Improve Memoryview/Buffer documentation

2010-07-11 Thread Craig McQueen
Craig McQueen added the comment: My previous comment was referring to Python 3.x, by the way. Python 2.7 has not implemented the buffer protocol for `array`. -- ___ Python tracker <http://bugs.python.org/issue7

[issue7696] Improve Memoryview/Buffer documentation

2010-07-19 Thread Craig McQueen
Craig McQueen added the comment: I've seen the changes Mr Pitrou made, both for the 2.x and 3.x docs. That's a good improvement--thanks very much. -- ___ Python tracker <http://bugs.python.

[issue7639] bdist_msi fails on files with long names

2010-07-23 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue7639> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4755] Common path prefix

2010-07-25 Thread Craig McQueen
Craig McQueen added the comment: http://code.activestate.com/recipes/577016-path-entire-split-commonprefix/ -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue4

[issue23407] os.walk always follows Windows junctions

2017-01-12 Thread Craig Holmquist
Craig Holmquist added the comment: Can you point me toward any documentation on the additional tags you want to support? Searching for IO_REPARSE_TAG_IIS_CACHE mostly seems to yield header files that define it (and nothing at all on MSDN), and the non-Microsoft tags just yield a few results

[issue23407] os.walk always follows Windows junctions

2017-01-13 Thread Craig Holmquist
Craig Holmquist added the comment: FWIW, the only name-surrogate tags in the user-mode SDK headers (specifically winnt.h) are IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK, as of at least the Windows 8.1 SDK. -- ___ Python tracker <h

[issue23407] os.walk always follows Windows junctions

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: Here's a new patch: now, _Py_attribute_data_to_stat and Py_DeleteFileW will just use the IsReparseTagNameSurrogate macro to determine if the file is a link, so os.walk etc. will know not to follow them. os.readlink, however, will only work with junc

[issue29248] os.readlink fails on Windows

2017-01-14 Thread Craig Holmquist
Changes by Craig Holmquist : -- keywords: +patch Added file: http://bugs.python.org/file46290/issue29248.patch ___ Python tracker <http://bugs.python.org/issue29

[issue23407] os.walk always follows Windows junctions

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: New patch with spaces instead of tabs -- Added file: http://bugs.python.org/file46291/issue23407-4.patch ___ Python tracker <http://bugs.python.org/issue23

[issue29248] os.readlink fails on Windows

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: New patch with test. I'm not sure if C:\Users\All Users and C:\ProgramData exist with those names on non-English installations of Windows. I set the test to skip if they aren't found. -- nosy: +craigh Added file: http://bugs.python.org

[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel
New submission from Craig McDaniel: Running "setup.py bdist_rpm" throws an exception on some libraries (e.g. - simplejson) since 2.7.4 due to introduction of get_python_version(): Traceback (most recent call last): File "setup.py", line 103, in run_setup(True) File

[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel
Craig McDaniel added the comment: Closing; duplicate of 18045 -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue23407] os.walk always follows Windows junctions

2015-02-07 Thread Craig Holmquist
New submission from Craig Holmquist: os.walk follows Windows junctions even if followlinks is False: >>> import os >>> appdata = os.environ['LOCALAPPDATA'] >>> for root, dirs, files in os.walk(appdata, followlinks=False): ... print(root) C:\Users\Tes

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
New submission from Craig Holmquist: Running the attached test script: $ time python test.py enum real0m6.546s user0m6.530s sys 0m0.007s $ time python test.py int real0m0.384s user0m0.377s sys 0m0.000s I encountered this with a script that yielded a sequence of

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
Craig Holmquist added the comment: I may not have been clear before. What I mean is, code like this: for obj in get_objects(): if obj.category == Cat.cat1: #do something elif obj.category == Cat.cat2: #do something else elif obj.category == Cat.cat3 or obj.category

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
Craig Holmquist added the comment: It seems like performance is drastically improved by doing this: class Category(Enum): tiny = 1 medium = 2 large = 3 tiny = Category.tiny medium = Category.medium In other words, resolving Category.tiny and Category.medium is what's slow.

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway : -- keywords: +patch Added file: http://bugs.python.org/file39877/urllib.patch ___ Python tracker <http://bugs.python.org/issue24

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
New submission from Craig Northway: Patch containing additional tests for urllib module to increase code coverage for url parsing. Current coverage: Lib/urllib/parse 51320261% Updated coverage: Lib/urllib/parse 51313973% -- components

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway : -- versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue24579> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Craig Northway added the comment: Whoops, looks like there is definitely some redundancy. I didn't notice those tests at the time I wrote these (PyCon AU last year) and while I have been grappling with getting permission to make the contributions it looks like it's been worked on a

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-25 Thread Craig Holmquist
New submission from Craig Holmquist: If the authenticator object passed to the IMAP authenticate method tries to abort the handshake by returning None, TypeError is raised instead of sending the * line to the server. >>> import imaplib >>> imap = imaplib.IMAP4_S

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-30 Thread Craig Holmquist
Craig Holmquist added the comment: New patch is attached. -- Added file: http://bugs.python.org/file38749/imap_auth2.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-31 Thread Craig Holmquist
Craig Holmquist added the comment: Okay, I attached another patch. The new version of the test returns success if the client's response is anything other than the abort line (*\r\n). It fails with the current version of imaplib, fails if I change _Authenticator.process to output a

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: The attached patch changes _Py_attribute_data_to_stat to set S_IFLNK for both symlinks and junctions, and changes win_readlink to return the target path for junctions (IO_REPARSE_TAG_MOUNT_POINT) as well as symlinks. I'm not sure what to do as far as a

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: Actually, it looks like there is already a way to create junctions and a test for them in test_os. However, it includes this line: # Junctions are not recognized as links. self.assertFalse(os.path.islink(self.junction)) That suggests the old

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: Updated patch with changes to Win32JunctionTests. -- Added file: http://bugs.python.org/file44824/issue23407-2.patch ___ Python tracker <http://bugs.python.org/issue23

[issue1947] Exception exceptions.AttributeError '_shutdown' in

2011-09-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: In case Google brings anyone else to this bug: this error typically indicates that a `threading.py` which is not actually the Standard Library's `threading` module has somehow wound up on an earlier path in `sys.path` and is therefore shadowin

[issue13477] tarfile module should have a command line

2011-11-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The tarfile module should have a simple command line that allows it to be executed with "-m" — even if its only ability was to take a filename and extract it to the current directory, it could be a lifesaver on Windows machines where Pytho

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, I think your points are good ones. (And, as I return to this patch after three months, I should thank the PSF for sponsoring the CPython sprint here at PyOhio, and creating this opportunity for me to continue trying to land this patch!) I am

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, I think your suggestions are all good ones, and I have incorporated them into the file. (But do note that the departures we are now making from Ned's own copy of the tracer code ­— removing the commented-out debugging statement, and the

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-04 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Ezio and Sandro, thank you very much for your attention to this issue, and for helping me split it into manageable chunks! To answer the question about why "coverage" does not show as high a total as it ought: it's because coverage nor

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-09-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Brett, yes, you are welcome to close this issue — Ned quite handily convinced me that coverage code belongs in the "coverage" distribution, not languishing about in the CPython source tree. That solution also quite beautifully solves the

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-08-30 Thread Craig de Stigter
New submission from Craig de Stigter : Steps to reproduce: # create a large (>4gb) file f = open('foo.txt', 'wb') text = 'a' * 1024**2 for i in xrange(5 * 1024): f.write(text) f.close() # now zip the file import zipfile z = zipfile.ZipFile('foo.zi

[issue9723] pipes.quote() needs to be documented

2010-08-31 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The only way to safely build shell command lines from inside of Python — which is necessary when sending commands across SSH, since that behaves like os.system() rather than like subprocess.call() — is to use the wonderful pipes.call() method to turn

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-03 Thread Craig de Stigter
Craig de Stigter added the comment: Yes, the bug still exists in Python 3.1.2. However, struct.pack() no longer silently ignores overflow, so I get this error instead: >>> z.write('foo.txt') Traceback (most recent call last): File "", line 1, in File &

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-05 Thread Craig de Stigter
Craig de Stigter added the comment: Hi, sorry no I haven't had time to add a real test for this -- ___ Python tracker <http://bugs.python.org/issue9720> ___ ___

[issue5131] pprint doesn't know how to print a defaultdict

2010-09-29 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Raymond Hettinger (rhettinger) wrote: > Ben, I don't think there is any value is opening more issues like > pprint-doesn't-handle-object-x (named tuples, defautdicts, deques, > generators, etc). > > As it is currently designed, pp

[issue5131] pprint doesn't know how to print a defaultdict

2010-10-01 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Terry J. Reedy (terry.reedy) wrote: > > IMHO pprint should be able to make a decent job of all the built in types > > Agreed, already true as far as I know, and irrelevant. This issue is not > about built-in types in the builtins module, as

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : When running the Python regression tests in "coverage", the initial outer level of interpreted code in several standard library modules shows as not having been covered by the tests, because they were imported during the Python boot proces

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Here is a module that solves this problem if the tests are run with the "fullcoverage" directory at the front of the PYTHONPATH, like this: PYTHONPATH=Tools/fullcoverage ./python -m coverage run --pylib Lib/test/regrtest.py

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The attached patch will bring Lib/copy.py to 100% test coverage. A bug in "coverage" results in its only reporting 99% at the moment; see coverage issue #122 on bitbucket: https://bitbucket.org/ned/coveragepy/issue/122/for-else-always-repor

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Benjamin, I would like some way to know when our tests achieve 100% coverage because otherwise I will keep coming back to this module to add more tests and have to re-discover code that is not CPython relevant. But for now I have removed the pragmas

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Changes by Brandon Craig Rhodes : Removed file: http://bugs.python.org/file21245/test_copy2.patch ___ Python tracker <http://bugs.python.org/issue502085> ___ ___ Pytho

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Benjamin, thanks for the pointers! The attached patch now uses assertIs() and assertIsNot(), and calls self.fail() instead of using the exception from "support". In the future I would like some way to determine when test coverage is fully ac

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, the Makefile in Python trunk seems to include Objects/complexobject.o in the build unilaterally without any way to turn it off. What is leading you to believe that Python 3 can conditionally turn the "complex" type off during a build?

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Antoine, neither this issue, nor either version of my patch, was intended to assert that 100% test coverage indicates that a test of tests are complete. If you will point out where in the text this is implied, I will correct it. Thanks

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-18 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, after checking line 112 of the two patches and then of the new file, I figured out that you meant line 112 of the old file — and, yes, that test can go away too since in python3 "complex" always exists and "unicode" neve

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Nick Coghlan writes: > Nick Coghlan added the comment: > > Regarding "__reduce__", other readers will have the same question Éric > did, so that point should definitely go in a comment after the > "__reduce_ex__" che

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-21 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Nick Coghlan writes: > Regarding "__reduce__", other readers will have the same question Éric > did, so that point should definitely go in a comment after the > "__reduce_ex__" check. I just sat down to review this issu

[issue12056] "…" (HORIZONTAL ELLIPSIS) should be an alternative syntax for "..." (FULL STOP FULL STOP FULL STOP)

2011-05-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: But if we allow for ellipsis, then would we not also have to start allowing characters like ≥ and ≤ in Python? And the problem with any of these (admittedly very attractive) substitutions is that they seem to abandon the principle of there being One

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : If you try doing "msg.as_string()" to a MIMEMultipart message that has not been given a boundary, then it dies with this exception: Traceback (most recent call last): File "mime_gen_alt.py", line 40, in print(msg.as_str

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Here is a patch that fixes the problem. The problem probably only occurs if the MIMEMultipart is actually given several MIME parts to use in its interior. -- keywords: +patch Added file: http://bugs.python.org/file20391/email-boundary.diff

[issue10979] setUpClass exception causes explosion with "-b"

2011-01-21 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : Normally, unittest cleanly reports an exception in a setUpClass method. But if I place the attached test in a directory by itself and then run "python -m unittest discover -b" from inside of the same directory, then instead of being

[issue8264] hasattr doensn't show private (double underscore) attributes exist

2010-03-30 Thread Nick Craig-Wood
New submission from Nick Craig-Wood : I just spend a while tracking down a bug in my code which turned out to be an unexpected behaviour of hasattr. Running this class Test(object): def __init__(self): self.__private = "Hello" def test(self): print(self

[issue8517] Apple Style Guide link is broken in the "Documenting Python" chapter

2010-04-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : On this page, the Style Guide for people who want to try contributing to the Python documentation: docs.python.org/documenting/style.html there is a broken link to the Apple Style Guide. The 2008 edition now seems gone and people are now apparently

[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-02-02 Thread Nick Craig-Wood
New submission from Nick Craig-Wood : I noticed this the other day when debugging a program that neither set() nor defaultdict() pprint() properly Same under 3.1 and 2.5 (Not tried 2.6/2.7 but I assume it is the same) >>> pprint(set(range(100))) set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1

[issue17855] Implement introspection of logger hierarchy

2013-06-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Adding an entirely separate API for introspection strikes me as counter-productive — instead of merely having to maintain the logging API that you already maintain, you will additionally now have an entirely separate and second API that also has to be

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, your patch is a wonderful idea—I am about to commit production code that will have to create tens of thousands of temporary files during operation, one file each time SSL is started up on a socket, which could be avoided if something like this

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-24 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, you are certainly correct that a single-argument that can be either a filename or a cert is inappropriate; we should not be peeking inside of strings to guess what they contain. And I think you also have a good point about Pythonic-ness when

[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-03-30 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: I couldn't actually get this patch to apply to the py3k branch :-( $ patch -p0 --dry-run < issue_5131.patch patching file Misc/NEWS Hunk #1 FAILED at 2598. 1 out of 1 hunk FAILED -- saving rejects to file Misc/NEWS.rej patching file Misc/ACKS

[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-03-31 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Oops, my bad, I assumed the patch would by for py3k! I applied it to trunk and tested it. It works very well - thank you for fixing that :-) -- ___ Python tracker <http://bugs.python.org/issue5

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The "multiprocessing" module uses a bare fork() to create child processes under Linux, so the children get a copy of the entire state of the parent process. But under Windows, child processes are freshly spun-up Python interpreters with n

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Jesse, it's great to learn it's on your wish list too! Should I design the patch so that (a) there is some global in the module that needs tweaking to choose the child creation technique, or (b) that an argument to the Process() constructo

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-04 Thread Nick Craig-Wood
New submission from Nick Craig-Wood : sqlite3.Warning isnt a subclass of exceptions.Warning This causes this problem when trying to filter warnings >>> import sqlite3 as DB >>> from warnings import filterwarnings >>> filterwarnings("always", category=DB

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-04 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: I've attached a patch to fix the issue along with a revised test. -- ___ Python tracker <http://bugs.python.org/i

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-04 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: I re-worked the patch for python 3.x (py3k branch) - the other was for 2.x (trunk) Basically the same patch and fixes the issue according to my testing -- Added file: http://bugs.python.org/file18386/sqlite3-warning-fix-py3k.patch

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-05 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: I think the fact that sqlite may not be using the warnings properly is independent of this problem. Warnings should be filterable, but if sqlite isn't notifying them properly - that would be a different bug. BTW I came across this problem when tryi

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-05 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Reading PEP 0249 I can see Gerhard is correct, this patch would violate the PEP. I think that the PEP is slightly flawed in that users are encouraged to raise exceptions called "Warning". IMHO a Warning is never an exceptional condition and

[issue17370] PEP should not if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes: A friend (@theomn on Twitter) was just working off of PEP-333 when I mentioned to him that PEP-, and he had never heard of it, and he expressed the wish that PEPs would have a banner or something at the top if there is a more recent version of

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: (Corrected "not" to "note" in the title and went with "enhancement") -- title: PEP should not if it has been superseded -> PEP should note if it has been superseded type: -> enhancement __

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: The original inspiration: https://twitter.com/theomn/status/309468740611891200 -- ___ Python tracker <http://bugs.python.org/issue17

[issue13477] tarfile module should have a command line

2013-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Larry Hastings writes: > Huh. tar *can* infer it from the data itself. On the other hand, it > chooses explicitly not to. I guess "tar" knows explicit is better > than implicit too ;-) I am told that the refusal of "tar&qu

[issue24049] Remove unused code in symtable.c and fix docs for import * checking

2015-04-24 Thread Nick Craig-Wood
New submission from Nick Craig-Wood: Here is a patch to remove some unused code in `symtable.c` In Python3 `from x import *` was banned from use in functions completely. This is detected by `symtable_visit_alias` if (st->st_cur->ste_type != ModuleBlock) { int linen

<    1   2