[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Emanuel Barry
Emanuel Barry added the comment: The same is true of the decimal and datetime modules. Names starting with an underscore are an implementation detail, and you shouldn't rely on these in production code. -- nosy: +ebarry ___ Python tracker

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-07 Thread Emanuel Barry
Emanuel Barry added the comment: The Python implementation will stay for two main reasons, one to provide a working implementation for all those who wish to use a modified version (you, for example, if you want to use a version that lets you alter order), and two for alternate implementations

[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry
Emanuel Barry added the comment: What about the `py' launcher? It will always launch the latest installed version. -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/is

[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry
Emanuel Barry added the comment: Oh, I didn't know the py launcher preferred 2.7 - I always work with 3.x; my bad. -- ___ Python tracker <http://bugs.python.org/is

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Emanuel Barry
Emanuel Barry added the comment: I don't know why you believe docstrings are programmatically linked to the library reference... Here is the file that is used to make the online documentation: https://hg.python.org/cpython/file/tip/Doc/library/statistics.rst -- nosy: +e

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Emanuel Barry
Emanuel Barry added the comment: It probably shouldn't be assigned to docs@python, but it's still a typo in the source code, so it should probably be under Library anyway. LGTM -- ___ Python tracker <http://bugs.python.o

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Emanuel Barry
Emanuel Barry added the comment: > In Doc/library/smtplib.rst "a" is replaced to "an" before a word starting > with consonant: SMTP. Is it correct? One of the peculiriarities of the English language is that, in front of acronyms, you have two different ways to decid

[issue21243] Auto-generate exceptions.c from a Python file

2015-11-03 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue21243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25549] call sum on list of timedelta throws TypeError

2015-11-03 Thread Emanuel Barry
Emanuel Barry added the comment: `sum` has an optional `start` parameter, which defaults to 0, and is used as the first item to add. Since timedeltas and ints are not interoperable, that means you have to explicitly tell sum what to use. The following code works: >>> e=[datetime.ti

[issue25179] PEP 498 f-strings need to be documented

2015-11-07 Thread Emanuel Barry
Emanuel Barry added the comment: I think f-strings should be valid as docstrings. I don't know the exact details, but I think it would be harder to prevent rather than allow them. It would be exactly the same as doing func.__doc__ = func.__doc__.format(foo=foo, bar=bar) It probably wou

[issue25179] PEP 498 f-strings need to be documented

2015-11-07 Thread Emanuel Barry
Emanuel Barry added the comment: I was under the impression that they would work without any additional work (as they'd have access to the outer scope). Of course, trying to access a local variable would be an error as it's not yet defined. My point is more that we shouldn't

[issue25579] def is not a keyword with tokenize.py

2015-11-07 Thread Emanuel Barry
Emanuel Barry added the comment: He probably mistook this for #25179 -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue25579> ___ ___ Python-bug

[issue25179] PEP 498 f-strings need to be documented

2015-11-07 Thread Emanuel Barry
Emanuel Barry added the comment: Well, then my bad. Pretend I didn't say anything :) -- ___ Python tracker <http://bugs.python.org/issue25179> ___ ___ Pytho

[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-15 Thread Emanuel Barry
Emanuel Barry added the comment: I would personally suggest a more permanent and accessible way, in the way the decimal module handles it. I'd add a '_pycollections' module holding the pure Python implementations of OrderedDict and _count_elements, then have the collections

[issue25650] Mismatching documentation <=> behaviour for typing.Any

2015-11-17 Thread Emanuel Barry
New submission from Emanuel Barry: The docstring for typing.Any specifically says "- Any object is an instance of Any."; in practice however it's not actually the case, as isinstance(x, Any) raises a TypeError. AnyMeta makes this behaviour seem intentional, however the official

[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Emanuel Barry
Emanuel Barry added the comment: Your list `l` actually holds only one list, except three times. When you change it, it's reflected in all the lists. It's the equivalent of the following: >>> x=['', ''] >>> l=[x, x, x] Makes a bit more sens

[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Emanuel Barry
Emanuel Barry added the comment: Another way to fix this would be the following: >>> l=[[''] * 2 for _ in range(3)] >>> l [['', ''], ['', ''], ['', '']] >>> l[0][1] = "A" >>> l [

[issue25656] multiprocessing.dummy: pool.map hangs on empty list

2015-11-21 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> not a bug status: open -> closed ___ Python tracker <http://bugs.python.org/issue25656> ___ ___ Python-bugs-

[issue25707] Add the close method for ElementTree.iterparse() object

2015-11-23 Thread Emanuel Barry
Emanuel Barry added the comment: I am unable to reproduce the issue on Windows 7 with 3.5.0; I have tried opening a small (non-empty) text. Here's the result: >>> import xml.etree.ElementTree as ET >>> import gc >>> ET.iterparse("E:/New.txt") >

[issue25707] Add the close method for ElementTree.iterparse() object

2015-11-23 Thread Emanuel Barry
Emanuel Barry added the comment: Oh, my bad. Ignore my last message, behaviour is identical then. Thanks for clearing that up. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Emanuel Barry
Emanuel Barry added the comment: I'm with Serhiy, the line number is inane. Could you put the exact contents of your /usr/lib/python3.5/tempfile.py file somewhere for us to see? Output of sys.version would be nice, too. -- nosy: +ebarry ___ P

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Emanuel Barry
Emanuel Barry added the comment: Your file has a lot of shenanigans that are triggered if 'shutil' fails to be imported, adding an extra 139 lines at the top of the file, which is exactly how offset your traceback is compared to our lines. The rest of the file is virtually ident

[issue25683] __context__ for yields inside except clause

2015-11-25 Thread Emanuel Barry
Emanuel Barry added the comment: This is due to the fact that Python 3 added the ability to define only __eq__ and get a free __ne__ defined. If my memory serves me right, functools.total_ordering was added in 3.2 and then backported to 2.x - where the relationship with __eq__ and __ne__ is

[issue25683] __context__ for yields inside except clause

2015-11-25 Thread Emanuel Barry
Emanuel Barry added the comment: Oops, that was *completely* the wrong issue. I apologize for the noise. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-25 Thread Emanuel Barry
Emanuel Barry added the comment: This is due to the fact that Python 3 added the ability to define only __eq__ and get a free __ne__ defined. If my memory serves me right, functools.total_ordering was added in 3.2 and then backported to 2.x - where the relationship with __eq__ and __ne__ is

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-25 Thread Emanuel Barry
Changes by Emanuel Barry : -- assignee: docs@python -> components: -Documentation nosy: -docs@python ___ Python tracker <http://bugs.python.org/issu

[issue25757] Subclasses of property lose docstring

2015-11-27 Thread Emanuel Barry
Emanuel Barry added the comment: Pointed out a refleak and a small nit. -- nosy: +ebarry stage: -> patch review ___ Python tracker <http://bugs.python.org/issu

[issue25757] Subclasses of property lose docstring

2015-11-28 Thread Emanuel Barry
Emanuel Barry added the comment: Looking at it again, it appears you didn't have to decref it; my bad. Both patches LGTM. -- ___ Python tracker <http://bugs.python.org/is

[issue25770] expose name, args, and kwargs from methodcaller

2015-11-30 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry stage: -> patch review ___ Python tracker <http://bugs.python.org/issue25770> ___ ___ Python-bugs-list mai

[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Emanuel Barry
Emanuel Barry added the comment: As Stefan said, this is not a bug with Python. Enforcing strict type checking is the responsibility of third-party tools, not the interpreter. -- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -&g

[issue25811] return from random.shuffle

2015-12-05 Thread Emanuel Barry
Emanuel Barry added the comment: While I do see the desire to get your list back for such cases (I would have liked so, too, in some cases), it's inconsistent, as everything else operating in-place returns None. Plus, having it return None helps you remember that you should kee

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> not a bug status: open -> closed ___ Python tracker <http://bugs.python.org/issue25815> ___ ___ Python-bugs-

[issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

2015-12-07 Thread Emanuel Barry
Emanuel Barry added the comment: Could you provide actual code where a reference is leaked? To me, this looks like hypothetical failure rather than something that has a chance of occurring - feel free to prove me wrong, though :) Please also include relevant tests. -- nosy: +ebarry

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Emanuel Barry
Changes by Emanuel Barry : -- stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue25818> ___ ___ Python-bugs-list

[issue25819] print "Hi" in python 3 exception handling doesn't work

2015-12-07 Thread Emanuel Barry
Emanuel Barry added the comment: The reason you are experiencing this behviour is because of the way Python works. Python needs to compile your code before it can execute it. It parses the code, sees an invalid token ('print "Hi"'), fails to compile and throws an error.

[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

2015-12-08 Thread Emanuel Barry
Changes by Emanuel Barry : -- versions: +Python 3.3, Python 3.4, Python 3.6 ___ Python tracker <http://bugs.python.org/issue18597> ___ ___ Python-bugs-list mailin

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread Emanuel Barry
Emanuel Barry added the comment: Do you mean like 'filter(None, lst)' does? -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue25840> ___ ___

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-13 Thread Emanuel Barry
Emanuel Barry added the comment: Nobody seems to have asked this, so I'll be that guy. In which circumstances does comparing two code objects (at function creation time, what's more) make any sense? I mean, I'm fine with being able to compare two code objects, but I don

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-13 Thread Emanuel Barry
Emanuel Barry added the comment: I'm not suggesting to get rid of the rich compare ability of code objects, which makes sense to me. What doesn't make sense to me, however, is when a function's code object is replaced by another one because it compares equal. I see no use cas

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-14 Thread Emanuel Barry
Emanuel Barry added the comment: I see. Is there any to special-case those so that only closures use that? Maybe by checking on the function object itself - the function itself would be quite similar, as well. @Mark - I think you've misunderstood me (others did too, so I'm going to

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-14 Thread Emanuel Barry
Emanuel Barry added the comment: You need to do 'import collections.abc' as abc is a submodule of collections, and is not imported from a bare 'import collections'. -- nosy: +ebarry ___ Python tracker <http://bug

[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Emanuel Barry
Emanuel Barry added the comment: Reviewed the Python code (unlike what my email said, it doesn't LGTM; I'm tired and just forgot). I checked the C code for the obvious pitfalls (didn't spot any), but it will require someone else better than me to look at it. -- nosy

[issue25903] SUGGESTION: Optimize code in PYO

2015-12-18 Thread Emanuel Barry
Emanuel Barry added the comment: *.pyo files have been removed from the language as of 3.5; instead, the optimization is done directly to the *.pyc files. Are you suggesting re-introducing *.pyo files or changing this behaviour in the current model? Also, 'if type(obj) is int' is

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2015-12-18 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue25907> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25925] Coverage support for CPython 2

2015-12-22 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue25925> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24379] Add operator.subscript as a convenience for creating slices

2015-12-22 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry stage: resolved -> patch review title: operator.subscript -> Add operator.subscript as a convenience for creating slices ___ Python tracker <http://bugs.python.org/i

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Emanuel Barry
Emanuel Barry added the comment: Set displays appear to be the culprit here: >>> class A: ... count = 0 ... def __init__(self): ... self.cnt = self.count ... type(self).count += 1 ... def __eq__(self, other): ... return type(self) is type(other) ... def __ha

[issue26046] Typo in documentation of unittest

2016-01-07 Thread Emanuel Barry
Emanuel Barry added the comment: Think you can submit a patch? -- keywords: +easy nosy: +ebarry stage: -> needs patch title: Typo -> Typo in documentation of unittest ___ Python tracker <http://bugs.python.org/i

[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Emanuel Barry
Emanuel Barry added the comment: The choice of IPython to depend on a private, undocumented method means that they are subject to such bugs. A quick Google search tells me you should probably report the issue here: https://github.com/ipython/ipython/issues -- nosy: +ebarry status

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

2016-01-09 Thread Emanuel Barry
Emanuel Barry added the comment: Truncating at 200 characters is actually a common occurrence in the C code, just barely anyone notice this, as it's not common to need more than 200 characters for most expressions. I don't think this needs to be changed at all; the rare case should

[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue26060> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26069] Remove the Deprecated API in trace module

2016-01-09 Thread Emanuel Barry
Emanuel Barry added the comment: You seem to have forgotten to include a patch. -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue26069> ___ ___

[issue26077] Make slicing of immutable structures return a view instead of a copy

2016-01-10 Thread Emanuel Barry
Emanuel Barry added the comment: This is an interesting idea, +1 from me. Do you want to submit a patch? -- nosy: +ebarry stage: -> needs patch versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker &l

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-16 Thread Emanuel Barry
Changes by Emanuel Barry : -- components: +Tests stage: test needed -> needs patch ___ Python tracker <http://bugs.python.org/issue24780> ___ ___ Python-

[issue26197] arange from numpy function has some limits....I propose a python function that overcome these limitations

2016-01-25 Thread Emanuel Barry
Emanuel Barry added the comment: NumPy isn't a part of CPython. As haypo said, please submit that to their tracker instead. -- nosy: +ebarry resolution: -> third party stage: -> resolved status: open -> closed ___ Python

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
New submission from Emanuel Barry: I compiled CPython from latest trunk on GitHub (revision a587bc1eea903dfac94a85324cc6ab39755769a8), compiled with Py_DEBUG and went to run the test suite. Here's the (rather long) output: E:\GitHub\cpython\PCbuild\win32>python_d -m test == CPython

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
Emanuel Barry added the comment: This fixed it, thanks! -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue26217> ___ ___ Python-

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
Changes by Emanuel Barry : -- stage: -> needs patch versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue26226> ___ ___ Python-bugs-list mai

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
New submission from Emanuel Barry: Compiled latest master and ran test suite (Py_DEBUG build). A few failures here and there, and some tests skipped. I haven't yet looked into getting the proper libraries to make some of the skipped tests execute, I'm trying to make the whole test

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
Emanuel Barry added the comment: Well, it has a non-ASCII character in it, so I wouldn't be surprised if this was the issue :) Latest master (3.6): >>> import socket >>> socket.gethostname() 'Émanuel-PC' >>> socket.gethostbyaddr(socket.gethostname())

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-27 Thread Emanuel Barry
Emanuel Barry added the comment: FWIW this patch doesn't fix the test_httpservers failure (or any other) in #26226 -- ___ Python tracker <http://bugs.python.org/is

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-28 Thread Emanuel Barry
Emanuel Barry added the comment: If it worked for you, I assume it's fine and I probably did something wrong on my side. Thanks for the fix! -- ___ Python tracker <http://bugs.python.org/is

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-28 Thread Emanuel Barry
Emanuel Barry added the comment: Oh, sorry. The patch applies without any problem, then I re-compile everything and run, and the same error happens. I re-compiled just now to make double sure. -- ___ Python tracker <http://bugs.python.

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-28 Thread Emanuel Barry
Emanuel Barry added the comment: Yes, it's not all that urgent. And Victor's latest patch doesn't work, either :( I wonder if there's a way to (temporarily) modify the output of ``socket.gethostname()`` to be able to test suc

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-29 Thread Emanuel Barry
Emanuel Barry added the comment: For future reference, Victor's patch does fix it, I was checking the wrong thing when testing. -- ___ Python tracker <http://bugs.python.org/is

[issue26110] Speedup method calls 1.2x

2016-02-02 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue26110> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26279] time.strptime does not properly convert out-of-bounds values

2016-02-03 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry title: Possible bug in time library -> time.strptime does not properly convert out-of-bounds values versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue17446] doctest test finder doesnt find line numbers of properties

2016-02-04 Thread Emanuel Barry
Emanuel Barry added the comment: Left a comment on Rietveld. I don't have time right now to check the test, but I suspect you tested it before submitting the patch, so it should probably be fine. -- nosy: +ebarry stage: -> patch review __

[issue26291] Floating-point arithmetic

2016-02-04 Thread Emanuel Barry
Emanuel Barry added the comment: This is due to how floating point numbers are handled under the hood. See http://effbot.org/pyfaq/why-are-floating-point-calculations-so-inaccurate.htm and https://docs.python.org/3/tutorial/floatingpoint.html for some useful read about why Python behaves like

[issue26324] sum() incorrect on negative zeros

2016-02-09 Thread Emanuel Barry
Emanuel Barry added the comment: This is consistent with the advertised equivalence of sum(): >>> -0.0 + -0.0 + 0 0.0 This works as you'd expect: >>> sum([-0.0, -0.0], -0.0) -0.0 It has a start value of 0, and I don't think we should special-case thi

[issue26324] sum() incorrect on negative zeros

2016-02-09 Thread Emanuel Barry
Emanuel Barry added the comment: "Not trivial" might be an understatement. You need the start value to begin summing the items, but you may face with a non-repeatable generator with side-effects. Sure, you could special-case some builtins, but I'm not too keen on adding special

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- assignee: -> serhiy.storchaka nosy: +ebarry, serhiy.storchaka stage: -> needs patch type: -> behavior ___ Python tracker <http://bugs.python.or

[issue26546] Provide translated french translation on docs.python.org

2016-03-20 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry stage: -> patch review ___ Python tracker <http://bugs.python.org/issue26546> ___ ___ Python-bugs-list mai

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-18 Thread Emanuel Barry
New submission from Emanuel Barry: `shutil.get_terminal_size()` will sometimes propagate `AttributeError: module has not attribute 'get_terminal_size'` to the caller. The call checks for NameError, which makes no sense, so I guess it must be an oversight. Attached patch fixes it.

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-18 Thread Emanuel Barry
Emanuel Barry added the comment: I think Rietveld doesn't like me because I made it a .diff file, and not a .patch file, but who knows. It's a bit of a shot in the dark though, because I can't reproduce an environment where `os.get_terminal_size()` doesn't exist. I'm

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-19 Thread Emanuel Barry
Emanuel Barry added the comment: On posix-based OSes, `os.get_terminal_size` might not exist ( https://hg.python.org/cpython/file/default/Modules/posixmodule.c#l12462 ), so this is needed. New patch file with tests included. -- Added file: http://bugs.python.org/file42522

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-19 Thread Emanuel Barry
Emanuel Barry added the comment: Hmm, if `sys.__stdout__` was deleted (or set to `None`), this would also raise an `AttributeError` when calling `shutil.get_terminal_size`, so I think that even if `os.get_terminal_size` is guaranteed to be always present (which it's not, IIUC), cat

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-19 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42523/get_term_size_with_test2.patch ___ Python tracker <http://bugs.python.org/issue26801> ___ ___ Pytho

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-19 Thread Emanuel Barry
Emanuel Barry added the comment: To be fair, I don't think we actually need a unit test to check if `os.get_terminal_size` exists, as we catch any `AttributeError` at all. I'd want to keep the except clause there to properly handle `sys.__stdout__` being `None` (or simply absen

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: Patch fixes this the proper way by defining __all__ in the string module. -- keywords: +patch nosy: +ebarry Added file: http://bugs.python.org/file42536/string___all__.patch ___ Python tracker <http://bugs.python.

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: Thanks SilentGhost, seems my brain decided not to see uppercase names :) Attached patch adds Formatter and Template as well. -- Added file: http://bugs.python.org/file42537/string___all___2.patch ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: I added an underscore in front of ChainMap, but I kept the __all__ definition because I think it should be there regardless (like every module, basically). -- Added file: http://bugs.python.org/file42540/ChainMap___all__.patch

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42541/ChainMap___all___2.patch ___ Python tracker <http://bugs.python.org/issue26809> ___ ___ Python-bug

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Emanuel Barry
New submission from Emanuel Barry: I recently suggested on Python-ideas ( https://mail.python.org/pipermail/python-ideas/2016-April/039899.html ) to shrink long tracebacks if they were all the same noise (recursive calls). Seeing as the idea had a good reception, I went ahead and implemented

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Emanuel Barry
Emanuel Barry added the comment: Yes, can't handle mutually recursive functions. I could maybe check for the last two or three functions, but that seems like unnecessary work for something that might not happen as often (I can see it being the case with e.g. __getattr__ though). If e

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Emanuel Barry
Emanuel Barry added the comment: The message is mostly a placeholder, but "message" is singular so I figured it would be obvious. But alas, if you are confused, others might be too. Propositions for a better message are welcome :) I'll attempt to make it track chained cal

[issue26823] Shrink recursive tracebacks

2016-04-21 Thread Emanuel Barry
Emanuel Barry added the comment: Attached patch also modifies Lib/traceback.py to present identical behaviour, and changes "Previous message" to "Previous line". I'll postpone the more complex implementation of that, and might just not do it as it's indeed bet

[issue26823] Shrink recursive tracebacks

2016-04-22 Thread Emanuel Barry
Emanuel Barry added the comment: New version with tests now, I test both the C and Python implementations. -- assignee: -> ebarry Added file: http://bugs.python.org/file42570/short_tracebacks_3.patch ___ Python tracker <http://bugs.pyth

[issue26874] Docstring error in divmod function

2016-04-28 Thread Emanuel Barry
Emanuel Barry added the comment: The documentation looks fine to me. Are you seeing any other place that I'm missing? https://docs.python.org/3/library/functions.html#divmod -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/is

[issue26951] Unintuitive error when using generator expression in class property

2016-05-04 Thread Emanuel Barry
Emanuel Barry added the comment: Using a simple metaclass shows that definition order is not at fault here: >>> class PrintOrder(dict): ... def __setitem__(self, item, value): ... print(item, value) ... super().__setitem__(item, value) ... >>> class Show(type): ...

[issue27045] Forward slashes in Windows paths

2016-05-16 Thread Emanuel Barry
Emanuel Barry added the comment: Forward slashes work fine in Windows, for both the command line and PowerShell. Windows always displays backslahes, but accepts either (as well as any combination of both) in paths. -- assignee: docs@python -> nosy: +ebarry resolution: -> not

[issue26823] Shrink recursive tracebacks

2016-05-16 Thread Emanuel Barry
Emanuel Barry added the comment: I realize that I haven't given any update on this since my last patch. I figured that trying to detect when an arbitrary number of functions call each other in a convoluted call chain isn't a very good idea. Not only is it way beyond my abilities, b

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
New submission from Emanuel Barry: I got a random UnicodeDecodeError while trying to install a module with distutils. Traced it back and it being my name having a non-ascii character floating around in my environment. I'm including two patches: subprocess_errors_simple_1.patch simply

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42881/subprocess_distutils_errors_1.patch ___ Python tracker <http://bugs.python.org/issue27048> ___ ___

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42883/subprocess_distutils_errors_2.patch ___ Python tracker <http://bugs.python.org/issue27048> ___ ___

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Emanuel Barry added the comment: The data that causes the issue is my name (Émanuel), which is present in a couple of places in my environment. I also completely forgot about surrogateescape, my bad. Here are two new patches with the surrogateescape error handler instead of the replace one

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Emanuel Barry added the comment: Oops, I thought I had written that - must have accidentally deleted it. I'm on Windows 7, my locale is fr-CA / cp1252, and the non-ascii data (my name =) comes from my environment. I discussed a bit with R. David Murray off-issue, and in the end it seems

[issue27048] distutils._msvccompiler._get_vc_env() fails with UnicodeDecodeError if an env var is not encodable

2016-05-17 Thread Emanuel Barry
Emanuel Barry added the comment: You are right Martin, this also fixes it, and it seems much less controversial :) Here you go. -- Added file: http://bugs.python.org/file42885/distutils_windows_non_ascii_1.patch ___ Python tracker <h

[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Emanuel Barry
Emanuel Barry added the comment: Yes, and it seems that it is waiting for a review. http://bugs.python.org/issue25782 -- nosy: +ebarry ___ Python tracker <http://bugs.python.org/issue27

<    1   2   3   4   >