[issue6287] distutils.core.setup does not document the 'license' meta-data

2009-06-15 Thread Matthew Smart
New submission from Matthew Smart : The 'license' meta-data option is not listed under: http://docs.python.org/distutils/setupscript.html#meta-data There are others, too, from: $ python setup.py --help .. snip .. Information display options (just display information, ignore an

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-06-23 Thread Matthew Barnett
Matthew Barnett added the comment: It includes Unicode character properties, but not the Unicode script identification, because the Python Unicode database contains the former but not the latter. Although they could be added to the re module, IMHO their proper place is in the Unicode database

[issue8847] crash appending list and namedtuple

2010-06-05 Thread Matthew Barnett
Matthew Barnett added the comment: I've just found that: [1] + foo() crashes, but: [1].__add__(foo()) gives: Traceback (most recent call last): File "", line 1, in [1].__add__(foo()) TypeError: can only concatenate list (not "foo")

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-14 Thread Matthew Barnett
Matthew Barnett added the comment: Re: msg107776. If it looks like an integer (ie, can be converted to an integer by 'int') then it's positional, otherwise it's a key. An optimisation is to perform a quick check upfront to see whether it st

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-14 Thread Matthew Barnett
Matthew Barnett added the comment: That's a good question. :-) Possibly just an optional sign followed by one or more digits. Another possibility that occurs to me is for it to default to positional if it looks like an integer, but allow quoting to force it to be a key: >>>

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-14 Thread Matthew Barnett
Matthew Barnett added the comment: Your original: "{0[-1]}".format('fox') is a worse gotcha than: "{-1}".format('fox') because you're much less likely to want to do the latter. It's one of those things that it would be nice to

[issue1519638] Unmatched Group issue - workaround

2010-06-25 Thread Matthew Barnett
Matthew Barnett added the comment: Issue #2636 resulted in the new regex module (also available on PyPI), so this issue is addressed by that, but there's no patch for the re module. -- ___ Python tracker <http://bugs.python.org/issu

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-05 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100706.zip is a new version of the regex module. I've added your examples to the unit tests. The module now passes. Keep up the good work! :-) -- Added file: http://bugs.python.org/file17877/issue2636-2010070

[issue9179] Lookback with group references incorrect (two issues?)

2010-07-06 Thread Matthew Barnett
Matthew Barnett added the comment: Should a regex compile if a group is referenced before it's defined? Consider this: (?:(?(2)(a)|(b))+ Other regex implementations permit forward references to groups. BTW, I had a look at the re module, found it too difficult, and so started on m

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-06 Thread Matthew Barnett
Matthew Barnett added the comment: I started with trying to modify the existing re module, but I wanted to make too many changes, so in the end I decided to make a clean break and start on a new implementation which was compatible with the existing re module and which could replace the

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-06 Thread Matthew Barnett
Matthew Barnett added the comment: The file at: http://pypi.python.org/pypi/regex was downloaded 75 times, if that's any help. (Now reset to 0 because of the bug fix.) If it's included in 3.2 then there's the question of whether it should replace the re module an

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-06 Thread Matthew Barnett
Matthew Barnett added the comment: As a crude guide of the speed difference, here's Python 2.6: re regex bm_regex_compile.py 86.53secs 260.19secs bm_regex_effbot.py 13.70secs8.94secs bm_regex_v8.py 15.66secs9.09secs Note

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-08 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100709.zip is a new version of the regex module. I've moved most of the regex module's Python code into a private module. -- Added file: http://bugs.python.org/file17912/issue2636-20

[issue1158231] string.Template does not allow step-by-step replacements

