Changes by Ammar Askar :
--
pull_requests: +3103
___
Python tracker
<http://bugs.python.org/issue31178>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ammar Askar :
--
pull_requests: +3108
___
Python tracker
<http://bugs.python.org/issue12887>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ammar Askar :
--
pull_requests: +3109
___
Python tracker
<http://bugs.python.org/issue14345>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.
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
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 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
<http://bugs.python.o
Ammar Askar added the comment:
This is expected behavior, take a look at this section in the tutorial on
classes:
https://docs.python.org/3/tutorial/classes.html#class-and-instance-variables
Unlike say Java, member variables need to be initialized in the constructor.
--
nosy
Ammar Askar added the comment:
A good place to start might be to search for a function that says it returns a
borrowed reference in the source tree. For example, "PyImport_AddModule" says
it returns a borrowed reference.
In the search you'll find the relevant file here:
htt
Ammar Askar added the comment:
This has to do with C struct packing and alignment. You are likely on a 64-bit
computer and thus your structs are aligned to 8 byte (64 bit) boundaries.
https://docs.python.org/2/library/ctypes.html#structure-union-alignment-and-byte-order
Create an equivalent
Ammar Askar added the comment:
Iterating over _fields_ and adding up the sizeof() for each type could be one
solution.
--
___
Python tracker
<https://bugs.python.org/issue35
Ammar Askar added the comment:
This change in difference is caused by
https://github.com/python/cpython/commit/e036ef8fa29f27d57fe9f8cef8d931d4122d8223
The old code checked for duplicate arguments by essentially running
`set().intersection(d)` and since `set().intersection(['a',
Ammar Askar added the comment:
Sounds good, I'll take a look at the changes and update the PR accordingly.
--
___
Python tracker
<https://bugs.python.org/is
Ammar Askar added the comment:
Great job Serhiy, your work on argument clinic has encompassed the previous PR
very well. I've updated it for the changes.
--
___
Python tracker
<https://bugs.python.org/is
Ammar Askar added the comment:
It seems this behavior is somewhat documented:
https://docs.python.org/3/library/os.html#os.renames
>Works like rename(), except creation of any intermediate directories needed to
>make the new pathname good is attempted first.
>This function can fail
Ammar Askar added the comment:
Victor is correct, this is a limitation in Windows. As the documentation for
time notes:
>Although this module is always available, not all functions are available on
>all platforms. Most of the functions defined in this module call platform C
&g
Ammar Askar added the comment:
Aah, I interpreted the combination of the warning and the fact that it says
"attempted first" to mean that any failures in the actual renaming will leave
the new directory in place. That is, no cleanup is ever performed.
A quick glance at the cod
Ammar Askar added the comment:
Recreatable on master as well, also Martin your suspicion seems correct,
reverting
https://github.com/python/cpython/commit/23db935bcf258657682e66464bf8512def8af830
fixes it.
--
nosy: +ammar2, serhiy.storchaka
stage: -> needs patch
versions: +Pyt
Ammar Askar added the comment:
I can't speak to the complexity of the choices function but if you're proposing
an alternative implementation for choices, it would be wise to show the
benefits empirically. That is, benchmarks and an explanation of why your
implementation would be b
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, Pyt
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 h
Changes by Ammar Askar :
--
pull_requests: +558
___
Python tracker
<http://bugs.python.org/issue29812>
___
___
Python-bugs-list mailing list
Unsubscribe:
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:
What does `typeperf "\System\Processor Queue Length" -si 1` actually return on
your non-English system?
Does it just return an error with the counter's name or is the umalet just in
the first header line, i.e this one for me:
"(PDH-CSV
Ammar Askar added the comment:
Thank you, could you also share the output if you just give it the English name
of the counter?
--
___
Python tracker
<https://bugs.python.org/issue36
Ammar Askar added the comment:
Looks like floor division for floats call into the divmod function, which has
the same behavior:
>>> 0.9 .__divmod__(0.1)
(8.0, 0.09998)
--
nosy: +ammar2
___
Python tracker
<https://bug
Ammar Askar 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
Annoyingly, I don't think there
Ammar Askar 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
Your data source is encoding the
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
Ammar Askar added the comment:
Actually, echo implicitly puts a newline at the end. If you run with echo -n,
this is the output:
$ echo -n 'print("a");print("b")' | python3 -m tokenize
1,0-1,5:NAME 'print'
1,5-1,
Ammar Askar added the comment:
Relevant bit of the parser that emits a fake newline at the end of the file if
not present:
https://github.com/python/cpython/blob/master/Parser/tokenizer.c#L1059-L1069
--
___
Python tracker
<ht
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +7009
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33766>
___
___
Py
Ammar Askar added the comment:
Sorry, I was already working on the patch by the time you posted the comment.
If we see above, it seems like the tokenize module doesn't correctly mirror the
behavior of the C tokenizer. Do you want to try fixing that as a bug? That
would involve making
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&q
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 k
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 pr
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
&
New submission from Ammar Askar :
As was pointed out in https://bugs.python.org/issue33766 there is an edge case
in the tokenizer whereby it will implicitly treat the end of input as a
newline. The tokenize module in stdlib does not mirror the C code's behavior in
this case.
tokeni
Ammar Askar added the comment:
It's kinda mentioned:
"For IPv4 addresses, two special forms are accepted instead of a host address:
the empty string represents INADDR_ANY"
Though it could be more explicit on what means since binding to all interfaces
is a common use case.
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +7501
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33899>
___
___
Py
Change by Ammar Askar :
--
pull_requests: +7710
___
Python tracker
<https://bugs.python.org/issue33899>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ammar Askar :
--
pull_requests: +7711
___
Python tracker
<https://bugs.python.org/issue33899>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ammar Askar :
--
pull_requests: +7712
___
Python tracker
<https://bugs.python.org/issue33899>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +7813
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33361>
___
___
Py
Ammar Askar added the comment:
Annoyingly, it looks like Windows does not provide an API that gives an average
value. There is a counter exposed called "System \ Processor Queue Length"
which does what the equivalent of unix's load
https://blogs.technet.microsoft.com/askper
Ammar Askar added the comment:
Taking a shot at this, should take a day or so.
--
___
Python tracker
<https://bugs.python.org/issue34060>
___
___
Python-bug
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +7821
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34060>
___
___
Py
Ammar Askar added the comment:
Thanks a lot for that link Jeremy, it was really helpful. After reading up on
it, my take is that winapi is the most appropriate place for this, it is a non
public api that's used in the stdlib.
I've used Windows APIs in a way that we don't n
Ammar Askar added the comment:
Opened up a PR with a proof of concept to get feedback on if this approach is
reasonable.
Giampaolo, on your psutil issue you specifically said, "(possibly without using
WMI)"
Is there any particular problem with
Ammar Askar added the comment:
Aah, yeah I don't think there's a good way of doing it purely from the windows
API. There might be a way to enumerate through all the processes and see if
they're queued up but I didn't look into it.
In this case it should be fine, we j
Ammar Askar added the comment:
Is the function I used for the callback, RegisterWaitForSingleObject
https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-registerwaitforsingleobject
using the thread pooling system you're talking about underneath? The
documentation see
Ammar Askar added the comment:
Roger, personally I don't think its worth it to complicate the code in order to
use the thread pool API. Especially considering this is just a private API and
the only consumer will be the test suite runner. Let's see what the core devs
think when
Ammar Askar added the comment:
I don't think taking instantaneous values instead of averaging will work out
too well. For reference I've attached a screenshot. It has sampled values at
every second on an unloaded computer and then with running prime95 for cpu
stress testing. The
Ammar Askar added the comment:
Hey Lysandros.
Take a look at
https://github.com/python/cpython/blob/master/Lib/wave.py#L126-L139
Notice how there's a Chunk made from the `file` argument but then another Chunk
created using the previous chunk as a file.
While it might seem
Ammar Askar added the comment:
Hey David, thanks for your contribution, I've added some feedback in context of
the code on Github.
--
___
Python tracker
<https://bugs.python.org/is
Ammar Askar added the comment:
> But then again, if it's solely for our tests, perhaps the best way to
> approach this is to start a Python thread that periodically runs this command?
This sounds like a very good solution to me, it avoids adding the complexity of
the C code.
Change by Ammar Askar :
--
pull_requests: +7892
___
Python tracker
<https://bugs.python.org/issue34060>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ammar Askar :
--
pull_requests: +7893
___
Python tracker
<https://bugs.python.org/issue5115>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ammar Askar added the comment:
> But then again, if it's solely for our tests, perhaps the best way to
> approach this is to start a Python thread that periodically runs this command?
I opened up https://github.com/python/cpython/pull/8357 with this strategy, in
my opinion its
Ammar Askar added the comment:
This should be done as part of the doc changes for the full PEP 572
implementation, no point in independently doing it now when it hasn't even been
implemented yet.
--
nosy: +ammar2
resolution: -> postponed
stage: -> resolved
status: ope
Change by Ammar Askar :
--
pull_requests: +8016
___
Python tracker
<https://bugs.python.org/issue29097>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ammar Askar :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ammar Askar added the comment:
For what its worth, window's reg command also makes a distinction between the
registry key and value:
C:\Users\ammar>reg.exe QUERY HKLM\Software\Microsoft\.NETFramework\Enable64Bit
ERROR: The system was unable to find the specified registry key or v
Ammar Askar added the comment:
Hmm, are you sure its not indexed? Look at this search result:
https://docs.python.org/3/search.html?q=__slots__
The glossary page shows up in the results for me.
Or are you suggesting that if you search for a term defined in the glossary, it
be prominently
Ammar Askar added the comment:
Note that even just adding an extra arithmetic in your first expression breaks
the line numbers:
>>> code = """(
... [
Change by Ammar Askar :
--
title: Compiler could output more accurate line numbers -> Parenthesized
expression has incorrect line numbers
___
Python tracker
<https://bugs.python.org/issu
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +8248
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34398>
___
___
Py
Ammar Askar added the comment:
I think showing glossary results up top in the search page is a good idea, so I
wrote up a quick proof of concept sphinx extension to do so. The diff isn't
very big or complicated but it does need a bit of cleanup, especially the
javascript and present
Ammar Askar added the comment:
For some empirical data, I went through some popular packages that follow this
pattern and searched for usage of their base exception classes:
Requests: https://github.com/search?q=except+requests.RequestException&type=Code
PyYaml: https://github.com/sear
Ammar Askar added the comment:
Do you have examples of where this occurs?
>From
>https://github.com/python/cpython/search?p=1&q=master+slave&unscoped_q=master+slave
> I really only found the openpty function, and the man pages/argument names
>there already use th
Ammar Askar added the comment:
The libregrtest change looks good but I disagree on the pty/openpty changes. If
you look at all the current Linux man pages and documentation, they follow the
master/slave terminology. Generally, Python documentation for underlying os
functions like fork, stat
Ammar Askar added the comment:
Most of the opposition seems to be against a blanket replacing of all master
and slave usages, which seems fairly reasonable to me.
For example, I'm all for the libregrtest change since it conveys the meaning
just as well and is an internal tool. Ho
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +8761
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34683>
___
___
Py
Ammar Askar added the comment:
Added a PR that is an implementation of Benjamin's suggestion. The column
offset returned has been made 0-indexed and errors now point to the start of
the parsed token.
This makes errors like `def class` show up as
def class
^
instead of
def
Ammar Askar added the comment:
This is intentional, the parsed in JSON doesn't necessarily have to have an
object at the root. This is also what allows you to do:
>>> json.loads("[]")
[]
This behavior is also consistent with browsers, try this in your browser'
Ammar Askar added the comment:
Hey heiahh,
This bug tracker is for issues pertaining to the python interpreter itself.
You'd be better off asking your question on the matplotlib bug tracker or stack
overflow:
https://github.com/matplotlib/matplotlib/issues
https://stackoverflo
Ammar Askar added the comment:
There's some context on the github PR but essentially it boiled down to:
- It would make it inconsistent with line offsets which are 1-indexed.
- Breaking change to a public C API (PyErr_SyntaxLocationObject)
- IDLE and other tools that catch syntax errors
Ammar Askar added the comment:
What is the use case for getting the maximum and minimum of the fixed bit
integers like `uint8`? It's a trivial formula to calculate those.
Now, if you're talking about platform dependent types like `int` and `long`
then it might makes more sense t
Ammar Askar added the comment:
Hey Anel, this bug tracker is for issues with the Python language itself, not
its libraries or usage.
Try the flask-cors issue tracker or stackoverflow for more help-oriented
questions:
https://github.com/corydolphin/flask-cors
https://stackoverflow.com
Ammar Askar added the comment:
Please read this excerpt from the documentation Ronald linked for open:
newline controls how universal newlines mode works (it only applies to text
mode). It can be None, '', '\n', '\r', and '\r\n'. It works as follows:
Change by Ammar Askar :
--
keywords: +patch
pull_requests: +9052
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34838>
___
___
Py
Ammar Askar added the comment:
I've attached a PR that implements this. From the looks of it, there aren't a
lot of uses of subclass_of within argument clinic converted functions at the
moment. Additionally, most of the places it is used tend to have some non
object arguments so
Ammar Askar added the comment:
Maybe something more akin to UndefinedBehaviorSanitizer? Since its supposed to
be catching implementation specific quirks. It wouldn't really be sanitizing
though, more just making the bugs more likely to appear.
--
nosy: +a
Ammar Askar added the comment:
Serhiy, take a look at the linked ticket. The idea is that something like
pytest or libregrtest will use this to bring underlying bugs to the surface. It
isn't intended to be used in normal execution.
--
___
P
Ammar Askar added the comment:
Aah sorry, I misinterpreted what you meant. The original ticket proposes it as
a compile time flag as well.
--
___
Python tracker
<https://bugs.python.org/issue34
Ammar Askar added the comment:
It should be noted that the HTML spec also says:
The term "JavaScript" is used to refer to ECMA-262, rather than the official
term ECMAScript, since the term JavaScript is more widely known. Similarly, the
MIME type used to refer to JavaScri
Ammar Askar added the comment:
It looks like this is caused by
https://github.com/python/cpython/commit/da8d72c953369b872a12c13f136ada77a786714a
Adding Serhiy to the nosy list.
--
nosy: +ammar2, serhiy.storchaka
___
Python tracker
<ht
Ammar Askar added the comment:
Aah, I didn't know that ticket existed. Thanks for the link Serhiy, I'll review
your PR instead. Leaving it up to Raymond if he wants to close the issue and
use the other one to track this.
--
___
Pyth
Change by Ammar Askar :
--
nosy: +ammar2
___
Python tracker
<https://bugs.python.org/issue23867>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ammar Askar added the comment:
Modifying containers while iterating over them is generally not safe. In this
case the iterator at the point you start the loop will contain all the items to
iterate over, adding them mid-loop will not cause them to be iterated over.
Take a look at the last
Ammar Askar added the comment:
Think about what it means to iterate over a hashmap. Let's say your pop()
causes the dictionary to become smaller than the resizing threshold and now the
indexes need to be rebuilt, how would this be handled gently by the iterator?
This situation is not
Ammar Askar added the comment:
Echoing what Eric and Steven said: please create a more minimal example of what
you think the problem is.
I'm closing this ticket now since it seems like you found the issue? Feel free
to re-open if you can come up with a better example or describe the pr
Ammar Askar added the comment:
The documentation also goes on to say that its default value is '/'. It is
optional in the sense that the function can be called without providing it.
It doesn't mean that `None` is somehow a valid type for it. Consider the open
function for
Ammar Askar added the comment:
I would say so since the documentation says: safe parameter specifies
additional ASCII characters
None isn't really a set of ASCII characters but the empty string and empty list
are.
--
___
Python tracker
&
Ammar Askar added the comment:
Does rewording that prior part to "safe parameter specifies an iterable of
additional ASCII characters" make it less confusing?
--
___
Python tracker
<https://bugs.python.o
Ammar Askar added the comment:
I agree that
urllib.parse.quote("/", safe=['/'])
should probably work. It looks like the reason it doesn't is because quote
tries to normalize the safe iterable to ASCII characters only. As part of this
it attempts to run `< 128`
Ammar Askar added the comment:
Looks like this is caused by this line here:
https://github.com/python/cpython/blob/b83d917fafd87e4130f9c7d5209ad2debc7219cd/Lib/tokenize.py#L551-L558
which adds a newline token implicitly after comments. Since the input didn't
terminate with a '\n&
Ammar Askar added the comment:
fwiw I think there's more at play here than the newline change. This is the
behavior I get on 3.6.5 (before the newline change is applied). # works as
expected but check out this input:
>>> t.untokenize(tokenize.generate_tokens(io.StringIO
Ammar Askar added the comment:
Actually nevermind, disregard that, I was just testing it wrong. I think the
simplest fix here is to add '#' to the list of characters here so we don't
double insert newlines for comments:
https://github.com/pyth
301 - 400 of 461 matches
Mail list logo