Ammar Askar added the comment:
Looks like there's an issue already open for this.
--
nosy: +ammar2
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> add support for path-like objects in sys.path
_
Ammar Askar added the comment:
I've updated the patch to document the comparison operators in prose instead of
with markup as requested.
--
Added file: http://bugs.python.org/file45807/uuiddocs.diff5
___
Python tracker
<http://bugs.py
Ammar Askar added the comment:
>From what I can tell from the failed travis run in defused, the problem is
>here:
https://github.com/tiran/defusedxml/blob/master/defusedxml/common.py#L129-L141
It's caused by it using the removed _IterParseIterator file (or rather a field
that re
Ammar Askar added the comment:
The proposed patch fixes this, not sure if a regression test is appropriate
here.
Here's a more minimal example that demonstrates the exact problem:
```
class Index():
def __index__(self):
global a
a.append("2")
Changes by Ammar Askar :
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue29028>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ammar Askar added the comment:
I've attached a patch that colorizes f-strings.
The issue is marked as "test needed" which the dev guide says "... reporter
should post a script or instructions to let a triager or developer reproduce
the issue."
Steps to re-create a
Ammar Askar added the comment:
Not a problem, thank you for the encouragement.
--
___
Python tracker
<http://bugs.python.org/issue29071>
___
___
Python-bugs-list m
Ammar Askar added the comment:
Can recreate under
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit
(AMD64)] on win32
and on latest master.
--
nosy: +ammar2
versions: +Python 3.7
___
Python tracker
<h
Ammar Askar added the comment:
Can recreate successfully on windows, but not on linux:
> C:\Python36\python.exe -c "import datetime;
> datetime.datetime.fromtimestamp(42)"
Traceback (most recent call last):
File "", line 1, in
OSError: [Errno 22] Invalid argument
Ammar Askar added the comment:
The 86,399 upperbound comes from this line (max_fold_seconds=86400):
https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L4277-L4278
The bug is introduced as part of the fold detection in this commit:
https://github.com/python/cpython/commit
Ammar Askar added the comment:
I just ran the following script to check if there are any folds from timestamps
[0, 86399] in any timezone.
import datetime
import pytz
for tz in pytz.all_timezones:
tz = pytz.timezone(tz)
for i in range(86400):
if
Ammar Askar added the comment:
Please post this issue on pypa's get-pip issue tracker
https://github.com/pypa/get-pip
--
nosy: +ammar2
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http:
Ammar Askar added the comment:
Updated patch based on Rietveld review
--
Added file: http://bugs.python.org/file46083/buffer-use-after-free-fix.patch2
___
Python tracker
<http://bugs.python.org/issue29
Ammar Askar added the comment:
I've attached two patches that fix this behavior, one by simply foregoing the
fold detection for this time range on windows (the patch that I'd argue is
simpler and more readable)
And one that truncates the passed values to local to not be negative
Changes by Ammar Askar :
Added file: http://bugs.python.org/file46092/truncate_negatives.patch
___
Python tracker
<http://bugs.python.org/issue29097>
___
___
Python-bug
Ammar Askar added the comment:
Why would the expected output be [1, 2, 3]? That is the list notation for
having a list that contains the elements 1, 2 and 3.
--
nosy: +ammar2
___
Python tracker
<http://bugs.python.org/issue29
Ammar Askar added the comment:
This is because the "coding:" in a comment is a special syntax used to define
the encoding of the file. The only documentation I could find for it on the
official docs is a brief mention here:
https://docs.python.org/3/howto/unicode.html#the-string-
Ammar Askar added the comment:
Thanks for the link Jim, looks like my googling skills are a bit amiss.
I believe the reason the matching allows "encoding" is because a recommended
format in the documentation is:
# vim:fileencoding=
I think changing the behavior of the matching to b
Ammar Askar added the comment:
Given `slice[start:end]`:
What this line is trying to say is that the slice index is inclusive for the
start parameter and exclusive for the end parameter.
In mathematical/interval notation this would look like [start, end)
As a quick example look at the word
Ammar Askar added the comment:
It looks like a basic description of kwdefs was added as part of this commit:
https://github.com/python/cpython/commit/7811a5d1c93f2aa0b357444eeb3f1ddc242ac57a
"keywords and defaults," however, the kwdefs argument was never added to the
prototype.
I
Ammar Askar added the comment:
You're completely right, the kwdefs is referring to default arguments for
keyword-only-arguments from this PEP: https://www.python.org/dev/peps/pep-3102/
Where as that line is probably referring to "defs", the defaults for normal
parameters.
Changes by Ammar Askar :
Added file: http://bugs.python.org/file46332/kwdefs_docs.diff2
___
Python tracker
<http://bugs.python.org/issue29292>
___
___
Python-bugs-list m
Ammar Askar added the comment:
To anyone more experienced with python documentation, is behavior like this
actually supposed to be documented? For some more historical context,
the support for bytes in the json module was removed in this issue:
https://bugs.python.org/issue4136
and then re
Ammar Askar added the comment:
Updated patch for review comments
--
Added file: http://bugs.python.org/file46348/kwdefs_docs.diff3
___
Python tracker
<http://bugs.python.org/issue29
Ammar Askar added the comment:
Updated patch to include a cross reference to keyword-only arguments since I
think not everyone will know about this rather new feature.
--
Added file: http://bugs.python.org/file46349/kwdefs_docs.diff4
___
Python
Ammar Askar added the comment:
Attached patch adds a versionchanged block to specify that bytes and bytesarray
can now be used and the types of encodings it supports (as taken from the
whatsnew changes here https://hg.python.org/cpython/rev/e9e1bf9ec2ac#l2.7)
--
keywords: +patch
Added
Ammar Askar added the comment:
Which part is misleading, do you think the use of "encoding" could be confused
with the argument encoding?
There is a note right above the versionchanged block that says:
`The other arguments have the same meaning as in load(), except encoding which
Ammar Askar added the comment:
I've attached a patch that makes the site package ignore empty lines in .pth
files. Along with a test for this behavior. I'm not really familiar with the
site machinery so I hope the test and code are fine.
--
keywords: +patch
nosy: +ammar2
Ammar Askar added the comment:
This patch makes it so that when a child runner crashes during a multiprocess
test run, it is treated similar to a keyboard interrupt. That is, the currently
running tests will continue to run and immediately after it will print out a
summary.
I think the test
Changes by Ammar Askar :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29389>
___
___
Ammar Askar added the comment:
Attached patch changes the py2.7 documentation to point out that the method
name is __hex__ and its return type is a string.
--
keywords: +patch
nosy: +ammar2
Added file: http://bugs.python.org/file46466/hex_method.diff
Ammar Askar added the comment:
A git style patch can be found at
https://github.com/gwk/cpython/commit/071d17cedfdf2db8b405aab5adabebe2ac5ef67b.patch
--
nosy: +ammar2
___
Python tracker
<http://bugs.python.org/issue29
Ammar Askar added the comment:
Did you forget to close this or is this not fixed, Serhiy?
--
___
Python tracker
<http://bugs.python.org/issue29028>
___
___
Pytho
Changes by Ammar Askar :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29326>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Ammar Askar:
So currently as far as string concatenation goes. ceval has this nice little
branch it can take if both operators are unicode types. However, since this
check is an Exact check, it means that subtypes of unicode end up going through
the slow code path through
Ammar Askar added the comment:
Side note, I was using this script which uses gdb to trace the execution path
when it concatenates strings.
--
Added file: http://bugs.python.org/file43632/test.py
___
Python tracker
<http://bugs.python.org/issue27
Ammar Askar added the comment:
Thank you very much for the prompt feedback.
I didn't even realize there was a __radd__ method, great catch. I've fixed this
and added an appropriate test.
Very good point about the interning. Seeing as its an implementation detail,
I've chang
Changes by Ammar Askar :
Removed file: http://bugs.python.org/file43631/python.diff
___
Python tracker
<http://bugs.python.org/issue27458>
___
___
Python-bugs-list mailin
Ammar Askar added the comment:
> We really don't want to encourage any reliance on this optimization. It was
> put there only to help mitigate the performance impact of a common mistake.
Aah, I didn't realize the extra context behind why the unicode_concatenate path
actually
Ammar Askar added the comment:
This patch adds documentation for the str(uuid) operator along with documenting
the fact that UUID instances support comparisons with `>` and `<`.
It also indents the attributes and descriptions to emphasize that they are part
of the UUID instance, not th
Ammar Askar added the comment:
This diff amends the documentation to point out that PyObject_HEAD includes the
ob_base field, gives a brief overview of it and points to the
PyObject/structures page for more information.
It also changes the semicolon part to a warning for clarity
Ammar Askar added the comment:
It looks like this can be fixed by us. Since sphinx 1.0 there is this handy
config parameter:
http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
I've attached a patch which pins the searchbox as the first thing on every
Ammar Askar added the comment:
Is there any particular reason that datetime.strptime caches the imported
module like that?
>From a quick search, these two other examples don't bother with any caching:
https://github.com/python/cpython/blob/2d264235f6e066611b412f7c2e1603866e0f7f1b
Ammar Askar added the comment:
>The current text is what we want as far as that goes.
Roger that, I've reverted the change to make that a warning in the newest diff.
--
Added file: http://bugs.python.org/file43657/capidocs.diff-2
___
Python
Ammar Askar added the comment:
This patch changes it to a SyntaxError instead of a SystemError.
--
keywords: +patch
nosy: +ammar2
Added file: http://bugs.python.org/file43725/nested_blocks.diff
___
Python tracker
<http://bugs.python.org/issue27
Ammar Askar added the comment:
Amended patch with the comment fixed to refer to just the issue numbers
according to advice from bitdancer.
--
Added file: http://bugs.python.org/file43726/nested_blocks.diff2
___
Python tracker
<h
Ammar Askar added the comment:
Can recreate on both py2.7 and py3.6
Constructor for CodeType in py3.6 is slightly different:
exec(code(0, 0, 2, 3, 0, b"lol lolol", (), (), (), "", "", 0, b""))
--
nosy: +ammar2
versions: +Python 3.6
__
Ammar Askar added the comment:
bump, added the documentation experts list, not sure if the core dev who made
this issue is still active.
--
nosy: +eric.araujo
___
Python tracker
<http://bugs.python.org/issue19
Ammar Askar added the comment:
Thank you for pointing that out to me, it completely slipped past.
It looks like the 'Report a Bug' link disappears because deprecated api is used
in Doc/tools/templates/layout.html
{% block sidebarsourcelink %}
{% endblock %}
http://www.sphinx-
New submission from Ammar Askar:
I encountered some odd behavior today, I compiled python inside VirtualBox,
however, I compiled it inside a shared folder. The OS outside of VirtualBox is
Windows, so the shared folder naturally is case-insensitive. The actual virtual
OS is Debian Linux. Upon
Ammar Askar added the comment:
Aah, you're completely correct. Renaming it to python and doing ./python causes
it to confuse it with the directory. Sorry.
--
resolution: -> not a bug
status: open -> closed
___
Python tra
Ammar Askar added the comment:
Fixed the str() representation as per Evelyn's comment.
--
Added file: http://bugs.python.org/file43979/uuiddocs.diff2
___
Python tracker
<http://bugs.python.org/is
Ammar Askar added the comment:
Whoops, didn't export the patch properly there so it didn't get picked up by
the review tool, this should fix it.
--
Added file: http://bugs.python.org/file43980/uuiddocs.diff3
___
Python trac
Ammar Askar added the comment:
Done.
As a side question, are changes like those indentation problems tracked
somewhere else/merged in bulk like spelling changes?
--
Added file: http://bugs.python.org/file43988/uuiddocs.diff4
___
Python tracker
Ammar Askar added the comment:
This patch adds the search bar to the navigation/header area on the right.
--
Added file: http://bugs.python.org/file43994/searchbar_in_header.diff
___
Python tracker
<http://bugs.python.org/issue19
Ammar Askar added the comment:
Amended the navigation bar patch to add back a change that only shows the
searchbar if javascript is enabled.
--
Added file: http://bugs.python.org/file43995/searchbar_in_header.diff2
___
Python tracker
<h
Ammar Askar added the comment:
Just in case anyone is wondering why this happens. The compiler's peephole
optimizer will fold constant expressions like
x = 5 + 5
into
x = 10
More specifically, this bit here:
https://github.com/python/cpython/blob/0f21fe6155227d11dc02bd3ef3b061de4ec
Ammar Askar added the comment:
You've ran into a classic floating point number limitation.
Please read the following doc page:
https://docs.python.org/2/tutorial/floatingpoint.html
The problem comes when you multiply the number by 100, which is what causes the
precision loss and drops
Ammar Askar added the comment:
> 1. It would be better to make "Quick search" a placeholder
Do you mean in addition to the "Quick search" text that is already on the page
or do you want to remove that? Because placeholder isn't fully compatible with
some older
Ammar Askar added the comment:
This isn't a bug, in fact this very behavior is documented within the string
docs, please read the last paragraph here:
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
--
nosy: +ammar2
title: Bug of python interp
Ammar Askar added the comment:
>The latter. All of the popular browsers (Chrome, Firefox, Edge and even
>Safari) already support the placeholder attribute so I think we can safely
>ignore IE 8 :)
Roger, I've changed it to placeholder.
>I know this is basically a
401 - 461 of 461 matches
Mail list logo