[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Thomas Guettler
Thomas Guettler added the comment: The docs should be where new users look. I don't speak about several hundret words Where do you think new users look for documentation if they want a method which does find a module? -- ___ Python tr

[issue23342] run() - unified high-level interface for subprocess

2015-03-19 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks, that was an oversight. Patch 5 adds CompletedProcess to __all__. -- Added file: http://bugs.python.org/file38574/subprocess_run5.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23735] Readline not adjusting width after resize with 6.3

2015-03-21 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue23735> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23342] run() - unified high-level interface for subprocess

2015-04-08 Thread Thomas Kluyver
Thomas Kluyver added the comment: I am still keen for this to move forwards. I am at PyCon if anyone wants to discuss it in person. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23342] run() - unified high-level interface for subprocess

2015-04-08 Thread Thomas Kluyver
Thomas Kluyver added the comment: Great! I'm free after my IPython tutorial this afternoon, all of tomorrow, and I'm around for the sprints. -- ___ Python tracker <http://bugs.python.o

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-13 Thread Thomas Wouters
Thomas Wouters added the comment: I left some style comments in the rietveld review. However, a bigger questions is whether we should change list at all. I think we should; the change is fairly straightforward, there is some value in it and it's a good idea to keep bytearray and other mu

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-04-13 Thread Thomas Ballinger
Thomas Ballinger added the comment: v4 of patch, with tests updated for changed lines in inspect fodder file -- Added file: http://bugs.python.org/file38959/issue21217-v4.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-04-13 Thread Thomas Ballinger
Thomas Ballinger added the comment: Patch reformatted to be non-git style, NEWS item removed -- Added file: http://bugs.python.org/file38965/issue21217-v5.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-04-13 Thread Thomas Ballinger
Thomas Ballinger added the comment: Use dis.findlinestarts() to find lines of function instead of grubbing with co_lnotab manually, making dis module dependency non-optional. -- Added file: http://bugs.python.org/file38970/issue21217-v6.patch

[issue23342] run() - unified high-level interface for subprocess

2015-04-14 Thread Thomas Kluyver
Thomas Kluyver added the comment: 6a following in-person review with Gregory: - Reapplied to the updated codebase. - Docs: mention the older functions near the top, because they'll still be important for some time. - Docs: Be explicit that combined stdout/stderr goes in stdout attr

[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2015-04-14 Thread Thomas Wouters
Thomas Wouters added the comment: Yes. The test doesn't run with more than the requested "units", but if you run it without -M it does run with a very small number, in order to make sure the tests don't bitrot. The mechanism could do with an overhaul though; I wrote it in 2

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-04-14 Thread Thomas Ballinger
Thomas Ballinger added the comment: Thanks Antoine! Could you add Allison Kaptur to NEWS and ACKS? This was an update to her original patch, and we paired on the whole thing. -- ___ Python tracker <http://bugs.python.org/issue21

[issue23955] Add python.ini file for embedded/applocal installs

2015-04-20 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue23955> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23955] Add python.ini file for embedded/applocal installs

2015-04-20 Thread Thomas Kluyver
Thomas Kluyver added the comment: Relative paths would be nice for Pynsist - I would prefer to create the config file at build time and then install it along with the other files. If it needed absolute paths, then the installer would have to write the config file after the user selects the

[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2015-04-24 Thread Thomas Wouters
Thomas Wouters added the comment: Rewriting the tests shouldn't block this specific issue, no. Also, don't use multiprocessing for it. I would just use subprocess to start a separate process (which might after all be OOM-killed,) check the exitcode, and record its stderr in case

[issue23342] run() - unified high-level interface for subprocess

2015-04-25 Thread Thomas Kluyver
Thomas Kluyver added the comment: I expect this can be closed now, unless there's some post-commit review somewhere that needs addressing? -- ___ Python tracker <http://bugs.python.org/is

[issue23955] Add python.ini file for embedded/applocal installs

2015-04-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: Would that option be the only thing that needs to be set to make Python app-local? I'm not familiar with what lives in pyvenv.cfg. -- ___ Python tracker <http://bugs.python.org/is

[issue2292] Missing *-unpacking generalizations

2015-05-02 Thread Thomas Wouters
Thomas Wouters added the comment: The latest patch looks good to me. No need to do the additional AST refactoring if it's going to make PEP 492's implementor's life harder (but I do read Guido's comment as a reason to check this in sooner rather than later :>) So, unl

