[issue32501] Documentation for dir([object])

2018-01-06 Thread Matthew Cowles
Matthew Cowles added the comment: If David is right and people have previously decided not to change wording like this, can someone explain why? As it stands, the meaning is clear and incorrect. -- nosy: +mdcowles ___ Python tracker <ht

[issue32501] Documentation for dir([object])

2018-01-06 Thread Matthew Cowles
Matthew Cowles added the comment: My thanks to David for the clarification. I don't find the logic he describes (but does not necessarily subscribe to!) persuasive in this case. In my opinion, "Let's be incorrect for the sake of simplicity," is not the way to document a

[issue33566] re.findall() dead locked whent the expected ending char not occur until end of string

2018-05-18 Thread Matthew Barnett
Matthew Barnett added the comment: You don't give the value of 'newlines', but the problem is probably catastrophic backtracking, not deadlock. -- nosy: +mrabarnett ___ Python tracker <https://bugs.pyt

[issue33590] sched.enter priority has no impact on execution

2018-05-30 Thread Matthew Fisher
Matthew Fisher added the comment: > I did look at the code :-) I also looked at the code. I had to do so to understand why the example output was not "as expected." ;) > I don't agree about the example in the documentation, it is a clear > demonstration about how t

[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-05-31 Thread Matthew Barnett
Matthew Barnett added the comment: It also raises a ValueError on Windows. For other invalid paths on Windows it returns False. -- nosy: +mrabarnett ___ Python tracker <https://bugs.python.org/issue33

[issue33785] Crash caused by pasting ๐Œˆ๐Œ– into python

2018-06-06 Thread Matthew Barnett
Matthew Barnett added the comment: For clarity, the first is '\U00010308\U00010316' and the second is '\U00010306\U00010300\U0001030B'. The BMP is the Basic Multilingual Plane, which covers the codepoints in the range U+ to U+. Some software has a problem dea

[issue34605] Avoid master/slave terminology

2018-09-07 Thread Matthew Barnett
Matthew Barnett added the comment: Not all uses of the word "master" are associated with slavery, e.g. "master craftsman", "master copy", "master file table". I think it's best to avoid use of master/slave where practicable, but other u

[issue34738] Distutils: ZIP files don't include directory entries

2018-09-19 Thread Matthew Barnett
Matthew Barnett added the comment: I don't see a problem with this. If the zip file has 'dist/file1.py' then you know to create a directory when unzipping. If you want to indicate that there's an empty directory 'foo', then put 'foo/' in the

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Matthew Barnett added the comment: Unicode 11.0.0 has ๅ… (U+5345) as being numeric and having the value 30. What's the difference between that and U+4E17? I notice that they look at lot alike. Are they different variants, perhaps traditional vs simpl

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326015 ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bug

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326014 ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bug

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326013 ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bug

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Matthew Barnett
Change by Matthew Barnett : -- Removed message: https://bugs.python.org/msg326012 ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bug

[issue34694] Dismiss To Avoid Slave/Master wording cause it easier for non English spoken programmers

2018-09-26 Thread Matthew Barnett
Change by Matthew Barnett : -- nosy: -mrabarnett ___ Python tracker <https://bugs.python.org/issue34694> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34866] CGI DOS vulnerability via long post list

2018-10-01 Thread Matthew Belisle
New submission from Matthew Belisle : Copied from email to secur...@python.org: I have been doing memory profiling on a few python web frameworks and I noticed this issue in the cgi.FieldStorage class. $ python example.py Memory used: 523935744 bytes The problem is there is no easy way to

[issue34866] CGI DOS vulnerability via long post list

2018-10-10 Thread Matthew Belisle
Matthew Belisle added the comment: Sorry, looks like I forgot to attach example.py. Attaching now. -- Added file: https://bugs.python.org/file47861/example.py ___ Python tracker <https://bugs.python.org/issue34

[issue34866] CGI DOS vulnerability via long post list

2018-10-19 Thread Matthew Belisle
Change by Matthew Belisle : -- pull_requests: +9314 ___ Python tracker <https://bugs.python.org/issue34866> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-19 Thread Matthew Belisle
Change by Matthew Belisle : -- keywords: +patch pull_requests: +9317 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35028> ___ ___ Py

[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-19 Thread Matthew Belisle
New submission from Matthew Belisle : The cgi.FieldStorage class added in https://github.com/python/cpython/pull/9660 has an off by one error in the logic for recursively nested objects. The problem is that sub_max_num_fields should be initialized outside of the while loop, not inside of it

[issue35072] re.sub does not play nice with chr(92)

2018-10-26 Thread Matthew Barnett
Matthew Barnett added the comment: @Ezio: the value of stringy_thingy is irrelevant because it never gets that far; it fails when it tries to parse the replacement, which occurs before attempting any matching. I can't reproduce the difference either. -- status: pending -&

[issue35116] Doc/library entries for cgi.FieldStorage max_num_fields

2018-10-30 Thread Matthew Belisle
New submission from Matthew Belisle : vstinner pointed out that cgi.FieldStorage max_num_fields needs documentation added to Doc/library. https://bugs.python.org/issue34866#msg328401 -- assignee: docs@python components: Documentation messages: 328937 nosy: Matthew Belisle, docs

[issue35116] Doc/library entries for cgi.FieldStorage max_num_fields

2018-10-30 Thread Matthew Belisle
Change by Matthew Belisle : -- keywords: +patch pull_requests: +9560 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35116> ___ ___ Py

[issue35116] Doc/library entries for cgi.FieldStorage max_num_fields

2018-10-30 Thread Matthew Belisle
Change by Matthew Belisle : -- pull_requests: +9561 ___ Python tracker <https://bugs.python.org/issue35116> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35116] Doc/library entries for cgi.FieldStorage max_num_fields

2018-10-30 Thread Matthew Belisle
Change by Matthew Belisle : -- pull_requests: +9562 ___ Python tracker <https://bugs.python.org/issue35116> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34866] CGI DOS vulnerability via long post list

2018-10-30 Thread Matthew Belisle
Matthew Belisle added the comment: That makes sense Victor, I agree. Thanks for merging those PRs. -- ___ Python tracker <https://bugs.python.org/issue34

[issue7940] re.finditer and re.findall should support negative end positions

2013-05-25 Thread Matthew Barnett
Matthew Barnett added the comment: I've attached a patch. -- keywords: +patch Added file: http://bugs.python.org/file30377/issue7940.patch ___ Python tracker <http://bugs.python.org/i

[issue814253] Grouprefs in lookbehind assertions

2013-05-25 Thread Matthew Barnett
Matthew Barnett added the comment: Issue #2636 resulted in the regex module, which supports variable-length look-behinds. I don't know how much work it would take even to put a limited fixed-length look-behind fix for this into the re module, so I'm afraid the issue must r

[issue1693050] \w not helpful for non-Roman scripts

2013-05-26 Thread Matthew Barnett
Matthew Barnett added the comment: I had to check what re does in Python 3.3: >>> print(len(re.match(r'\w+', 'เคนเคฟเคจเฅเคฆเฅ€').group())) 1 Regex does this: >>> print(len(regex.match(r'\w+', 'เคนเคฟเคจเฅเคฆเฅ€').group())) 6 -- ___

[issue7940] re.finditer and re.findall should support negative end positions

2013-05-26 Thread Matthew Barnett
Matthew Barnett added the comment: Like the OP, I would've expected it to handle negative indexes the way that strings do. In practice, I wouldn't normally provide negative indexes; I'd use some string or regex method to determine the search limits, and then pass them to findit

[issue1693050] \w not helpful for non-Roman scripts

2013-05-28 Thread Matthew Barnett
Matthew Barnett added the comment: I'm not sure what you're saying. The re module in Python 3.3 matches only the first codepoint, treating the second codepoint as not part of a word, whereas the regex module matches all 6 codepoints, treating them all as part of a s

[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread Matthew Barnett
Matthew Barnett added the comment: You could've obtained it from msg76556 or msg190100: >>> print(ascii('เคนเคฟเคจเฅเคฆเฅ€')) '\u0939\u093f\u0928\u094d\u0926\u0940' >>> import re, regex >>> print(ascii(re.match(r"\w+", >>> &#x

[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread Matthew Barnett
Matthew Barnett added the comment: UTF-16 has nothing to do with it, that's just an encoding (a pair of them actually, UTF-16LE and UTF-16BE). And I don't know why you thought I was using findall in msg190100 when the examples were u

[issue18048] Merging test_pep263.py and test_coding.py

2013-06-10 Thread Matthew Bentley
Matthew Bentley added the comment: OK, I think I fixed this. I merged the two tests into one, called test_source_encoding.py. It doesn't fail, and I'm not sure what else I need to do. Patch is attached. This is also my first patch, so please tell me if I'm doing

[issue18190] RuntimeError raised with re.search + re.DOTALL on empty string

2013-06-11 Thread Matthew Barnett
Matthew Barnett added the comment: Also in Python 3.3.2, but not Python 3.2. I haven't tested Python 3.3.1 or Python 3.3.0. -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/is

[issue18286] Python 3.3 - Slowing down computer

2013-07-02 Thread Matthew Barnett
Matthew Barnett added the comment: > with open('url_list.txt') as f: > > content = f.readlines() > content = ''.join(content) > Why are you reading all of the lines and then joining them together like that? Why not just do: content = f.read() >

[issue18338] python --version should send output to STDOUT

2013-07-07 Thread Matthew Byrne
Matthew Byrne added the comment: Simply replced printout from stderr to stdout. -- nosy: +Matthew.Byrne Added file: http://bugs.python.org/file30848/issue18338.diff ___ Python tracker <http://bugs.python.org/issue18

[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-09 Thread Matthew Barnett
Matthew Barnett added the comment: This is basically what the regex module does, written in Python: def get_grapheme_cluster_break(codepoint): """Gets the "Grapheme Cluster Break" property of a codepoint. The properties defined here:

[issue13083] _sre: getstring() releases the buffer before using it

2013-07-17 Thread Matthew Barnett
Matthew Barnett added the comment: It looks like this was fixed for issue #14212. -- ___ Python tracker <http://bugs.python.org/issue13083> ___ ___ Python-bug

[issue18468] re.group() should never return a bytearray

2013-07-18 Thread Matthew Barnett
Matthew Barnett added the comment: There's also the fact that the match object keeps a reference to the target string anyway: >>> import re >>> t = memoryview(b"a") >>> t >>> m = re.match(b"a", t) >>> m.string On that su

[issue16964] Add 'm' format specifier for mon_grouping etc.

2013-07-22 Thread Matthew Barnett
Matthew Barnett added the comment: I've attached my attempt at a patch. -- keywords: +patch nosy: +mrabarnett Added file: http://bugs.python.org/file31009/issue16964.patch ___ Python tracker <http://bugs.python.org/is

[issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar()

2013-07-25 Thread Matthew Barnett
Matthew Barnett added the comment: Re msg193703: A little before that, 'value' is INCREF'ed, and then: wstr = PyUnicode_AsUnicodeAndSize(value, &size); if (wstr == NULL) return NULL; Shouldn't 'value' be DECREF'ed before r

[issue18614] Enhanced \N{} escapes for Unicode strings

2013-08-01 Thread Matthew Barnett
Matthew Barnett added the comment: I've attached a patch for this. -- keywords: +patch nosy: +mrabarnett Added file: http://bugs.python.org/file31112/issue18614.patch ___ Python tracker <http://bugs.python.org/is

[issue18647] re.error: nothing to repeat

2013-08-04 Thread Matthew Barnett
Matthew Barnett added the comment: Suppose you have a repeated pattern, such as "(?:...)*" or "(?:...){0,100}". If, after matching the subpattern, the text position hasn't changed, and none of the capture groups have changed, then there has been no progress, and the s

[issue18647] re.error: nothing to repeat

2013-08-04 Thread Matthew Barnett
Matthew Barnett added the comment: Python's current regex engine isn't so coded. That's the reason for the up-front check. -- ___ Python tracker <http://bugs.pyt

[issue18662] re.escape should not escape the hyphen

2013-08-05 Thread Matthew Barnett
Matthew Barnett added the comment: The help says: """>>> help(re.escape) Help on function escape in module re: escape(pattern) Escape all the characters in pattern except ASCII letters, numbers and '_'. """ The complementar

[issue18662] re.escape should not escape the hyphen

2013-08-06 Thread Matthew Barnett
Matthew Barnett added the comment: I can think of a real disadvantage with the current behaviour: it messes up Unicode graphemes. For example: >>> print('เคนเคฟเคจเฅเคฆเฅ€') เคนเคฟเคจเฅเคฆเฅ€ >>> print(re.escape('เคนเคฟเคจเฅเคฆเฅ€')) \เคน\เคฟ\เคจ\เฅ\เคฆ\เฅ€ Of course, that's only a problem i

[issue18685] Restore re performance to pre-PEP393 level

2013-08-08 Thread Matthew Barnett
Matthew Barnett added the comment: It appears that in your tests Python 3.2 is faster with Unicode than bytestrings and that unpatched Python 3.4 is a lot slower. I get somewhat different results (Windows XP Pro, 32-bit): C:\Python32\python.exe -m timeit -s "import re; f = re.compile(

[issue18685] Restore re performance to pre-PEP393 level

2013-08-09 Thread Matthew Barnett
Matthew Barnett added the comment: @Antoine: Are you on the same OS as Serhiy? IIRC, wasn't the performance regression that wxjmfauth complained about in Python 3.3 apparent on Windows, but not on Linux? -- ___ Python tracker

[issue18685] Restore re performance to pre-PEP393 level

2013-08-09 Thread Matthew Barnett
Matthew Barnett added the comment: With the patch the results are: C:\Python34\python.exe -m timeit -s "import re; f = re.compile(b'abc').search; x = b'x'*10" "f(x)" 1 loops, best of 3: 113 usec per loop C:\Python34\python.exe -m timeit -s &qu

[issue18647] re.error: nothing to repeat

2013-08-11 Thread Matthew Barnett
Matthew Barnett added the comment: I think you're probably right. -- ___ Python tracker <http://bugs.python.org/issue18647> ___ ___ Python-bugs-list m

[issue18832] New regex module degrades re performance

2013-08-25 Thread Matthew Barnett
Matthew Barnett added the comment: The 'regex' module is not part of the CPython distribution, so it's not covered by this tracker. -- ___ Python tracker <http://bugs.pyt

[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Matthew Barnett
Matthew Barnett added the comment: Surely a case-insensitive dict should use str.casefold, not str.lower? -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue18

[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Matthew Barnett
Matthew Barnett added the comment: mappeddict? Re defaultdict, you could write a dict that does all of these things, called superdict! :-) -- ___ Python tracker <http://bugs.python.org/issue18

[issue14462] In re's named group the name cannot contain unicode characters

2012-04-29 Thread Matthew Barnett
Matthew Barnett added the comment: It doesn't work in regex, but it probably should. IMHO, if it's a valid identifier, then it should be allowed. -- ___ Python tracker <http://bugs.python.o

[issue14756] Empty Dict in Initializer is Shared Betwean Objects

2012-05-08 Thread Matthew Walker
New submission from Matthew Walker : When initializing a class with an empty dict() object as a default initializer, if it is not overridden, multiple instances of the class will share the dictionary. IE: class test(object): def __init__(self, obj=dict()): self.obj = obj a = test() b

[issue14756] Empty Dict in Initializer is Shared Betwean Objects

2012-05-08 Thread Matthew Walker
Changes by Matthew Walker : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue14756> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14991] Option for regex groupdict() to show only matching names

2012-06-17 Thread Matthew Barnett
Matthew Barnett added the comment: @rhettinger: The problem with "nodefault" is that it's negative, so that "nodefault=False" means that you don't not want the default, if you see what I mean. I think that "suppress" would be better: mo.groupdict(

[issue15077] Regexp match goes into infinite loop

2012-06-28 Thread Matthew Barnett
Matthew Barnett added the comment: It's not a bug, it's a pathological regex (i.e. it causes catastrophic backtracking). It also works correctly in the "regex" module. -- ___ Python tracker <http://bug

[issue15216] Support setting the encoding on a text stream after creation

2012-06-30 Thread Matthew Barnett
Matthew Barnett added the comment: Would a "set_encoding" method be Pythonic? I would've preferred an "encoding" property which flushes the output when it's changed. -- nosy: +mrabarnett ___ Python tracker <

[issue15372] Python is missing alternative for common quoting character

2012-07-16 Thread Matthew Barnett
Matthew Barnett added the comment: A codepoint such as "รฉ" ("\N{LATIN SMALL LETTER E WITH ACUTE}") can be decomposed to "\u0065\u0301" ("\N{LATIN SMALL LETTER E}\N{COMBINING ACUTE ACCENT"), but "\u201c" ("\N{LEFT DOUBLE QUOTATION

[issue13592] repr(regex) doesn't include actual regex

2012-07-19 Thread Matthew Barnett
Matthew Barnett added the comment: Python 2.7 is the end of the Python 2 line, and it's closed except for security fixes. -- ___ Python tracker <http://bugs.python.org/is

[issue15515] Regular expression match does not return

2012-07-31 Thread Matthew Barnett
Matthew Barnett added the comment: That's because it uses a pathological regular expression (catastrophic backtracking). The problem lies here: (\\?[\w\.\-]+)+ -- ___ Python tracker <http://bugs.python.org/is

[issue15515] Regular expression match does not return

2012-07-31 Thread Matthew Barnett
Matthew Barnett added the comment: It's probably inappropriate for me to mention that the alternative 'regex' module on PyPI completes promptly, so I won't. :-) -- ___ Python tracker <http://bug

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Matthew Barnett
Matthew Barnett added the comment: There are actually 2 issues here: 1. The third argument is 'maxsplit', the fourth is 'flags'. 2. It never splits on a zero-width match. See issue 3262. -- ___ Python tracker <http://bug

[issue8800] add threading.RWLock

2012-08-07 Thread Matthew Lauber
Changes by Matthew Lauber : -- nosy: +mklauber ___ Python tracker <http://bugs.python.org/issue8800> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15606] re.VERBOSE doesn't ignore certain whitespace

2012-08-10 Thread Matthew Barnett
Matthew Barnett added the comment: Ideally, yes, that whitespace should be ignored. The question is whether it's worth fixing the code for the small case of when there's whitespace within "tokens", such as within "(?:". Usually those who use verbose mode use whit

[issue10076] Regex objects became uncopyable in 2.5

2012-08-26 Thread Matthew Barnett
Matthew Barnett added the comment: Is it necessary to actually copy it? Isn't the pattern object immutable? -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/is

[issue15956] backreference to named group does not work

2012-09-18 Thread Matthew Barnett
Matthew Barnett added the comment: There needed to be a way of referring to named groups in the replacement template. The existing form \groupnumber clearly wouldn't work. Other regex implementations, such as Perl, do have \g and also \k (for named groups). In my implementation I

[issue16203] Proposal: add re.fullmatch() method

2012-10-12 Thread Matthew Barnett
Matthew Barnett added the comment: '$' will match at the end of the string or just before the final '\n': >>> re.match(r'abc$', 'abc\n') <_sre.SRE_Match object at 0x00F15448> So shouldn't you be using r'\Z' instea

[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2012-10-13 Thread Matthew Woodcraft
New submission from Matthew Woodcraft: If I run my code using 'python -m' and there is an unhandled exception, the tracebacks include lines from runpy.py (and now sometimes from importlib._bootstrap) which don't provide useful information, and tend to overwhelm the valua

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: Tim, my point is that if the MULTILINE flag happens to be turned on, '$' won't just match at the end of the string (or slice), it'll also match at a newline, so wrapping the pattern in (?:...)$ in that case could give the wrong answer,

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: It certainly appears to ignore the whitespace, even if the "(?x)" is at the end of the pattern or in the middle of a group. Another point we need to consider is that the user might want to use a pre-compil

[issue16203] Proposal: add re.fullmatch() method

2012-10-16 Thread Matthew Barnett
Matthew Barnett added the comment: I'm about to add this to my regex implementation and, naturally, I want it to have the same name for compatibility. However, I'm not that keen on "fullmatch" and would prefer "matchall&quo

[issue16203] Proposal: add re.fullmatch() method

2012-10-16 Thread Matthew Barnett
Matthew Barnett added the comment: re2's FullMatch method contrasts with its PartialMatch method, which re doesn't have! -- ___ Python tracker <http://bugs.python.o

[issue16203] Proposal: add re.fullmatch() method

2012-10-16 Thread Matthew Barnett
Matthew Barnett added the comment: OK, in order to avoid bikeshedding, "fullmatch" it is. -- ___ Python tracker <http://bugs.python.org/issue16203> ___ ___

[issue20998] fullmatch isn't matching correctly under re.IGNORECASE

2014-03-20 Thread Matthew Barnett
Matthew Barnett added the comment: FWIW, here's my own attempt at a patch. -- Added file: http://bugs.python.org/file34538/issue20998.patch ___ Python tracker <http://bugs.python.org/is

[issue20998] fullmatch isn't matching correctly under re.IGNORECASE

2014-04-04 Thread Matthew Barnett
Matthew Barnett added the comment: > > -(!ctx->match_all || ctx->ptr == state->end)) { > > +ctx->ptr == state->end) { > > Why this check is not needed anymore? > After stepping through the code for that regex that fails, I con

[issue21283] A escape character is used when a REGEXP is an argument of "strip" string function

2014-04-17 Thread Matthew Barnett
Matthew Barnett added the comment: The argument isn't a regex, it's a raw string literal consisting of the characters " (quote), \ (backslash), ' (apostrophe), < (less than) and > (greater than). -- ___ Python tracke

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2014-04-18 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: For the record: the '-I' option (#16499) in Python 3.4 disables sys.path[0] initialisation (among other things). -- ___ Python tracker <http://bugs.python.o

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
New submission from Matthew Fernandez: Perhaps others wouldn't consider this a bug, but it was definitely surprising to me. When switching between optimisation levels -OO (optimise and strip docstrings) and -O (just optimise), you will find the docstrings are still stripped. E.g.

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
Matthew Fernandez added the comment: Ah thanks, Antoine. Sorry, failed to find that issue in my prior searching. -- ___ Python tracker <http://bugs.python.org/issue21

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Matthew Barnett
Matthew Barnett added the comment: I wouldn't call it a crash. It's an exception. -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.o

[issue21551] Behavior of word boundaries in regexes unexpected

2014-05-21 Thread Matthew Barnett
Matthew Barnett added the comment: See also issue #852532, issue #3262 and issue #988761. -- ___ Python tracker <http://bugs.python.org/issue21551> ___ ___ Pytho

[issue21620] OrderedDict KeysView set operations not supported

2014-05-31 Thread Matthew Lauria
New submission from Matthew Lauria: I noticed that doing set operations on an OrderedDict KeysView only works when the KeysView is the first input to the expression, and not when it's the second input. This is not the case for dicts. Python 3.4.1 (default, May 31 2014, 11:25:02) [GCC

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
New submission from Matthew Gilson: The BaseResult has been replaced by namedtuple. This also opens up all of the documented methods on namedtuple which would be nice to have as part of the API. I've taken a stab and re-writing the docs here. Feel free to use it (or

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Changes by Matthew Gilson : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issu

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Matthew Gilson added the comment: Sorry, forgot to remove the mention of BaseResult ... -- Added file: http://bugs.python.org/file35613/python_doc_patch.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Matthew Gilson added the comment: This originally came up on stackoverflow: http://stackoverflow.com/questions/24200988/modify-url-components-in-python-2/24201020?noredirect=1#24201020 Would it be helpful if I also added a simple example to the docs as in the example there

[issue11204] re module: strange behaviour of space inside {m, n}

2012-12-02 Thread Matthew Barnett
Matthew Barnett added the comment: Interesting. In my regex module (http://pypi.python.org/pypi/regex) I have: bool(regex.match(pat, "bb", regex.VERBOSE)) # True bool(regex.match(pat, "b{1,3}", regex.VERBOSE)) # False because I thought that when the VERBOSE flag is turned

[issue11204] re module: strange behaviour of space inside {m, n}

2012-12-02 Thread Matthew Barnett
Matthew Barnett added the comment: The question is whether re should always treat 'b{1, 3}a' as a literal, even with the VERBOSE flag. I've checked with Perl 5.14.2, and it agrees with re: adding a space _always_ makes it a literal, even with the 'x' flag (/b{1, 3}a/x

[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Matthew Barnett
Matthew Barnett added the comment: The same problem occurs with both `False` and `True`. -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue16

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-14 Thread Matthew Barnett
Matthew Barnett added the comment: In function SRE_MATCH, the code for SRE_OP_GROUPREF (line 1290) contains this: while (p < e) { if (ctx->ptr >= end || SRE_CHARGET(state, ctx->ptr, 0) != SRE_CHARGET(state, p, 0)) RETURN_FAILURE; p += sta

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett
Matthew Barnett added the comment: OK, here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file28321/issue16688.patch ___ Python tracker <http://bugs.python.org/is

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett
Matthew Barnett added the comment: I found another bug while looking through the source. On line 495 in function SRE_COUNT: if (maxcount < end - ptr && maxcount != 65535) end = ptr + maxcount*state->charsize; where 'end' and 'ptr' are of type &

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett
Matthew Barnett added the comment: I found another bug while looking through the source. On line 495 in function SRE_COUNT: if (maxcount < end - ptr && maxcount != 65535) end = ptr + maxcount*state->charsize; where 'end' and 'ptr' are of type &

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett
Matthew Barnett added the comment: I haven't found any other issues, so here's the second patch. -- Added file: http://bugs.python.org/file28325/issue16688#2.patch ___ Python tracker <http://bugs.python.o

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-16 Thread Matthew Barnett
Matthew Barnett added the comment: Here are some tests for the issue. -- Added file: http://bugs.python.org/file28330/issue16688#3.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-16 Thread Matthew Barnett
Matthew Barnett added the comment: Oops! :-( Now corrected. -- Added file: http://bugs.python.org/file28332/issue16688#3.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-16 Thread Matthew Barnett
Changes by Matthew Barnett : Removed file: http://bugs.python.org/file28330/issue16688#3.patch ___ Python tracker <http://bugs.python.org/issue16688> ___ ___ Python-bug

[issue1075356] exceeding obscure weakproxy bug

2012-12-19 Thread Matthew Barnett
Matthew Barnett added the comment: The patch "issue1075356.patch" is my attempt to fix this bug. 'PyArg_ParseTuple', etc, eventually call 'convertsimple'. What this patch does is to insert some code at the start of 'convertsimple' that checks whether the

<    1   2   3   4   5   6   7   8   9   >