Emanuel Barry added the comment:
Is it possible to get this in in time for 3.6.0a4? The feature itself hasn't
been touched in about 4 months, only tests have been tweaked since.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Emanuel Barry :
--
nosy: -ebarry
___
Python tracker
<http://bugs.python.org/issue12345>
___
___
Python-bugs-list mailing list
Unsubscribe:
Emanuel Barry added the comment:
Here's a new pair of patches for this. There are some small tweaks to the
tests, and I properly fixed all instances of invalid escapes (I also made some
strings into raw-strings at some places where it's not needed, solely for
consistency with s
Changes by Emanuel Barry :
Added file:
http://bugs.python.org/file44108/deprecate_invalid_escapes_both_2.patch
___
Python tracker
<http://bugs.python.org/issue27
Emanuel Barry added the comment:
Rebased patch so that it applies cleanly again.
--
Added file: http://bugs.python.org/file44109/type_one_argument_5.patch
___
Python tracker
<http://bugs.python.org/issue27
Emanuel Barry added the comment:
Awesome, thanks! The "What's new" entry is a bit confusing though; to a casual
observer it might look like the `traceback` module was updated but the normal
behaviour wasn't changed.
--
___
P
Emanuel Barry added the comment:
Pretty sure this falls under the "New features" category, and as such can't be
applied on 3.5.
--
___
Python tracker
<http://bugs.pyt
Emanuel Barry added the comment:
This is irrelevant to this issue.
--
___
Python tracker
<http://bugs.python.org/issue26823>
___
___
Python-bugs-list mailin
Emanuel Barry added the comment:
Doc patch.
--
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file44120/short_tracebacks_doc_1.patch
___
Python tracker
<http://bugs.python.org/i
Changes by Emanuel Barry :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue27767>
___
___
Emanuel Barry added the comment:
One needs to have the "Developer" role (i.e. can triage issues) to be assigned
:)
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.o
Emanuel Barry added the comment:
I tend to like all things magic, but the more I think about it, and the less I
like it being a part of the standard library. I've had a use for this feature
before, and when I did, I cooked my own 12-lines subclass of EnumMeta and
_EnumDict. Raymond
Emanuel Barry added the comment:
The approach I'd take would be to change how {get,set,del}attr handle
AttributeError; possibly by automatically filling in the information and giving
a nicer error message. This would fix this as a side-effect (somewhat; some
bits of code would need to c
New submission from Emanuel Barry:
Attached patch changes bare attribute errors to add a useful error message. As
such, `raise AttributeError` and `raise AttributeError(None)` (but not `raise
AttributeError('')` for example) inside any of the attribute lookup or
descript
Emanuel Barry added the comment:
Opened #27823 as a followup to this, and carried nosy list over.
--
___
Python tracker
<http://bugs.python.org/issue27
Emanuel Barry added the comment:
Thanks for your comments Xiang. Yes, it's not equal to #27794, but it's one of
the multiple ways to fix it, so I made a new issue about it.
The rationale between a bare `raise AttributeError` being changed is the idea
that it carries no information,
Emanuel Barry added the comment:
Typo: "an Warning" ;)
--
nosy: +ebarry
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue6057>
___
Changes by Emanuel Barry :
Added file: https://bugs.python.org/file44220/fix_newlines_1.patch
___
Python tracker
<https://bugs.python.org/issue27425>
___
___
Python-bug
Changes by Emanuel Barry :
Added file: https://bugs.python.org/file44221/test_random_warning_1.patch
___
Python tracker
<https://bugs.python.org/issue27425>
___
___
Pytho
Emanuel Barry added the comment:
Here are three patches for this:
- add_gitattributes_1.patch adds `.gitattributes`, with all the newline
preferences in `.hgeol` (with the exception of the "native" rule at the end,
which in git is the default newline preference).
- fix_newlines_1.p
Emanuel Barry added the comment:
Whoops, turns out I was using the wrong approach for binary files. Here come
add_gitattributes_2.patch and fix_newlines_2.patch (thanks Zachary for pointing
this out).
--
Added file: https://bugs.python.org/file44224/add_gitattributes_2.patch
Changes by Emanuel Barry :
Added file: https://bugs.python.org/file44225/fix_newlines_2.patch
___
Python tracker
<https://bugs.python.org/issue27425>
___
___
Python-bug
Changes by Emanuel Barry :
Removed file: https://bugs.python.org/file44225/fix_newlines_2.patch
___
Python tracker
<https://bugs.python.org/issue27425>
___
___
Python-bug
Changes by Emanuel Barry :
Removed file: https://bugs.python.org/file44220/fix_newlines_1.patch
___
Python tracker
<https://bugs.python.org/issue27425>
___
___
Python-bug
Emanuel Barry added the comment:
Martin: Indeed, seems like it's backwards for some reason. I'm not sure what
happened when I regenerated the index; I removed the patches now anyway. I
think the .gitattributes patch would be fine to go on its own.
It's my understanding that lin
New submission from Emanuel Barry:
The function does definitely exist for me. Please make sure your Python version
is up-to-date. Also, please post a short summary of the issue, and avoid
screenshots whenever possible; it's more work for you, makes it harder for us
to reproduce/follow
Emanuel Barry added the comment:
The patch doesn't apply. I manually copy-pasted the lines in the source and
generated a new one.
I would probably rephrase "these values hold no meaning and should not be used"
into "the values are not important" or so
Kevin Barry added the comment:
emmanuel,
Thanks for the suggestion. Your workaround is exactly the same as using dup2
(in C) to replace stdin/stdout/stderr with the pty, however. If you added the
following lines to your C code, it would have the same effect as the
command-line redirection in
Kevin Barry added the comment:
One additional issue, which my patch doesn't address, is that
PyRun_InteractiveLoop should really take *two* FILE* arguments, with the second
one being optional. This is because on Linux (and presumably on other *nixes)
if a read operation is blocked on a
Kevin Barry added the comment:
emmanuel,
Regarding your points: All three can be taken care of with a combination of my
patch and setting sys.stdin, sys.stdout, and sys.stderr to the pty. (That
should really be done internally with another patch, since os.fdopen is
OS-specific. Also
Kevin Barry added the comment:
emmanuel,
The Python interpreter isn't reentrant, so you could only run two interactive
sessions connected to the same Python environment if you implemented your own
REPL function that unlocked the GIL when waiting for input, then lock it just
long enou
New submission from Emanuel Barry:
On Windows and with the pre-compiled stdlib, the 'collections/__init__.py' file
doesn't match the compiled one, as hinted by the presence of OrderedDict, even
though it is now part of _collections. The interpreter works just as intended
since
Emanuel Barry added the comment:
I guess I misexplained myself; I meant that the file hints that there is no C
implementation of it (it doesn't import the name from _collections), even
though '_collections.OrderedDict is collections.O
New submission from Emanuel Barry:
This is an issue that came up quite often when creating code where you want the
class' namespace to hold the instance attributes. I've often seen (and written)
code like this:
class Foo:
def __init__(self):
self._x = 42
@property
Emanuel Barry added the comment:
The only significant difference is that it lets the instance overwrite the
attribute (it doesn't have __set__ or __delete__). For example (using
fractions.Fraction to demonstrate), the following:
def __new__(cls, numerator=0, denominator=None, _norm
Emanuel Barry added the comment:
I figured. I guess it makes more sense to do that on a per-library basis. Eric
does have a valid point, and perhaps this addition is not needed :) I realize
now that this isn't really needed, backing off and cl
New submission from Barry Scott:
I am used to looking in
HKLM:\SOFTWARE\Python\PythonCore\%(py_maj)d.%(py_min)d\InstallPath
to find out where python is installed so that my installation kit can add
itself to site-packages.
I just found that the registry key used for 32 bit python 3.5 on
Barry Scott added the comment:
To clarify:
3.5 means 3.5 64 bit
3.5-32 means 3.5 32 bit
You do not add the -64 as it is the default.
However: this change should have been in the "What's New" as it breaks Windows
installation code
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
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
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
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
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
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
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
Changes by Emanuel Barry :
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue21243>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Emanuel Barry added the comment:
He probably mistook this for #25179
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue25579>
___
___
Python-bug
Emanuel Barry added the comment:
Well, then my bad. Pretend I didn't say anything :)
--
___
Python tracker
<http://bugs.python.org/issue25179>
___
___
Pytho
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
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
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
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
[
Changes by Emanuel Barry :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue25656>
___
___
Python-bugs-
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")
>
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
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
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
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
Emanuel Barry added the comment:
Oops, that was *completely* the wrong issue. I apologize for the noise.
--
___
Python tracker
<http://bugs.python.org/issue25
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
Changes by Emanuel Barry :
--
assignee: docs@python ->
components: -Documentation
nosy: -docs@python
___
Python tracker
<http://bugs.python.org/issu
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
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
Changes by Emanuel Barry :
--
nosy: +ebarry
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue25770>
___
___
Python-bugs-list mai
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
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
Changes by Emanuel Barry :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue25815>
___
___
Python-bugs-
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
Changes by Emanuel Barry :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue25818>
___
___
Python-bugs-list
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.
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
Emanuel Barry added the comment:
Do you mean like 'filter(None, lst)' does?
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue25840>
___
___
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
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
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
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
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
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
Changes by Emanuel Barry :
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue25907>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Emanuel Barry :
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue25925>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Changes by Emanuel Barry :
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue26060>
___
___
Python-bugs-list mailing list
Unsubscribe:
Emanuel Barry added the comment:
You seem to have forgotten to include a patch.
--
nosy: +ebarry
___
Python tracker
<http://bugs.python.org/issue26069>
___
___
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
Changes by Emanuel Barry :
--
components: +Tests
stage: test needed -> needs patch
___
Python tracker
<http://bugs.python.org/issue24780>
___
___
Python-
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
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
Emanuel Barry added the comment:
This fixed it, thanks!
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue26217>
___
___
Python-
Changes by Emanuel Barry :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Emanuel Barry :
--
stage: -> needs patch
versions: +Python 3.6
___
Python tracker
<http://bugs.python.org/issue26226>
___
___
Python-bugs-list mai
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
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())
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
201 - 300 of 2726 matches
Mail list logo