[issue24135] Policy for altering sys.path

2015-05-06 Thread Thomas Güttler
New submission from Thomas Güttler: I am missing a policy how sys.path should be altered. We run a custom sub class of list in sys.path. We set it in sitecustomize.py This instance get replace by a common list in lines like this: sys.path = glob.glob(os.path.join(WHEEL_DIR, "

[issue2292] Missing *-unpacking generalizations

2015-05-06 Thread Thomas Wouters
Thomas Wouters added the comment: FYI, I meant last Monday, but I forgot it was May 4th (Dutch Memorial day) and May 5th (Dutch Liberation day), so that got in the way :P Should we keep this bug open for docs changes, or is there a separate issue for that

[issue24176] Incorrect parsing of unpacked expressions in call

2015-05-13 Thread Thomas Caswell
New submission from Thomas Caswell: On the current tip (changeset: 96023:4b5461dcd190) the following results in a syntax error def test(a='a', b='b'): print(a, b) opta = dict() optb = dict(a=1, b=2) test(**(opta or {})) # <- works on all python test(**optb or {})

[issue16544] Add external link to ast docs

2015-05-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: Here's a simple patch that links to Green Tree Snakes from the ast module docs, using the 'sidebar' directive (that's what the logging module uses to link to tutorials, which seemed analogous). I'm still happy to contribute these

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Thomas Güttler
New submission from Thomas Güttler: The Python tarfile library does not detect a broken tar. user@host$ wc -c good.tar 143360 good.tar user@host$ head -c 13 good.tar > cut.tar user@host$ tar -tf cut.tar ... tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now V

[issue17096] the system keyring should be used instead of ~/.pypirc

2016-09-08 Thread Thomas Grainger
Thomas Grainger added the comment: But distutils is a core Python module... On 9 Sep 2016 00:43, "Christian Heimes" wrote: > > Christian Heimes added the comment: > > Please take this idea to https://www.pypa.io/ > > -- > nosy: +christian.heimes > re

[issue28106] [Benchmarks] Add --testonly argument to perf.py to run benchmarks only for correctness checking

2016-09-12 Thread Thomas Wouters
New submission from Thomas Wouters: The attached patch adds a --testonly mode to the 'perf.py' benchmark runner, which runs the selected benchmarks in the fastest possible way with just one interpreter (without filtering out slow benchmarks, or benchmarks that can't run in

[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2016-10-07 Thread Thomas Levine
Thomas Levine added the comment: I just upgraded from 3.5.1 to 3.5.2 and found that I couldn't authenticate to PyPI anymore. And then I remembered that this had been fixed, so removed the extra percent sign, and my uploads worked. T

[issue28384] hmac cannot be used with shake algorithms

2016-10-07 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue28384> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26869] unittest longMessage docs

2016-10-10 Thread Thomas Guettler
Thomas Guettler added the comment: @Mariatta thank you very much. This update makes the docs easy to read and understand. Thank you :-) -- ___ Python tracker <http://bugs.python.org/issue26

[issue28483] python --version prints output to stderr

2016-10-20 Thread Thomas Becker
New submission from Thomas Becker: I am using Python 2.7.10 on Windows 8. While writing some code in NodeJS I noticed the following behaviour: `python --version` prints its output to stderr instead of stdout. In most cases this won't make any difference because both streams print t

[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann
New submission from Thomas Waldmann: zipfile.is_zipfile has false positives way too easily. I just have seen it in practive when a MoinMoin wiki site with a lot of pdf attachments crashed with 500. This was caused by a valid PDF that just happened to contain PK\005\006 somewhere in the middle

[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann
Thomas Waldmann added the comment: patch for py2.7 The EOCD structure is at EOF. It either does not contain a comment (this is what the existing code checks first) or it contains a comment of the length that is specified in the structure. The patch checks consistency specified length vs

[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann
Thomas Waldmann added the comment: Note: checking the first bytes of the file (PK..) might be another option. But this has the "problem" that a self-extracting zip starts with an executable that has different first bytes. So whether this is an option or not depends on whether

[issue28528] Pdb.checkline()

2016-10-25 Thread Thomas Kluyver
New submission from Thomas Kluyver: Pdb.checkline() does a hasattr() check to protect against self.curframe not existing. self.curframe can also be None (if self.forget() or self.reset() was called), but checkline() does not handle this. The attached patch treats self.curframe == None as

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-04 Thread Reuben Thomas
New submission from Reuben Thomas: In Python 3.5.2, with a positional argument with nargs='*', running the program with no arguments gives an error like this: usage: caffeinate [-h] [-V] COMMAND [ARGUMENT [ARGUMENT ...]] caffeinate: error: the following arguments are require

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-04 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks very much for this. It would be great if the redundancy I referred to in the usage message could also be removed, so that instead of "[ARGUMENT [ARGUMENT ...]]" it just said "[ARGUMENT ...]". (Similarly, for a '+' argumen

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread Reuben Thomas
Reuben Thomas added the comment: > Try `nargs='?'` or try providing a `default` along with the '*'. Why would I do that? I want 0 or more arguments, and there's no default value. > Including your ARGUMENT action in the error message is intentional. It will like

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-07 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks, that's a simple, robust workaround. I'll duck out now and leave the Python experts to sort out the underlying problem, if they can; I think it's still well worth sorting out, though documenting the problem and workaround would be m

[issue27050] Demote run() below the high level APIs in subprocess docs

2016-11-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: I still feel that having one function with various options is easier to explain than three separate functions with awkward names and limited use cases (e.g. no capturing output without checking the exit code). The tweeter you replied to said he didn't

[issue1525919] email package content-transfer-encoding behaviour changed

2021-12-13 Thread Thomas Arendsen Hein
Thomas Arendsen Hein added the comment: Default python3 on Debian buster: $ python3 Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email.mim

[issue12446] StreamReader Readlines

2011-06-29 Thread Thomas Barnet-Lamb
New submission from Thomas Barnet-Lamb : It appears that StreamReader's readlines method behaves in a strange manner if the StreamReader has, in a previous read operation, decoded more characters than the user asked for; this happens when both the chars and size parameters are used, but

[issue12446] StreamReader Readlines

2011-06-29 Thread Thomas Barnet-Lamb
Changes by Thomas Barnet-Lamb : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue12446> ___ ___ Python-bugs-list mailing list Unsubscri

[issue12446] StreamReader Readlines behavior odd

2011-06-29 Thread Thomas Barnet-Lamb
Changes by Thomas Barnet-Lamb : -- title: StreamReader Readlines -> StreamReader Readlines behavior odd ___ Python tracker <http://bugs.python.org/issu

[issue3631] Improve gdbinit of Python 2.6

2010-10-17 Thread Thomas Vander Stichele
Thomas Vander Stichele added the comment: It's too bad this is closed out of date because a) the macro is still there being distributed b) it simply hangs! c) there's no easy way to figure out that you should be using something else instead. I spent a few hours of my life figuri

[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele
Thomas Vander Stichele added the comment: Maybe I am missing something, but why was it ok for this patch to move EXTENDED_ARGS from 143 to 145 ? I thought the numbers for opcodes were part of the ABI ? -- nosy: +thomasvs ___ Python tracker <h

[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele
Thomas Vander Stichele added the comment: Really ? Is this documented somewhere ? Do you know of any other case where a number for an existing opcode was changed ? I can't find any so far. -- ___ Python tracker <http://bugs.python.org/i

[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele
Thomas Vander Stichele added the comment: Well, I just checked, and from 2.3 to 2.6 opcodes were only added, existing ones were never renumbered. 2.7 however reshuffled a bunch of them, for no apparent reason at all: $ diff -au opcodes-2.6 opcodes-2.7 --- opcodes-2.6 2010-12-04 20:47

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: It's just a test. Finishing the patch completely slipped my mind. I'll work on it later tonight. -- ___ Python tracker <http://bugs.python.

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: I'm still reasonably new to the codebase, but I'm certainly going to try to fix the issue. -- ___ Python tracker <http://bugs.python.

[issue1525919] email package quoted printable behaviour changed

2010-05-05 Thread Thomas Arendsen Hein
Thomas Arendsen Hein added the comment: Roger Demetrescu, I filed the issue with "Python 2.4", because the behavior changed somewhere between 2.4.2 and 2.4.3 The updated link to the MoinMoin bug entry is: http://moinmo.in/MoinMoinBugs/ResetPasswordEmailImproperlyEncoded The workar

[issue7522] random.choice should accept a set as input

2010-05-06 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: Why not just add support to the set container? As far as I know, it is a binary search tree, so supporting random picking in O(logn) should be easy. -- nosy: +Thomas.Dybdahl.Ahle ___ Python tracker <h

[issue7522] random.choice should accept a set as input

2010-05-06 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: I'm sorry. I see the problem then. Do you know, if there are any plans of adding a fast balanced binary search tree to pythons stdlib? -- ___ Python tracker <http://bugs.python.org/i

[issue1731] Random errors on interpreter shutdown

2008-01-03 Thread Thomas Dybdahl Ahle
New submission from Thomas Dybdahl Ahle: I have a pygtk program, that uses a fairly lot of threads in a pool. All of these threads are setDaemon to ensure the application shuts down when I call gtk.main_quit() About every second time I close the app, I get one or more errors from places in the

[issue1731] Random errors on interpreter shutdown

2008-01-03 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: The fix looks nice. I'll just implement it locally in my app for python < 2.4. Thanks __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1731] Random errors on interpreter shutdown

2008-01-03 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: I run this now in the beginning of my code. As far as I can see it works fine. if not hasattr(Thread, "_Thread__bootstrap_inner"): class SafeThread (Thread): def encaps(self): try: self._Thread__boots

[issue1722344] Thread shutdown exception in Thread.notify()

2008-02-06 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: > which means no global namespace access Does that mean that you cannot use len and range in a Thread? -- nosy: +lobais _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue43477] from x import * behavior inconsistent between module types.

2021-03-15 Thread Thomas J. Gallen
Thomas J. Gallen added the comment: Yes, a package. There isn't actually that much in the txz. Most of the files are ostensibly empty. As an example, let's say we have the following files: test.py test_module/__init__.py test_module/test_submodule.py test.py contains: ```pyt

[issue43477] from x import * behavior inconsistent between module types.

2021-03-15 Thread Thomas J. Gallen
Thomas J. Gallen added the comment: parent module* rather. Just saw that typo. -- ___ Python tracker <https://bugs.python.org/issue43477> ___ ___ Python-bug

[issue43477] from x import * behavior inconsistent between module types.

2021-03-16 Thread Thomas J. Gallen
Thomas J. Gallen added the comment: Given the previous example, in test.py, replace: ``` print(test_module.test_submodule) ``` ...with: ``` assert(not hasattr(test_module, "test_submodule")) ``` ...because the issue is only the bottom half of `_find_and_load_unlocked`. Specifi

[issue41978] numpy, scipy packages failed to install via pip - Windows 10 Pro 64 bit

2020-10-08 Thread Thomas M. Alldread
New submission from Thomas M. Alldread : Several attempts to install numpy/scipy packages failed. Pip reported pages of error information. Reverting back to version 3.8.5 resolved the issue using the exact same procedure. -- components: Extension Modules, Installation, Windows

[issue457066] pow(a,b,c) should accept b<0

2012-01-22 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: For anyone who finds this through google, if you are finding the inverse mod a prime, you can use fermats little theorem: pow(a, -1, mod) = pow(a, a-2, mod). (You also need that mod doesn't divide a). -- nosy: +Thomas.Dybdahl

[issue6972] zipfile.ZipFile overwrites files outside destination path

2012-04-07 Thread Thomas W. Barr
Thomas W. Barr added the comment: I'll update my patch to work on the current 3.x head later tonight. -- ___ Python tracker <http://bugs.python.org/i

[issue37682] random.sample should support iterators

2019-07-25 Thread Thomas Dybdahl Ahle
New submission from Thomas Dybdahl Ahle : Given a generator `f()` we can use `random.sample(list(f()), 10)` to get a uniform sample of the values generated. This is fine, and fast, as long as `list(f())` easily fits in memory. However, if it doesn't, one has to implement the reservoir sam

[issue31652] make install fails: no module _ctypes

2019-07-26 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: Installing libffi-dev worked for me. -- nosy: +thomasahle ___ Python tracker <https://bugs.python.org/issue31652> ___ ___

[issue16202] sys.path[0] security issues

2018-02-07 Thread Thomas Arendsen Hein
Thomas Arendsen Hein added the comment: I just stumbled across this problem when starting "idle3" in a directory containing a copy of textwrap.py which was not compatible with python3. In issue13506 idle3 was changed to behave like the regular python shell, i.e. as described he

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Thomas Eldon Allred
New submission from Thomas Eldon Allred : asyncio.BaseEventLoop.connect_accepted_socket was added in v3.5.3 Please add a note to the documentation. -- assignee: docs@python components: Documentation messages: 306650 nosy: Thomas Eldon Allred, docs@python priority: normal severity

[issue33447] Asynchronous lambda syntax

2018-05-31 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: Just wanted to add another use-case. In a project I'm working on, we are building a lot of graphs using code like this: ``` nodes = [ Node('node-name1', children=[...], classifier=has_foo), Node('node-name2

[issue18981] Typo in the ctypes tests

2013-09-08 Thread Anoop Thomas Mathew
New submission from Anoop Thomas Mathew: Comment in the test_number.py in ctypes test hold a typo bug. Instead of superseeded, it should be superseded. Patch attached. -- assignee: docs@python components: Documentation, Tests files: ctypes_test_typo.patch keywords: patch messages

[issue18815] DOCUMENTATION: "mmap .close()" doesn't close the underlying file

2013-09-08 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: Made it explicit that close() will close only the mmap, and file will not be closed. Patch attached. -- keywords: +patch nosy: +Anoop.Thomas.Mathew Added file: http://bugs.python.org/file31689/mmap_close_documentation.patch

[issue18981] Typo in the ctypes tests

2013-09-12 Thread Anoop Thomas Mathew
Changes by Anoop Thomas Mathew : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker <http://bugs.python.org/issue18981> ___ ___ Python-bug

[issue21592] Make statistics.median run in linear time

2014-05-28 Thread Thomas Dybdahl Ahle
New submission from Thomas Dybdahl Ahle: The statistics module currently contains the following comment: "FIXME: investigate ways to calculate medians without sorting? Quickselect?" This is important, because users expect standard library functions to use state of the art implementa

[issue21592] Make statistics.median run in linear time

2014-05-28 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: I have written some proof of concept code here [1], I would appreciate you commenting on it, before I turn it into a patch, as I haven't contributed code to Python before. I have tried to write it as efficiently as possible, but it is of course pos

[issue21592] Make statistics.median run in linear time

2014-05-30 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: If you have a good, realistic test set, we can try testing quick-select vs sorting. If it's still not good, I can also reimplement it in C. -- ___ Python tracker <http://bugs.python.org/is

[issue21592] Make statistics.median run in linear time

2014-05-31 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: I think "minimize expected-case time" is a good goal. If we wanted "minimize worst-case time" we would have to use k-means rather than quickselect. My trials on random data, where sort arguably has a disadvantage, suggests sorting is

[issue21592] Make statistics.median run in linear time

2014-06-02 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: I don't know if it's worth the overhead to implement a multiselect, given we only expose a median function. I've rewritten select2 to be intro, just falling back on sorting. This doesn't appear to degrade the performance. I also ad

[issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON

2013-09-14 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: Patch for BOM signature documentation in json.loads -- keywords: +patch nosy: +Anoop.Thomas.Mathew Added file: http://bugs.python.org/file31764/json_BOM_signature_documentation.patch ___ Python tracker <h

[issue18594] C accelerator for collections.Counter is slow

2013-09-15 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: 40% faster collections.Counter() . Removed C accelerator. Patch attached. Passes all tests. Results comparison follows. -- keywords: +patch nosy: +Anoop.Thomas.Mathew Added file: http://bugs.python.org/file31774

[issue18594] C accelerator for collections.Counter is slow

2013-09-15 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: Performance comparison with and without patch applied. -- Added file: http://bugs.python.org/file31775/performance_comparision.csv ___ Python tracker <http://bugs.python.org/issue18

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: The Sniffer.sniff routine doesn't set the doublequote property at all right now. I'm working on a patch to see if I can add this functionality. -- nosy: +twb type: behavior -> feature request ___ P

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: Test for this issue. -- keywords: +patch Added file: http://bugs.python.org/file14610/test_csv.py.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: Patch for the issue. Looks for extraneous quote inside the quotes by the delimiters. -- Added file: http://bugs.python.org/file14611/csv.py.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: The documentation doesn't actually say what parameters are sniffed, so technically, that doesn't need to be changed. Should this be added? -- ___ Python tracker <http://bugs.python.

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Changes by Thomas W. Barr : Removed file: http://bugs.python.org/file14611/csv.py.diff ___ Python tracker <http://bugs.python.org/issue6606> ___ ___ Python-bugs-list m

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: Reformatted line in patch. -- Added file: http://bugs.python.org/file14612/csv.py.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-31 Thread Thomas W. Barr
Thomas W. Barr added the comment: Patch uploaded to rietveld: http://codereview.appspot.com/96202/show -- ___ Python tracker <http://bugs.python.org/issue6

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: I'm not actually sure where we go from here. This is my first attempted patch to this project, and I was hoping that someone else would be more knowledgeable about the process;-) -- ___ Python tracker

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: Got it. Yes, they're the same patch. -- ___ Python tracker <http://bugs.python.org/issue6606> ___ ___ Python-bugs-list m

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: The string module, however, fails to properly capitalize anything in quotes: >>> string.capwords("i pity the 'foo'.") "I Pity The 'foo'." The string module could be easily made to work like the object. The

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: If "correct handling of apostrophe's and quotation marks, keeping the string length unchanged, and only changing desired letters from lower to uppercase with no other side-effects" is the criterion we want, then what I suggested (toupper() the

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-28 Thread Thomas W. Barr
Changes by Thomas W. Barr : -- nosy: +twb ___ Python tracker <http://bugs.python.org/issue6972> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: Do people have an opinion as to whether this should be fixed with a docfix, fixed as default (with option to allow path traversal) or fixed as a non-default option? The same issue exists in ZipFile.extract, but in that case you're presumably passing a

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: My working solution is to iterate through members, and ensuring that os.path.abspath(os.path.join(path, member)) always .startswith(path). This seems like a better solution than trying to trap on a pattern in the string. Presumably the same fix can be made to

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: Uploading test. -- keywords: +patch Added file: http://bugs.python.org/file15002/zipfile-6972-test.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: Uploading patch. This actually should fix my theoretical symlink bug since realpath() properly follows symlinks. The only thing that I haven't been able to test is the behavior of realpath() on case-insensitive operating systems. This should do the right

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: As for the documentation, it might be a wise idea to up date the current documentation to mention this issue, until the next release. I'm not really sure what the process is for doing that, though... -- ___ P

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: zf.extract() is unsafe for the same reason. My patch fixes this issue, but we should mention the possible bug in the documentation there as well. They do this for the similar bug in tarfile. I've copy/pasted the mention in tarfile.extract() to zipfile.ex

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Changes by Thomas W. Barr : Removed file: http://bugs.python.org/file15002/zipfile-6972-test.diff ___ Python tracker <http://bugs.python.org/issue6972> ___ ___ Python-bug

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-29 Thread Thomas W. Barr
Thomas W. Barr added the comment: My apologies, I clicked the wrong button and deleted my test. There is no change in the newly uploaded one. -- Added file: http://bugs.python.org/file15005/zipfile-6972-test.diff ___ Python tracker <h

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: os.path.realpath() doesn't normalize case, so this could have issues on Windows. The new patch should not. The Mac version of os.path.normpath doesn't change the path, as per the posix version, which isn't correct on HFS+, which is not case se

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-30 Thread Thomas W. Barr
Changes by Thomas W. Barr : Removed file: http://bugs.python.org/file15003/zipfile-6972-patch.diff ___ Python tracker <http://bugs.python.org/issue6972> ___ ___ Python-bug

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-30 Thread Thomas W. Barr
Thomas W. Barr added the comment: Good point, I'd forgotten that case-sensitive file systems are an option. I do know that it's not the default, though, and that as shipped from Apple, at least the consumer machines are case-insensitive. Things may be different in server-land. For

<    13   14   15   16   17   18   19   >