[issue30699] Misleading class names in datetime.tzinfo usage examples

2017-11-05 Thread Mario Corchero
Change by Mario Corchero : -- nosy: +mariocj89 ___ Python tracker <https://bugs.python.org/issue30699> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32010] Multiple get "itemgetter"

2017-11-12 Thread Mario Corchero
New submission from Mario Corchero : At the moment we can get an operator that performs multiple "gets" in object attributes. Example: >>> getter = operator.attrgetter("child1.child2") >>> o = mock.Mock() >>> getter(o) On the other hand, itemg

[issue32206] Run modules with pdb

2017-12-03 Thread Mario Corchero
New submission from Mario Corchero : Since PEP 338 we can run python modules as a script via `python -m module_name` but there is no way to run pdb on those (AFAIK). The proposal is to add a new argument "-m" to the pdb module to allow users to run `python -m pdb -m my_module_name

[issue32206] Run modules with pdb

2017-12-07 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +4654 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32206> ___ ___ Py

[issue32267] strptime misparses offsets with microsecond format

2017-12-10 Thread Mario Corchero
New submission from Mario Corchero : At the moment strptime misparses all microsecond specifications that do not have exactly 6 digits as it is just converted into an int and considered microsecond. This bug was introduced with the implementation in bpo-31800 Example: _strptime._strptime

[issue32267] strptime misparses offsets with microsecond format

2017-12-10 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +4682 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32267> ___ ___ Py

[issue32206] Run modules with pdb

2018-01-06 Thread Mario Corchero
Change by Mario Corchero : -- pull_requests: +4978 ___ Python tracker <https://bugs.python.org/issue32206> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-06 Thread Mario Corchero
Mario Corchero added the comment: pdb and cProfile are covered. If no one is working on it, do you want me try to put through a patch for "profile" and "trace"? Should I create a separate issue if so? >From Issue 17473 it will leave only: doctest: Which might be con

[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero
New submission from Mario Corchero : Add an option to profile to be able to do `python3 -m profile -m my.module.name` to be able to profile the module the same way cProfile allows since issue 21862 -- components: Library (Lib) messages: 309627 nosy: mariocj89 priority: normal severity

[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +4993 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32512> ___ ___ Py

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Mario Corchero
Mario Corchero added the comment: I've created an issue + PR for profile which basically ports the change in cProfile: issue32512 I am not able to add it as a dependency on this one (rights issue probably). -- ___ Python tracker &

[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero
Mario Corchero added the comment: Related issue for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325 -- ___ Python tracker <https://bugs.python.org/issue32

[issue32515] Add an option to trace to run module as a script

2018-01-07 Thread Mario Corchero
New submission from Mario Corchero : Add an option to trace to be able to do `python3 -m trace -t --module my.module.name` to be able to trace a runnable module the same way we can do with scripts. As we want trace to not include the lines in runpy I am going to with the approach of pdb

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Mario Corchero
Mario Corchero added the comment: Just finished a draft on the one for trace: issue32515 -- ___ Python tracker <https://bugs.python.org/issue9325> ___ ___ Pytho

[issue32515] Add an option to trace to run module as a script

2018-01-07 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +4995 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32515> ___ ___ Py

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-10 Thread Mario Corchero
Mario Corchero added the comment: Thanks Nick. I've sent patches for all of them but `dis`. `dis` does not "run" the code. Adding the -m option is basically identical to just running it on the __main__.py if the module is runnable or on the __init__ if it is not. If you think

[issue33541] Remove private and apparently unused __pad function

2018-05-16 Thread Mario Corchero
New submission from Mario Corchero : When checking on ways to improve coverage of datetime related functions I found this function that seems not to be used anyware. It is private and mangled, should be safe to remove. Creating the issue as requested in the PR: https://github.com/python

[issue33541] Remove private and apparently unused __pad function

2018-05-16 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +6579 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33541> ___ ___ Py

[issue35082] Mock.__dir__ lists deleted attributes

2018-10-27 Thread Mario Corchero
New submission from Mario Corchero : Calling dir on unittest.mock.Mock will return deleted attributes. This is a result of the way del is implemented in Mock, which just sets a sentinel in the child mocks, so an AttributeError is raised if the attribute is later accessed. We can just check

[issue35082] Mock.__dir__ lists deleted attributes

2018-10-27 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +9476 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35082> ___ ___ Py

[issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__()

2018-10-27 Thread Mario Corchero
Mario Corchero added the comment: iter is initialized by using side_effects, not return_value. The statement "According to the documentation .return_value should be identical to the object returned when calling the mock" works only when it return_value has been used to define the

[issue32512] Add an option to profile to run library module as a script

2018-11-05 Thread Mario Corchero
Change by Mario Corchero : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Mario Corchero
Mario Corchero added the comment: If this is to be done we should not change those tests, I am sure there is code validating calls relying on its "tupleness". Example: ``` >>> import unittest.mock >>> m = unittest.mock.Mock() >>> m(1) >>>