2010-07-10 Thread Matthew Barnett
Matthew Barnett added the comment: Here's a patch for Python 3.1, if anyone's still interested after 5 years. :-) -- keywords: +patch nosy: +mrabarnett Added file: http://bugs.python.org/file17930/from_template.diff ___ Python trac

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-18 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100719.zip is a new version of the regex module. Just a few more tweaks for speed. -- Added file: http://bugs.python.org/file18054/issue2636-20100719.zip ___ Python tracker <http://bugs.python.

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-19 Thread Matthew Barnett
Matthew Barnett added the comment: This has already been reported in issue #3511. -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Python-bug

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-24 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100725.zip is a new version of the regex module. More tweaks for speed. re regex bm_regex_compile.py 87.05secs 278.00secs bm_regex_effbot.py 14.00secs6.58secs bm_regex_v8.py 16.11secs

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Matthew Barnett
Matthew Barnett added the comment: No. Wouldn't that break compatibility with 're'? -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Matthew Barnett
Matthew Barnett added the comment: That's a possibility. I must admit that I don't entirely understand it enough to implement it (the OP said "I don't believe that the algorithm for this is a whole lot more complicated"), and I don't have a need for it myself,

[issue9529] Converge re.findall and re.finditer

2010-08-06 Thread Matthew Barnett
Matthew Barnett added the comment: (1) would break existing code. It would also mean that you wouldn't have access to the start and end positions of the matches either. (2) would also break existing code which is expecting a list. It's like the change that happened when some met

[issue9529] Converge re.findall and re.finditer

2010-08-07 Thread Matthew Barnett
Matthew Barnett added the comment: Ah, I see what you mean. I still think you're wrong, though! :-) The 'for' loop is doing is basically this: it = re.finditer(r'(\w+):(\w+)', text) try: while True: match_object = next(it)

[issue28880] range(i, j) doesn't work

