[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-24 Thread Ammar Askar
Ammar Askar added the comment: See also: https://bugs.python.org/issue37645 which discusses changing the string representation of functions to omit the address. -- nosy: +ammar2 ___ Python tracker <https://bugs.python.org/issue39

[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +17542 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18156 ___ Python tracker <https://bugs.python.org/issu

[issue39437] collections.Counter support multiplication

2020-01-23 Thread Ammar Askar
Ammar Askar added the comment: Duplicate of https://bugs.python.org/issue25478 See Raymond's open PR here: https://github.com/python/cpython/pull/6574 -- nosy: +ammar2 resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Consider adding

[issue39407] Bitfield Union does not work for bit widths greater than 8 bits

2020-01-22 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue39407> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39361] [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9

2020-01-22 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +17512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18125 ___ Python tracker <https://bugs.python.org/issu

[issue39417] Link to "Python Packaging User Guide: Creating and using virtual environments" is broken

2020-01-22 Thread Ammar Askar
Ammar Askar added the comment: Oh and I think the new link should point here: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment -- ___ Python tracker <https://bugs.python.

[issue39417] Link to "Python Packaging User Guide: Creating and using virtual environments" is broken

2020-01-22 Thread Ammar Askar
Ammar Askar added the comment: Hi Angel, thank you for the report! The file that corresponds to that documentation is here https://github.com/python/cpython/blob/master/Doc/library/venv.rst and we'd be happy to have you make a PR for it :) -- nosy: +ammar2

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Ammar Askar
Ammar Askar added the comment: Do you mean to say we should or shouldn't be raising an error? With Inada-san's change you get this: >>> json.loads("true", encoding='utf8') Traceback (most recent call last): File "", line 1, in File "C:\Users\ammar\work

[issue39367] readline module core dumps Python 3.8.1 when calling exit()

2020-01-17 Thread Ammar Askar
Ammar Askar added the comment: > Installed the readline module as the arrows do not work when running Python > interactively. This is not a suggested way to fix the issue, especially given that the module you installed is marked as deprecated: https://pypi.org/project/readline/ &

[issue38980] Compile libpython with -fno-semantic-interposition

2019-12-05 Thread Ammar Askar
Ammar Askar added the comment: Just for a quick datapoint: llvm/clang do this by default and you need an explicit `-fsemantic-interposition` to disable it http://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html It seems to me that the performance gains here really outweigh any

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-22 Thread Ammar Askar
Ammar Askar added the comment: Just for reference/existing behavior: >>> class A(collections.abc.Iterable): pass ... >>> class B: ... def __iter__(): pass ... >>> issubclass(B, A) False >>> issubclass(B, collections.abc.Iterable) True >>>

[issue34850] Emit a syntax warning for "is" with a literal

2019-11-17 Thread Ammar Askar
Ammar Askar added the comment: That would potentially let an invalid usage slip through, since you know what you're doing, you can suppress the warning with: warnings.filterwarnings('ignore', category=SyntaxWarning, message='"is" with a literal') -- nos

[issue38801] Scientific notation doesn't work with itertools.islice

2019-11-14 Thread Ammar Askar
Ammar Askar added the comment: The behavior is documented here: https://docs.python.org/3.9/library/stdtypes.html#numeric-types-int-float-complex > Numeric literals containing a decimal point or an exponent sign yield > floating point numbers. -- nosy: +

[issue38769] generators are currently hashable

2019-11-11 Thread Ammar Askar
Ammar Askar added the comment: An easier way to understand might be to just write out the generator expression "manually": def generator_expression(): for k, v in sorted(self.__dict__.items()): yield k return hash(my_generator_expression()) Wou

[issue38769] generators are currently hashable

2019-11-11 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue38769> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16575] ctypes: unions as arguments

2019-11-06 Thread Ammar Askar
Change by Ammar Askar : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue16575> ___ ___ Pyth

[issue38724] Implement subprocess.Popen.__repr__

2019-11-06 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue38724> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16575] ctypes: unions as arguments

