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 tracker <rep...@bugs.p
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 <rep...@bugs.python.org>
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-doc.org/en
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 tracker <
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 <rep...@bugs.python.org>
<http://bugs.python.org/i
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:
> 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 brow
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 <
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 <rep...@bugs.python.org>
<http://bugs.p
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 <rep...@bugs.python.org>
<http://bugs.python.org/i
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 <rep...@bugs.python.
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 <rep...@bugs.python.org>
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 changed the interned
Changes by Ammar Askar <am...@ammaraskar.com>:
Removed file: http://bugs.python.org/file43631/python.diff
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
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 trac
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 exists in
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:
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/Modu
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 page
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/0f21fe6155227d11dc02bd3ef3b061de4ecea445
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:
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
Changes by Ammar Askar <am...@ammaraskar.com>:
--
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29326>
___
_
Ammar Askar added the comment:
Did you forget to close this or is this not fixed, Serhiy?
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
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 <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Ammar Askar <am...@ammaraskar.com>:
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
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
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
Added file
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'v
Changes by Ammar Askar <am...@ammaraskar.com>:
Added file: http://bugs.python.org/file46332/kwdefs_docs.diff2
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
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.
I
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 <rep...@bugs.python.org>
<http://bugs.python.org/i
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:
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 interpreter
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 copy
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 <rep...@bugs.python.org>
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:
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:
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:
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 <rep...@bug
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 <rep...@bugs.python.org>
<http://bugs.python.org/i
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
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 <rep...@bugs.python.org>
<http://bugs.p
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. This one
Changes by Ammar Askar <am...@ammaraskar.com>:
Added file: http://bugs.python.org/file46092/truncate_negatives.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Ammar Askar added the comment:
Not a problem, thank you for the encouragement.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
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 are to
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 <
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 repr
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 <am...@ammaraskar.com>:
--
nosy: +benjamin.peterson
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29028>
___
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +558
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29812>
___
_
Ammar Askar added the comment:
This is my first real substantial testing change so I'd appreciate all
feedback. The way I did the cross-check doesn't actually rely on any of the
information from the test_keyword style regeneration test.
I think this approach is a lot simpler
Ammar Askar added the comment:
I was only able to recreate this under 3.4 and 3.3, and both of them are under
"security" status on https://docs.python.org/devguide/#status-of-python-branches
Should this be marked as won't fix?
--
nosy: +ammar2
versions: +Python 3.3, Python 3
Ammar Askar added the comment:
As per discussion with haypo on irc, this is not a bug since essentially you've
made a file which shadows the following stdlib module
https://docs.python.org/3/library/copy.html
When shutil goes to import the copy module, your copy module is given higher
Ammar Askar added the comment:
That makes sense, listing availability for exceptions would certainly make
everything more succinct. How do you propose we mention that certain options
don't actually do anything on Windows. Currently I have a footnote in the table
that links to the MSDN
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3103
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31178>
___
_
Ammar Askar added the comment:
I've opened up a PR for this ticket's dependencies. There's some things I'm
looking for feedback on there: https://github.com/python/cpython/pull/3072
--
___
Python tracker <rep...@bugs.python.org>
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3108
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12887>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3109
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14345>
___
_
Ammar Askar added the comment:
No problem, closing this in favor of issue 30455.
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Ammar Askar added the comment:
Opened up https://github.com/python/cpython/pull/2755/ in order to address
https://bugs.python.org/issue30883
This changes the ftp servers from debian.org to pythontest.net
--
nosy: +ammar2
___
Python tracker <
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2814
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30883>
___
_
Ammar Askar added the comment:
Sorry, forgot the actual link.
https://docs.python.org/3/reference/expressions.html#operator-precedence
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Ammar Askar added the comment:
Check out this section of the documentation, notably this part:
"Note that comparisons, membership tests, and identity tests, all have the same
precedence and have a left-to-right chaining feature"
Chaining lets you write stuff like this:
>>&
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2816
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30883>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2817
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30883>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2815
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30883>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2790
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30937>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
keywords: +easy, patch
stage: -> patch review
type: -> enhancement
___
Python tracker <rep...@bugs.python.org>
<http://bugs.
Ammar Askar added the comment:
As the faulthandler documentation notes:
> The fault handler is called on catastrophic cases and therefore can only use
> signal-safe functions (e.g. it cannot allocate memory on the heap). Because
> of this limitation traceback dumping is minimal
Ammar Askar added the comment:
No need to close it off just yet, what I posted was just my opinion. We can
wait for haypo's expert opinion seeing as he implemented faulthandler.
Maybe it would be useful to have an option to say always generate a core dump?
Something like the stuff listed
Ammar Askar added the comment:
Gonna take this and its dependencies on, eta 2-4 days.
--
nosy: +ammar2
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/iss
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3067
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31150>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3075
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31150>
___
_
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +3076
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31150>
___
_
Ammar Askar added the comment:
Hey, sorry for the late response. I just ran:
import datetime
from dateutil.zoneinfo import get_zonefile_instance
import dateutil.tz
zonenames = list(get_zonefile_instance().zones)
for tz in zonenames:
tz = dateutil.tz.gettz(tz)
for i
Changes by Ammar Askar <am...@ammaraskar.com>:
--
pull_requests: +2434
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29097>
___
_
Ammar Askar added the comment:
Created a github pull request for the recommended patch along with a test:
https://github.com/python/cpython/pull/2385
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Ammar Askar added the comment:
Looks like that error is coming from the fact that the Powershell on that
buildbot is outdated. As the documentation notes:
https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.utility/invoke-webrequest
> This cmdlet was introdu
Ammar Askar added the comment:
Closing this since as you pointed out this behavior is already documented.
As an aside, seeing as you guys already have pytz as a dependency. Instead of
fixing this with tzset you can also just explicitly do
datetime.datetime.fromtimestamp(time, pytz.timezone
Ammar Askar added the comment:
If it doesn't manage to make it by tomorrow afternoon, I can backport it
manually. It doesn't look like its been able to do it yet.
--
nosy: +ammar2
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Ammar Askar added the comment:
For what its worth, "async" and "await" are special keywords. They only act as
keywords under certain situations by the tokenizer. You can read more about
this here: https://www.python.org/dev/peps/pep-0492/#transition-plan
As far as I am
Ammar Askar <am...@ammaraskar.com> added the comment:
>core-workflow made a premature decision to turn off Travis and AppVeyor and
>make VSTS blocking.
It looks like AppVeyor and Travis are still running as of the latest PR:
https://github.com/python/cpython/pull/6965
Annoyin
Ammar Askar <am...@ammaraskar.com> added the comment:
0 is excluded because it is not a valid hour in the 12 hour clock.
0:39pm is not a valid time on a 12 hour clock. After 11am you reach 12pm, then
1pm. See the table on the right here:
https://en.wikipedia.org/wiki/12-hour_clock
You
Ammar Askar added the comment:
I don't think backwards compatibility matters too much for the turtle package
but the way its proposed in the initial report makes it so that text in
previous versions would now be angled to the turtle's heading.
To keep the previous behavior a keyword arg
Ammar Askar added the comment:
Can't recreate from latest Python 3.6.5 downloaded off python.org
> D:\Python365\python.exe
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits"
Ammar Askar added the comment:
I don't think this should be documented at all, not in the glossary, nor the
stdtypes section. A quick search through of the glossary and stdtypes indicates
that the glossary entry of list is the only place where a time complexity is
documented.
The problem
Ammar Askar added the comment:
I'd say edit the PR and the bug tracker issue to reflect the change. Though you
might want to wait for the opinion of a core dev or someone with more
documentation experience than me.
--
___
Python tracker
<ht
Ammar Askar added the comment:
If this is actually an issue, and not just a documentation lapse I can create a
pull request from my original patch.
--
nosy: +ammar2
___
Python tracker
<https://bugs.python.org/issue33
Ammar Askar added the comment:
https://docs.python.org/3.8/reference/lexical_analysis.html
--
nosy: +ammar2
___
Python tracker
<https://bugs.python.org/issue33
1 - 100 of 461 matches
Mail list logo