2016-12-05 Thread Matthew Barnett
Matthew Barnett added the comment: Not a bug. Python 2 had 'range', which returned a list, and 'xrange', which returned an xrange object which was iterable: >>> range(7) [0, 1, 2, 3, 4, 5, 6] >>> xrange(7) xrange(7) >>> list(xrange(7)) [0, 1, 2

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-11 Thread Matthew Barnett
Matthew Barnett added the comment: So prune would default to None? None means current behaviour (prune if sep is None else don't prune) True means prune empty strings False means don't prune empty string -- nosy: +mrabarnett ___ Pyth

[issue29074] repr doesn't give full result for this re math result

2016-12-26 Thread Matthew Barnett
Matthew Barnett added the comment: See issue 17087: "Improve the repr for regular expression match objects". It was decided that it might be a bad idea to show the entire matched portion of the string because it could be very long, so it's shown truncated if necessary. --

[issue29074] repr doesn't give full result for this re math result

2016-12-28 Thread Matthew Barnett
Matthew Barnett added the comment: Probably "...", although we also have to consider that the matched portion could in fact not be truncated but just happen to end with "...", although that would be a rare occurrence. -- ___ P

[issue29364] msilib Fetch raises MSIError rather than return None

2017-01-24 Thread Jason Matthew
New submission from Jason Matthew: Fairly new to MSIs here. Working towards extracting the same information which is available via Orca graphical interfaces. I believe I've hit a bug within _msi.View class, namely the inability to safely determine the number of records in my r

[issue29364] msilib Fetch raises MSIError rather than return None

2017-02-01 Thread Jason Matthew
Jason Matthew added the comment: Thanks for pointing that one out Berker. I agree, this is a dup. -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue29420] Python 3.6 change in dict iteration when inserting keys

2017-02-02 Thread Matthew Brett
New submission from Matthew Brett: The behavior of dict iteration has changed in Python 3.6, in that inserting keys during iteration has a different and unpredictable affect. For this code: d = {'foo': 1} for key in d: print(key) d.pop(key) d[key] = 1 Python 3.5 prints a s

[issue29420] Python 3.6 change in dict iteration when inserting keys

2017-02-02 Thread Matthew Brett
Matthew Brett added the comment: To clarify from comments on issue 19332: """ * The normal rule (not just for Python) is that a data structures have undefined behavior for mutating while iterating, unless there is a specific guarantee """ The change in

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Matthew Barnett
Matthew Barnett added the comment: I agree with Marco that it shouldn't be too verbose. I'd like to suggest that it says that it's compatible (i.e. has the same API), but with additional features. -- ___ Python tracker <http

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Matthew Barnett
Matthew Barnett added the comment: With the VERSION0 flag (the default behaviour), it should behave the same as the re module, and that's not going to change. -- ___ Python tracker <http://bugs.python.org/is

[issue22594] Add a link to the regex module in re documentation

2017-02-08 Thread Matthew Barnett
Matthew Barnett added the comment: Ah, well, if it hasn't changed after this many years, it never will. Expect one or two changes to the text. :-) -- ___ Python tracker <http://bugs.python.org/is

[issue29571] test_re is failing when local is set for `en_IN`

2017-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: I'm just wondering whether the problem is just due to the locale's encoding being UTF-8. The locale support in re really only works with encodings that use 1 byte/character. -- ___ Python trac

[issue29571] test_re is failing when local is set for `en_IN`

2017-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The report says "== encodings: locale=UTF-8, FS=utf-8". It says that "test_locale_caching" was skipped, but also that "test_locale_flag" failed. -- ___ Python tracker <

[issue29670] argparse: does not respect required args pre-populated into namespace

2017-02-27 Thread Matthew Hall
New submission from Matthew Hall: I have some Python code which takes advantage of the ability to prepopulate the argparse Namespace before passing it to argparse. This allows me to read sensitive settings such as usernames and passwords from DBs, environment variables, etc. in addition to

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-27 Thread Matthew Tanous
Matthew Tanous added the comment: It makes sense, except for this case is not true when "x" is an immutable data type - it appears as though something like [5] * n creates a list of totally separate elements (even if they start as the same thing). It is difficult to see a case whe

[issue27177] re match.group should support __index__

2016-06-02 Thread Matthew Barnett
Matthew Barnett added the comment: It would be a bug if it was supported but gave the wrong result. It has never been supported (the re module predates PEP 357), so it's a new feature. -- ___ Python tracker <http://bugs.python.org/is

[issue27384] itertools islice consumes items when given negative range

2016-06-24 Thread Matthew Malcomson
New submission from Matthew Malcomson: While the itertools.islice(iterator, n, n) trick is useful as used in the consume recipe, I find the current behaviour if stop is less than start (e.g. itertools.islice(iterator, 3, 0) ) to be surprising. It still consumes the first three elements of

[issue27470] -3 commandline option documented differently via man

2016-07-08 Thread Matthew Gilson
New submission from Matthew Gilson: The man page for python says: > Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. The official documentation (https://docs.python.org/2/using/cmdline.html#cmdoption-3) does not mention 2to3 at all: > Warn about Python 3.x po

[issue27471] sre_constants.error: bad escape \d

2016-07-08 Thread Matthew Barnett
Matthew Barnett added the comment: There's a move to treat invalid escape sequences as an error (see issue 27364). The previous behaviour was to treat them as literals. The replacement template string contains \d, which is not a valid escape sequence (it's valid for the pattern, b

[issue27669] Bug in re.fullmatch() specific to Windows XP

2016-08-02 Thread Matthew Barnett
Matthew Barnett added the comment: FTR, I can't reproduce it. This is what I get on Windows XP (32-bit): Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "lice

[issue27669] Bug in re.fullmatch() specific to Windows XP

2016-08-02 Thread Matthew Barnett
Matthew Barnett added the comment: When I tried it, I got matches for both 'match' and 'fullmatch' (output attached as 'output.txt') as expected. -- Added file: http://bugs.python.org/file43984/output.txt ___ Python tr

[issue27669] Bug in re.fullmatch() specific to Windows XP

2016-08-03 Thread Matthew Barnett
Matthew Barnett added the comment: Are you using the same version on the other systems? I've had a quick look through the bug tracker and found some fixes for fullmatch that postdate Python 3.4.0, so I'll suggest you just update to a more recent version of

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Matthew Barnett
Matthew Barnett added the comment: "*" and the other quantifiers ("+", "?" and "{...}") operate on the preceding _item_, not the entire preceding expression. For example, "ab*" means "a" followed by zero or more repeats of "

[issue17262] OrderedDict not ordering properly when int and float keys are used

2013-02-20 Thread Matthew Porter
New submission from Matthew Porter: I've got two lists: state_cns_list = [0.001, 1, 2, 5] state_names_list = [L, S, D, H] When I try to create an OrderedDict linking each state_cns_list entry with its corresponding state_names_list entry, like so: states = OrderedDict( {float(state_cns

[issue17262] OrderedDict not ordering properly when int and float keys are used

2013-02-20 Thread Matthew Porter
Matthew Porter added the comment: Ahh nevermind, just realized my error :P Sorry for the waste of internet space -- ___ Python tracker <http://bugs.python.org/issue17

[issue694374] Recursive regular expressions

2013-02-23 Thread Matthew Barnett
Matthew Barnett added the comment: FYI, I did eventually add it to my regex implementation. It was quite challenging! -- ___ Python tracker <http://bugs.python.org/issue694

[issue17297] Issue with return in recursive functions

2013-02-25 Thread Matthew Barnett
Matthew Barnett added the comment: This question should've been posted to python-l...@python.org, not here. Your functions are calling themselves, but not returning the result of the call to their own callers. -- ___ Python tracker

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2013-03-07 Thread Matthew Barnett
Matthew Barnett added the comment: I've attached fnmatch_implementation.py, which is a simple pure-Python implementation of the fnmatch function. It's not as susceptible to catastrophic backtracking as the current re-based one. For example: fnmatch('a' * 50, '*a*&

[issue17381] IGNORECASE breaks unicode literal range matching

2013-03-07 Thread Matthew Barnett
Matthew Barnett added the comment: The way the re handles ranges is to convert the two endpoints to lowercase and then check whether the lowercase form of the character in the text is in that range. For example, [A-Z] is converted to the range [\x41-\x5A], and the lowercase form of &#

[issue17381] IGNORECASE breaks unicode literal range matching

2013-03-11 Thread Matthew Barnett
Matthew Barnett added the comment: In issue #3511 the range was slightly unusual, so closing it seemed a reasonable approach, but the range in this issue is less clearly a problem. My preference would be to fix it, if possible. -- ___ Python

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Matthew Barnett
Matthew Barnett added the comment: The regex behaves the same as re. The reason it isn't supported is that \0 starts an octal escape sequence. -- ___ Python tracker <http://bugs.python.org/is

[issue17447] str.identifier shouldn't accept Python keywords

2013-03-17 Thread Matthew Barnett
Matthew Barnett added the comment: I already use it in the regex module for named groups. I don't think it would ever be a problem in practice because the names are invariably handled as strings. -- nosy: +mrabarnett ___ Python tracker

[issue17668] re.split loses characters matching ungrouped parts of a pattern

2013-04-08 Thread Matthew Barnett
Matthew Barnett added the comment: It's not a bug. The documentation says """Split string by the occurrences of pattern. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list."

[issue17998] internal error in regular expression engine

2013-05-17 Thread Matthew Barnett
Matthew Barnett added the comment: Here are some simpler examples of the bug: re.compile('.*yz', re.S).findall('xyz') re.compile('.?yz', re.S).findall('xyz') re.compile('.+yz', re.S).findall('xyz') Unfortunately I find it difficult to

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

2013-05-23 Thread Matthew Barnett
Matthew Barnett added the comment: Yes. As msg99456 suggests, I fixed it the my source code before posting. Compare re in Python 3.3.2: >>> re.compile('x').findall('', 1, 3) ['x', 'x'] >>> re.compile('x').findall('x

[issue22493] Deprecate the use of flags not at the start of regular expression

2014-10-09 Thread Matthew Barnett
Matthew Barnett added the comment: I think the simplest and clearest approach from the user's point of view is just to deprecate inline flags that are not at the start of the pattern. In practice, they almost invariably occur at the start anyway, although I do remember once seeing a pa

[issue22645] Unable to install Python 3.4.2 amd64 on Windows 8.1 Update 1

2014-10-16 Thread Matthew Barnett
Matthew Barnett added the comment: I've just come across the same problem. I uninstalled Python 3.4.1 amd64. There were other things installed in that version, so some stuff remained. I then tried to install Python 3.4.2 amd64, but it failed (same problem as Zac). I ran the Python

[issue22645] Unable to install Python 3.4.2 amd64 on Windows 8.1 Update 1

2014-10-18 Thread Matthew Barnett
Matthew Barnett added the comment: @Terry: Just to clarify, I didn't have a problem installing over Python 3.4.1, only with uninstalling Python 3.4.1 (with other stuff installed there) and then installing Python 3.4.2. -- ___ Python tracker

[issue15824] mutable urlparse return type

2014-11-05 Thread Matthew Hall
Matthew Hall added the comment: I don't think having to call a method with a weird secret underscored name to update a value in a URL named tuple is very elegant. Neither is creating a handful of pointless objects to make one simple validator function like the one I had to code today. I

[issue2636] Adding a new regex module (compatible with re)

2014-11-13 Thread Matthew Barnett
Matthew Barnett added the comment: @Mateon1: "I hope it's fixed"? Did you report it? -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___

[issue2636] Adding a new regex module (compatible with re)

2014-11-14 Thread Matthew Barnett
Matthew Barnett added the comment: The page on PyPI says where the project's homepage is located: Home Page: https://code.google.com/p/mrab-regex-hg/ The bug was fixed in the last release. -- ___ Python tracker <http://bugs.python.org/i

[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread Matthew Barnett
Matthew Barnett added the comment: I notice that it puts the inline flags at the end. It would be better to put them at the start. -- ___ Python tracker <http://bugs.python.org/issue22

[issue4431] Distutils MSVC doesn't create manifest file

2014-12-29 Thread Matthew Brett
Matthew Brett added the comment: I think this is a frank bug for Pythons that use MSVC 10+ by default (3.3, 3.4 for example). The lack of the /MANIFEST flag breaks the distutils.ccompiler.CCompiler.link_executable command - see attached setup.py example. The example gives the error

[issue4431] Distutils MSVC doesn't create manifest file

2015-01-02 Thread Matthew Brett
Matthew Brett added the comment: Steve - did you try my 'setup.py' example; it's standalone, as in `python setup.py build` will reproduce the error. This is specifically VS 2010. It doesn't make any difference for me if I specify an extension or not, so I don't

[issue4431] Distutils MSVC doesn't create manifest file

2015-01-02 Thread Matthew Brett
Matthew Brett added the comment: I think the argument previously was that VS 2010 was not the default compiler for Python 2.7, and so this problem was not important, but I'm happy to be corrected. I haven't tried building extensions for Python 2.7 with VS 2010 but I guess the probl

[issue11352] Update cgi module doc

2015-02-06 Thread Matthew Atkinson
Matthew Atkinson added the comment: Hi I've modified Pierre's patch to apply to the latest 3.5 and 3.4, and made the most of the simple changes suggested in http://bugs.python.org/review/11352/#ps4792 . I've also added all the non internal parameters to the FieldStorage c

[issue20413] Errors in documentation of standard codec error handlers

2015-02-06 Thread Matthew Barnett
Matthew Barnett added the comment: The docs for Python 3.5.0a0 still say "Unicode Private Use Area". -- nosy: +mrabarnett versions: +Python 3.5 ___ Python tracker <http://bugs.python.o

[issue22364] Improve some re error messages using regex for hints

2015-02-18 Thread Matthew Barnett
Matthew Barnett added the comment: Some error messages use the indefinite article: "expected a bytes-like object, %.200s found" "cannot use a bytes pattern on a string-like object" "cannot use a string pattern on a bytes-like object" but others don

[issue24385] libpython27.a in python-2.7.10 i386 (windows msi release) contains 64-bit objects

2015-06-04 Thread Matthew Barnett
Matthew Barnett added the comment: Here's how I can build the regex module on Windows 8.1, 64-bit, using only MinGW64. For Python 3.5, I can link against "python35.dll", but for earlier versions, including Python 2.7, I need "libpython??.a". I have built regex

[issue24385] libpython27.a in python-2.7.10 i386 (windows msi release) contains 64-bit objects

2015-06-08 Thread Matthew Barnett
Matthew Barnett added the comment: @steve.dower: Yes. For Python 35, it appears that it'll link to libpython??.a or python??.dll, whichever it finds in the given folder, so it doesn't actually need libpython??.a anymore. Whi

[issue24454] Improve the usability of the match object named group API

2015-06-15 Thread Matthew Barnett
Matthew Barnett added the comment: I agree that it would be nice if len(mo) == len(mo.groups()), but Serhiy has explained why that's not the case in the regex module. The regex module does support mo[name], so: print('Located coordinate at (%(row)s, %(col)s)' % mo)

[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect

2015-06-30 Thread Matthew Havard
New submission from Matthew Havard: The documentation from json.dumps says this about skipkeys: If ``skipkeys`` is false then ``dict`` keys that are not basic types (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped instead of raising a ``TypeError``. However, that

[issue24555] Python logic error when deal with re and muti-threading

2015-07-03 Thread Matthew Barnett
Matthew Barnett added the comment: Your regex is a pathological case: it suffers from catastrophic backtracking and can take a long time to finish. The other problem is that the re module never releases the GIL, so while it's performing the search in the low-level C code, other Python th

[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect

2015-07-05 Thread Matthew Havard
Matthew Havard added the comment: It's in the actual code in the docstring: https://hg.python.org/cpython/file/6905a7f8c7ac/Lib/json/__init__.py#l187 I'm really new to Mercurial, so I'm not quite sure how to link to the 2.7 version of the Mercurial repo, but here is the l

[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect

2015-07-05 Thread Matthew Havard
Matthew Havard added the comment: Also, this typo is present in all versions anyway. -- ___ Python tracker <http://bugs.python.org/issue24540> ___ ___ Python-bug

[issue24540] Docstring for json.dumps skipkeys parameter is incorrect

2015-07-05 Thread Matthew Havard
Matthew Havard added the comment: Great! Glad to be of service. -- ___ Python tracker <http://bugs.python.org/issue24540> ___ ___ Python-bugs-list mailin

[issue24612] not operator expression raising a syntax error

2015-07-11 Thread Matthew Barnett
Matthew Barnett added the comment: "not" has a lower priority than unary "-"; this: not a < b is parsed as: not (a < b) How would you parse: 0 + not 0 + 0 ? Would it be parsed as: 0 + not (0 + 0) ? Similar remarks could apply to "yield&qu

[issue24636] re.search not respecting anchor markers in or-ed construction

2015-07-15 Thread Matthew Barnett
Matthew Barnett added the comment: The or-ed patterns aren't between the anchors. The ^ is at the start of the first alternative and the $ is at the end of the last alternative. -- ___ Python tracker <http://bugs.python.org/is

[issue24637] locals dictionary in PyRun_String

2015-07-15 Thread Matthew Keeter
New submission from Matthew Keeter: The C API docs for PyRun_StringFlags, PyEval_EvalCodeEx, and PyEval_EvalCode say that globals and locals both must be dictionaries. However, digging into the source [1] shows that locals can be any object implementing the mapping protocol. Furthermore

[issue24642] Will there be an MSI installer?

2015-07-16 Thread Matthew Barnett
Matthew Barnett added the comment: There's an "executable installer"; it's a .exe instead of a .msi. -- nosy: +mrabarnett ___ Python tracker <http://bug

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Matthew Barnett
New submission from Matthew Barnett: I'm unable to import tkinter in Python 3.5.0rc1. The console says: C:\Python35>python Python 3.5.0rc1 (v3.5.0rc1:1a58b1227501, Aug 10 2015, 05:18:45) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits&q

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Matthew Barnett
Matthew Barnett added the comment: Yes, I can confirm that that works for me. -- ___ Python tracker <http://bugs.python.org/issue24847> ___ ___ Python-bugs-list m

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-15 Thread Matthew Barnett
Matthew Barnett added the comment: On running the installer, Windows reports: """Windows SmartScreen prevented an unrecognised application from starting. Running this application might put your PC at risk. Application: Python-24847-2.exe Publisher: Unknown Publisher"

[issue25054] Capturing start of line '^'

2015-09-10 Thread Matthew Barnett
Matthew Barnett added the comment: After matching '^', it advances so that it won't find the same match again (and again and again...). Unfortunately, that means that it sometimes misses some matches. It's a known issue. -- __

[issue25054] Capturing start of line '^'

2015-09-10 Thread Matthew Barnett
Matthew Barnett added the comment: Just to confirm, it _is_ a bug. It tries to avoid getting stuck, but the way it does that causes it to skip a character, sometimes missing a match it should have found. -- ___ Python tracker <h

[issue25581] Python -U raises error during site import

2015-11-07 Thread Matthew Barnett
Matthew Barnett added the comment: So, you write a string literal without a 'u' (or 'b') prefix, and there's no 'from __future__ import unicode_literals' in the module, so you expect it to be a bytestring, but it's not, it's a Unicode str

[issue25626] Gzip fails for file over 2**32 bytes

2015-11-14 Thread Matthew Brett
Changes by Matthew Brett : -- nosy: +Matthew.Brett ___ Python tracker <http://bugs.python.org/issue25626> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Matthew Barnett
Matthew Barnett added the comment: I'm going to have to agree with ThiefMaster. String literals don't truncate like that, nor do lists, nor tuples. Are there any similar cases of truncation elsewhere in the standard library? -- ___ Pyth

[issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError

2016-01-23 Thread Matthew Zipay
New submission from Matthew Zipay: The zipfile.ZipInfo.__init__ method permits several of ZipInfo's slot attributes to go uninitialized unless the object is obtained from ZipFile.getinfo() or ZipFile.infolist(). As a result, accessing those attributes (header_offset, CRC, compress_siz

[issue26354] re.I does not work as expected

2016-02-12 Thread Matthew Barnett
Matthew Barnett added the comment: The 4th argument of re.sub is the count, not the flags. Not a bug. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26354] re.I does not work as expected

2016-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The pattern '\', which is the same as '', matches the string '', and that is replaced with ''. -- ___ Python tra

[issue26354] re.I does not work as expected

2016-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The 3rd argument is the count (the maximum number of replacements, although 0 means no limit, not no replacements). You're passing in the flag re.I instead. re.I happens to have the numeric value 2, so you're telling it to do no more than 2 re

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-11 Thread Matthew Ryan
New submission from Matthew Ryan: On Solaris 11.3 (intel tested, but I assume issue is on SPARC as well), I found the following fails: import os os.urandom(2500) The above throws OSError: [Errno 22] Invalid argument. It turns out that the Solaris version of getrandom() is limited to

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Matthew Ryan
Matthew Ryan added the comment: The new patch looks fine; I used __sun__ rather than sun out of habit (C standard requires system specific macros be in the reserved namespace), but either will work. I found the original problem through debugging with GDB, so I know getrandom() was being called

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Matthew Ryan
Matthew Ryan added the comment: Yes, I've verified that: * the issue existed in the default branch as of this morning. * the patch applies cleanly against both 3.5 and default, and addresses the issue in both branches. -- ___ Python tracker

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: -mrabarnett ___ Python tracker <http://bugs.python.org/issue24557> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-26 Thread Matthew Tanous
New submission from Matthew Tanous: If I produce a list in this fashion: l = [[x] * n] * n I would expect that I would obtain a matrix-like structure. Instead, I get a list of the *same* list, such that the statement: l[x][y] = z would change, in essence, every value in "column"

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-26 Thread Matthew Tanous
Matthew Tanous added the comment: I'm aware that it's how Python works at present. My point was that this is awkward and counter-intuitive, with no purpose I can see worth serving. "That's just how it works" seems to me a rather insufficient answer, especially for

[issue23532] regex "|" behavior differs from documentation

2015-02-26 Thread Matthew Barnett
Matthew Barnett added the comment: @Mark is correct, it's not a bug. In the first example: It tries to match each alternative at position 0. Failure. It tries to match each alternative at position 1. Failure. It tries to match each alternative at position 2. Failure. It tries to match

<    3   4   5   6   7   8   9   >