2019-11-06 Thread Ammar Askar
Ammar Askar added the comment: Will close after https://buildbot.python.org/all/#/builders?tags=%2Brefleak=%2B3.7 go back to green. -- ___ Python tracker <https://bugs.python.org/issue16

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Ammar Askar
Ammar Askar added the comment: I don't think the word "true" is really the issue here. It's the fact that "is" in this context is ambiguous, is it referring to the English "is" or the python operator `is`? --

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: I like Steven's "truthy value" or "true value" proposal. Another alternative: "x does not evaluate to true" "x does not evaluate to false" -- nosy: +ammar2 ___ Python trac

[issue38696] HTTP modules documentation error

2019-11-05 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +16575 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17066 ___ Python tracker <https://bugs.python.org/issu

[issue16575] ctypes: unions as arguments

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: Opened https://github.com/python/cpython/pull/17064 to fix this. Essentially it's a tiny little oversight in the back-porting. In the 3.7 branch, we perform an attribute lookup for `from_param` before the union checking code, so we must remember to DECREF

[issue16575] ctypes: unions as arguments

2019-11-05 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +16572 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17064 ___ Python tracker <https://bugs.python.org/issu

[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: Just for some more reference points from "production" python web servers: * gunicorn - 2048 (https://github.com/benoitc/gunicorn/blob/678b326dc030b450717ec505df69863dcd6fb716/docs/source/settings.rst#backlog) * tornado - 128 (https://github.com/

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-04 Thread Ammar Askar
Ammar Askar added the comment: Aah actually I was looking at an older version of the docs, the documentation now says, "if the address is allocated for private networks" which is actually misleading. The addresses here aren't all private networks: https://github.com/python/cp

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-04 Thread Ammar Askar
Ammar Askar added the comment: The documentation for is_private notes: Returns: A boolean, True if the address is reserved per RFC 4193. iana-ipv4-special-registry or iana-ipv6-special-registry. If we take a look at the iana-ipv4-special-registry then 0.0.0.0/8 does show up

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2019-11-01 Thread Ammar Askar
Ammar Askar added the comment: The notion of equivalent regular expressions does exist but is way more complicated than the simple example you described. For example: r"a|b" is the same as r"[ab]", r"^aa*$" is the same as r"^a+$" Implement

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: Closing, here's the bug in dateutil's repo: https://github.com/dateutil/dateutil/issues/197 -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: Err...I mean I think this is a dateutil bug rather than in the Python stdlib. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: It is windows specific, but I don't think this is a dateutil bug rather than the python stdlib: 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" or

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: This is what I get on master, will try 3.7.5+ as noted in the Github issue: Python 3.9.0a0 (heads/noopt-dirty:f3b170812d, Oct 1 2019, 20:15:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or

[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-25 Thread Ammar Askar
Ammar Askar added the comment: Thank you for the report Matt! -- nosy: +ammar2 resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker <https://bugs.python.or

[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-24 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +16451 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16919 ___ Python tracker <https://bugs.python.org/issu

[issue20443] __code__. co_filename should always be an absolute path

2019-10-21 Thread Ammar Askar
Ammar Askar added the comment: I did a quick search to see what code would break from sys.argv[0] going relative intext:"sys.argv[0]" ext:py site:github.com https://www.google.com/search?q=intext:"sys.argv%5B0%5D"+ext:py+site:github.com and while most uses of i

[issue17894] Edits to descriptor howto

2019-10-09 Thread Ammar Askar
Ammar Askar added the comment: Any updates on this? Some of the re-organization and simplifications here look pretty good overall and make the guide way more approachable. Seeing as how this has been sitting a while and Github has an option allow maintainers to make edits to PRs. Raymond

[issue38357] print adding extra bytes in hex above x7F

2019-10-02 Thread Ammar Askar
Ammar Askar added the comment: If you're trying to get raw bytes, you need to use print(b'\x80') what's happening right now is that the '\x80' is treated as a unicode code point (see https://docs.python.org/3/howto/unicode.html#the-string-type), and when Python goes to print

[issue38327] Creating set with empty string returns empty set

2019-09-30 Thread Ammar Askar
Ammar Askar added the comment: I think the key thing you're missing here is that the set() constructor can take any arbitrary iterable (https://docs.python.org/3/library/functions.html#func-set). It simply goes over all the elements inside and adds them all to the set. This is no different

[issue38318] Issues linking with ncurses and tinfo (cannot resolve symbols)

2019-09-29 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +skrah, twouters ___ Python tracker <https://bugs.python.org/issue38318> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-09-29 Thread Ammar Askar
Ammar Askar added the comment: Yeah, that parenthesized bit seems a bit weird: co_stacksize really has nothing to do with the number of variables, it's just that certain opcodes (https://docs.python.org/3/library/dis.html#python-bytecode-instructions) push and pop off the stack

[issue38302] __rpow__ not reached when __ipow__ returns NotImplemented

2019-09-29 Thread Ammar Askar
Ammar Askar added the comment: This isn't the ternary form of pow(), the documentation there is referring to the `pow(base, exp, modulus)`. -- nosy: +ammar2 ___ Python tracker <https://bugs.python.org/issue38

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-09-28 Thread Ammar Askar
Ammar Askar added the comment: > I'd like to help with this, but I don't even know where to start with > argumentclinic -- any points would be greatly appreciated Are you asking about argumentclinic in general or something specific to this bug? If it's something specific feel free to

[issue38300] Documentation says destuction of TemporaryDirectory object will also delete it, but it does not.

2019-09-27 Thread Ammar Askar
Ammar Askar added the comment: Hmm, I can't recreate this locally: >>> import tempfile >>> import os >>> t = tempfile.TemporaryDirectory() >>> temp_dir = t.name >>> os.path.exists(temp_dir) True >>> del t >>> os.pa

[issue38206] Clarify that tp_dealloc must decref for heap allocated type

2019-09-27 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch)

2019-09-21 Thread Ammar Askar
Ammar Askar added the comment: For whitespace, the correct way to achieve this using split() with no argument: >>> print(list("Hello World How Are You?".split())) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?&q

[issue38245] Why am I getting inconsistent results in this simple List assignment?

2019-09-21 Thread Ammar Askar
Ammar Askar added the comment: Check out this part of the FAQ: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list Essentially, when you did `C = 2*[[]]`, what happens is that the SAME empty list is placed into C[0] and C[1]. Whereas when you do `M

[issue38231] Documentation search results focus on tutorials and not language specifications

2019-09-20 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Docs search should prominently show definitions and glossary items ___ Python tracker <https://bugs.python

[issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Hey Vitaly, not sure if you're the author of the original bug here: https://bugs.python.org/issue27071 Could you re-open that so the discussion is kept in one place. -- nosy: +ammar2 ___ Python tracker <ht

[issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared

2019-09-20 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> duplicate stage: -> resolved superseder: -> unittest.TestCase.assertCountEqual is a very misleading name type: -> behavior ___ Python tracker <https://bugs.python

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: math.pow changes removed from PR -- ___ Python tracker <https://bugs.python.org/issue38237> ___ ___ Python-bugs-list mailin

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Before == >python -m pyperf timeit "pow(2, 3)" --duplicate 10 Mean +- std dev: 242 ns +- 19 ns > python -m pyperf timeit "pow(2.0, 3.0)" --duplicate 10 Mean +- std dev: 197 ns +- 16 ns After = > python -m pyperf t

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Here's a little microbenchmark, let me know if there's anything specific you'd like to see: Before == > python -m pyperf timeit "from test.test_builtin import BuiltinTest; tst = > BuiltinTest()" -- "tst.test_pow()" Mean +- s

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: I've made a PR, feel free to close it if you'd rather implement this yourself or this proposal won't be accepted :) -- ___ Python tracker <https://bugs.python.org/issue38

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +15887 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16302 ___ Python tracker <https://bugs.python.org/issu

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Actually quick question, should a similar change be made for `math.pow` for consistency's sake? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Looks like a solid proposal, I especially like the clarity for the 3-argument call. Often beginners ask about why there's a third argument in pow especially when teaching RSA and number-theoretic stuff. Do you mind if I take this on Raymond? -- nosy

[issue38231] Documentation search results focus on tutorials and not language specifications

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: > Somewhat related, I am responding to this through the bugs.python.org > interface. If I reply directly to the email the tracker sent me, will my > reply be properly routed to this thread? Yes, it will :) The bug tracker allows replies

[issue34398] Docs search should prominently show definitions and glossary items

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Changing the title a little to represent that this is now a general improvement of the docs search. Julien is working to upstream a solution into Sphinx that will allow any items to be featured prominently on search. -- title: Docs search does

[issue38231] Documentation search results focus on tutorials and not language specifications

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: This is a great point Matt, the documentation search is a bit lacking and we're kind of using https://bugs.python.org/issue34398 and https://github.com/python/cpython/pull/8773 to track it. The current idea that Julien, the docs expert, had is to add some sort

[issue38233] datetime.datetime.fromtimestamp have different behaviour on windows and mac

2019-09-20 Thread Ammar Askar
Ammar Askar added the comment: Thanks for the report Alexandre, this has to do with issues with negative numbers in Window's time APIs. There's already a bug open for this, so I've marked it as a duplicate. -- nosy: +ammar2 resolution: -> duplicate stage: -> resolved status

[issue38216] Fix for issue30458 prevents crafting invalid requests

2019-09-19 Thread Ammar Askar
Ammar Askar added the comment: > What bothers me here is that we apparently changed de facto behavior between > maintenance releases, in the middle of 3.7's lifecycle, without warning, no > doubt because we didn't realize it would break third-party packages. Arguably, I think the

[issue38205] Python no longer compiles without small integer singletons

2019-09-18 Thread Ammar Askar
Ammar Askar added the comment: For the control path warning, that can be fixed by just hinting to the compiler that the function doesn't return like so: # ifdef __GNUC__ __attribute__ ((noreturn)) # elif defined(_MSC_VER) __declspec(noreturn) # endif static inline void

[issue38204] Cannot compile on RPi with optimizations

2019-09-18 Thread Ammar Askar
Ammar Askar added the comment: Hmm, I think this might be the following gcc/binutils bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847 https://sourceware.org/bugzilla/show_bug.cgi?id=20882 This might be a bit of a pain but could you try updating binutils and see if the problem

[issue38206] Clarify that tp_dealloc must decref for heap allocated type

2019-09-17 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +15844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16248 ___ Python tracker <https://bugs.python.org/issu

[issue38206] Clarify that tp_dealloc must decref for heap allocated type

2019-09-17 Thread Ammar Askar
New submission from Ammar Askar : When dealing with a heap allocated type (https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HEAPTYPE / PyType_FromSpec), if the type has a custom tp_dealloc function then it MUST decrement the references to the type object itself due to this code block

[issue38204] Cannot compile on RPi with optimizations

2019-09-17 Thread Ammar Askar
Ammar Askar added the comment: Could you provide the output of gcc --version and ld --version -- nosy: +ammar2 ___ Python tracker <https://bugs.python.org/issue38

[issue38189] pip does not run in virtual environment in 3.8

2019-09-16 Thread Ammar Askar
Ammar Askar added the comment: As the error says: > Can't connect to HTTPS URL because the SSL module is not available. Since you built it from source, you should check your build logs, the _ssl module likely failed to build. You're most probably missing the openssl depende

[issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle

2019-09-16 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +eryksun ___ Python tracker <https://bugs.python.org/issue38188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38152] AST change introduced tons of reference leaks

2019-09-14 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38125] Can' build document in Sphinx v2.2.0

2019-09-11 Thread Ammar Askar
Ammar Askar added the comment: When did you try this? For reference, Doc/conf.py on master currently has `master_doc = 'contents'` and I performed a successful build with Sphinx 2.2.0 a few days ago. -- nosy: +ammar2 ___ Python tracker <ht

[issue38057] Docs: source code don't can be translate

2019-09-08 Thread Ammar Askar
Ammar Askar added the comment: What version of Sphinx are you using? As far as I know, Sphinx supports internationalization for autodoc, so this should be possible. -- nosy: +ammar2 ___ Python tracker <https://bugs.python.org/issue38

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2019-08-29 Thread Ammar Askar
Ammar Askar added the comment: Thanks for the insight Terry. I think the functions that accept ints as bools are kind of a red herring: Booleans were only formally introduced in Python 2.3 [1], thus any functions that existed before that accepted ints and continued to accept ints

[issue37862] Search doesn't find built-in functions

2019-08-21 Thread Ammar Askar
Ammar Askar added the comment: See also https://bugs.python.org/issue34398 There is some related work done by Julien there as well: https://github.com/JulienPalard/pydocsearch -- nosy: +ammar2 ___ Python tracker <https://bugs.python.

[issue37647] Wrong lineno in traceback when formatting strings with % and multilines

2019-07-22 Thread Ammar Askar
Ammar Askar added the comment: Please try this on the latest version of Python, there was a behavior change implemented in issue12458 that might make this a non-issue. -- nosy: +ammar2, serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Ammar Askar
Ammar Askar added the comment: This particular error used to be covered here: https://github.com/python/cpython/blob/master/Doc/tools/susp-ignored.csv but looks like a line number change has broken it. -- nosy: +ammar2 ___ Python tracker <ht

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2019-06-19 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +14085 pull_request: https://github.com/python/cpython/pull/14255 ___ Python tracker <https://bugs.python.org/issue29

[issue37326] Windows LICENSE.txt do not contain libffi license

2019-06-17 Thread Ammar Askar
Ammar Askar added the comment: Oh whoops, I was looking at my py2 folder. Let's reopen in that case. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware resolution: not a bug -> stage: resolved -> status: closed -> open title: Python distrib

[issue37326] Python distributions do not contain libffi license

2019-06-17 Thread Ammar Askar
Ammar Askar added the comment: LICENSE.txt only contains Python's licensing information. You can find all the external licenses in https://docs.python.org/3/license.html?highlight=libffi#libffi On Windows, this is also distributed as part of Doc/pythonXXX.chm If you don't think

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2019-06-11 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +13854 pull_request: https://github.com/python/cpython/pull/13991 ___ Python tracker <https://bugs.python.org/issue29

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2019-06-07 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +13780 pull_request: https://github.com/python/cpython/pull/13907 ___ Python tracker <https://bugs.python.org/issue29

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Ammar Askar
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

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Ammar Askar
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 4.0)

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread Ammar Askar
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 better than

[issue35928] socket makefile read-write discards received data

2019-02-10 Thread Ammar Askar
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

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-10 Thread Ammar Askar
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

[issue35796] time.localtime returns error for negative values

2019-02-10 Thread Ammar Askar
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

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-10 Thread Ammar Askar
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

[issue34838] Improve arg clinic code generation for cases with type checking

2019-01-11 Thread Ammar Askar
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/issue34

[issue34838] Improve arg clinic code generation for cases with type checking

2019-01-11 Thread Ammar Askar
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/issue34

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-02 Thread Ammar Askar
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

[issue35562] Issue in sizeof() function

2018-12-22 Thread Ammar Askar
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

[issue35562] Issue in sizeof() function

2018-12-22 Thread Ammar Askar
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

[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Ammar Askar
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: https://

[issue35439] New class instance not initializing variables of type list

2018-12-07 Thread Ammar Askar
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

[issue35237] Allow Path instances in sys.path ?

2018-11-13 Thread Ammar Askar
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 ___ Py

[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar
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/python/cpython/blob

[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar
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('#')

[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar
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', the code

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
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` on each el

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
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

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
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 <ht

<    1   2   3   4   5   >