[issue7440] distutils shows incorrect Python version in MSI installers

2009-12-04 Thread Mario Vilas
New submission from Mario Vilas : I just hit this silly bug in distutils, should be quite easy to fix. When building MSI installers for a target_version other than the current Python version, the target directory selection dialog shows a wrong message. For example, here is a screen capture of

[issue7440] distutils shows incorrect Python version in MSI installers

2009-12-04 Thread Mario Vilas
Mario Vilas added the comment: My proposed patch is to change line 506 of bdist_msi.py from this: version = sys.version[:3]+" " to this: version = self.target_version[:3]+" " which is what I did to wor

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-19 Thread Pernici Mario
Pernici Mario added the comment: The attached patch uses mul1 in long_mul in the version patched with 30bit_longdigit13+optimizations.patch Comparison between these two patches on hp pavilion Q8200 2.33GHz pybench patch new patch SimpleIntegerArithmetic 89 85 other

[issue3944] faster long multiplication

2009-03-22 Thread Pernici Mario
Pernici Mario added the comment: This patch comes from 30bit_longdigit13+optimizations1.patch in issue4258 with modification for the case of multiplication by 0; it passes test_long.py and pidigits is a bit faster. -- Added file: http://bugs.python.org/file13394/longobject_diff1

[issue3451] Asymptotically faster divmod and str(long)

2009-03-30 Thread Pernici Mario
Pernici Mario added the comment: In this patch there is an implementation of the algorithm to convert numbers in strings by recursively splitting the number in half, adapted from Fredrik's div.py -- Added file: http://bugs.python.org/file13496/longformat

[issue3451] Asymptotically faster divmod and str(long)

2009-03-30 Thread Pernici Mario
Pernici Mario added the comment: In this second patch to the above patch it is added the recursive division algorithm by Burnikel and Ziegler (BZ) from longobject2.diff, unmodified, to see the effect of the subquadratic algorithm; there is still a lot of work to be done on it, as Mark pointed

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
New submission from Mario Grgic: I am on Mac OS X 10.11.6 trying to build and install Python 3.5.2 from source. I only have system Python 2.7.10 , and no other instances of Python 3.x. I configure the build as follows: ./configure --prefix=/Volumes/ramdisk/python3.5.2 The code is built

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
Mario Grgic added the comment: It looks like it is picking up libcrypto.1.0.0.dylib from /usr/local/lib which I installed there as dependency for other binaries. Is there a minimal version of libcrypto that Python 3.5.2 needs? -- ___ Python

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
Mario Grgic added the comment: OK, after installing OpenSSL in /usr/local/ssl and even after copying libssl.pc, libcrypt.pc and openssl.pc over to /usr/local/lib/pkgconfig (which is where my pkg-config is looking or *.pc files) the configure script is still not finding the correct libcrypto

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-22 Thread Mario Colombo
Mario Colombo added the comment: Yes, this (or something similar) totally bit me, when for another unrelated reason 'AUTH PLAIN' authentication failed: https://gist.github.com/macolo/bf2811c14d985d013dda0741bfd339e0 Python then tries auth_login, but doesn't send 'AUT

[issue18005] faster modular exponentiation in some cases

2013-05-18 Thread Pernici Mario
New submission from Pernici Mario: A trivial optimization can be made in ``pow(a, b, c)`` if ``b`` is even and ``c - a < a`` ``` In [1]: c = (1 << 100) + 1 In [2]: a = c - 1234567 In [3]: b = 2 In [4]: %timeit pow(a, b, c) 1 loops, best of 3: 3.03 s per loop In [5]: %timeit

[issue25542] tuple unpacking on assignment should be lazy for unpacked generators

2015-11-03 Thread Mario Wenzel
New submission from Mario Wenzel: if I have an assignment a = then a is the generator. But if I do any kind of unpacking *a, = # a list of all items a, *aa = # first item in a, list of rest in as If the right-hand side is a generator expression, I would expect that a, *aa unpacks the

[issue25542] tuple unpacking on assignment should be lazy for unpacked generators

2015-11-03 Thread Mario Wenzel
Mario Wenzel added the comment: You are right. I didn't even know head, *middle, end = worked. Thanks -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.

[issue2889] curses for windows (alternative patch)

2015-03-11 Thread Mario Figueiredo
Mario Figueiredo added the comment: This patch is a huge improvement over the current situation, which is we don't have a cross-platform curses implementation in the standard library. The alternatives listed by Mark aren't sufficient. For the two reasons given below: - The impleme

[issue39963] Subclassing slice objects

2020-03-13 Thread Mario de OOurtzborun
New submission from Mario de OOurtzborun : Is there any reason why slice objects aren't subclassable? I want a mutable slice object, but there is no way to create one that will work with lists or tuples. And __index__ method requires to return int. I want to prepare a git merge request

<    1   2