[issue37925] --embed not included in python3.8-config usage/--help

2019-08-22 Thread Miro Hrončok
New submission from Miro Hrončok : Based on changes in https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build I think that the usage string of python3.8-config should also contain --embed. Actual output: $ python3.8-config Usage:

[issue37924] Embedding Python in Another Application: Compiling under Unix misses the --embed flag

2019-08-22 Thread Miro Hrončok
New submission from Miro Hrončok : Based on changes in https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build I belive we should document the python3.8-config --embed flag in

[issue37923] Combining typing.get_type_hints and inspect.signature

2019-08-22 Thread dmontague
New submission from dmontague : I am trying to obtain the output of `inspect.signature`, except with string-valued annotations converted to resolved type hints, similarly to `typing.get_type_hints`. Is there a good way to do this currently? If not, might this be a good fit for the standard

[issue29330] __slots__ needs documentation

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25898] Check for subsequence inside a sequence

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If I were trying to channel Raymond I'd suggest posting the > python as a recipe and see if there is uptake. However, I > could be wrong and he might be interested. (I can't say > that I've ever needed this check myself.) Yes, exactly :-)

[issue14112] tutorial intro talks of "shallow copy" concept without explanation

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15113 pull_request: https://github.com/python/cpython/pull/15408 ___ Python tracker ___

[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +15112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15407 ___ Python tracker

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > Is there a way to workaround that? For Windows, subprocess could have a _read_all(file) method that special cases a pipe. The read loop for a pipe would check whether the child has exited. Then call _winapi.PeekNamedPipe on the handle (from get_osfhandle), and

[issue37884] Optimize Fraction() and statistics.mean()

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Mark] > I'm with Raymond here; I don't think this change is > desirable for the math module, either with or without > the leading underscore in the name. [Jeroen] > May I propose PR 15327 as alternative? I'll take a look soonish. Since it has its own

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This looks like a duplicate of https://bugs.python.org/issue35113 . I have created a PR for the issue but didn't have time to debug the Windows issue. -- nosy: +xtreak ___ Python tracker

[issue24724] Element.findall documentation misleading

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Issue is closed as far as I'm concerned Me too. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue27561] Warn against subclassing builtins, and overriding their methods

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue12634] Random Remarks in class documentation

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue12634] Random Remarks in class documentation

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15111 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15406 ___ Python tracker ___

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-22 Thread Marco Sulla
Marco Sulla added the comment: Thanks, but telling the truth: 1. I just not use SubElement, even if it's more convenient. I just create an Element and I append to the parent one. It's much more clear IMHO 2. I do not use `fromstring` and all its friends. It was just a suggestion 3. I

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Caleb Donovick
Caleb Donovick added the comment: I think findsource could be made more robust by using __qualname__ if it available. -- ___ Python tracker ___

[issue19441] itertools.tee improve documentation

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is out of date. The docs currently have: ''' Once :func:`tee` has made a split, the original *iterable* should not be used anywhere else; otherwise, the *iterable* could get advanced without the tee objects being informed. ''' --

[issue37890] Modernize several tests in test_importlib

2019-08-22 Thread Kyle Stanley
Kyle Stanley added the comment: > I would just read through the other tests files under test_importlib to see > how other tests were done. Okay, I'll start with that and report back with any ideas for potential changes to test_pkg_import. Thanks. --

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Caleb Donovick
Change by Caleb Donovick : -- nosy: +donovick ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: There may still be some holes still remaining in OrderedDict but it doesn't seem to have been relevant in practice and will become even less so now that regular dicts are ordered and compact. If an issue does are arise with someone setting OrderedDict

[issue26589] Add HTTP Response code 451

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4a40498ea96a3c606952712c7951b2ea4ab258e4 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-30550: Clarify JSON ordering guarantees (GH-15397) (GH-15403)

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Leonard Truong
Leonard Truong added the comment: Turns out this is a documented issue in the source code: https://github.com/python/cpython/blob/3.7/Lib/inspect.py#L794-L796 -- ___ Python tracker

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Leonard Truong
New submission from Leonard Truong : Here's a case where `inspect.getsource` returns the wrong class definition when a file contains multiple class definitions with the same name. This pattern is valid runtime behavior when the class definitions are inside different scopes (e.g. a factory

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15110 pull_request: https://github.com/python/cpython/pull/15403 ___ Python tracker ___

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 657008ea0336ff4f275ed3f0c2b6dd2e52de2bba by Raymond Hettinger in branch 'master': bpo-30550: Clarify JSON ordering guarantees (GH-15397) https://github.com/python/cpython/commit/657008ea0336ff4f275ed3f0c2b6dd2e52de2bba --

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: > This is an issue when the standard handles are inherited or duplicated to a > grandchild process, and so on. In the case of Popen(sys.executable), the > system is duplicating the standard handles implicitly because sys.executable > is a console process

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like you are mixing up analyzing .pyi and .py files. Anyway, let's not do this. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
Change by Pierre-Jean Grenier : -- keywords: +patch pull_requests: +15108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15401 ___ Python tracker

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
New submission from Pierre-Jean Grenier : The module tarfile contains some methods for knowing whether an archive member is a regular file/a directory/a symlink. Apart from an "is_dir()" method, there was nothing alike in the zipfile module. For an on-going project, I needed to know whether

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Cameron Trando
Cameron Trando added the comment: What happened is that we have a hard time analyzing PathLike because in the pathlib stub they use PathLike[str], so when we try to analyze Path which inherits from PathLike[str], because PathLike is not generic, then we think it's an instance of an object

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There is an (old) similar proposal https://github.com/python/typing/issues/402 btw. Taking into account that this can be made only in 3.9, what is the benefit over ``from __future__ import annotations`` (that one can use already) do you see? IMO there are

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Making an existing stdlib class generic has to be considered carefully, otherwise it may break backward compatibility. As I wrote in the typeshed issue, I actually think the status quo is fine. But I'd like to hear you out about how it causes problems in

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15107 pull_request: https://github.com/python/cpython/pull/15399 ___ Python tracker ___

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 4be11c009abe88175fa164b45e4838e7267dfa97 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)

[issue11846] Remove non-guaranteed implementation details from docs.

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The current wording seems to have sufficed for users of the C API. Also, it is an implementation detail subject to change. Discussions on being able to mutate anything in C are covered in the ctypes module. -- resolution: accepted -> not a bug

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lukasz.langa priority: normal -> release blocker ___ Python tracker ___ ___

[issue34302] Avoid inefficient way to find start point in deque.index

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like deque.index() now has a fast searcher. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35654] Remove 'guarantee' that sorting only relies on __lt__ from sorting howto

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Well, if this is indeed by design (and I missed the > list.sort() reference) then I agree the HOWTO should not be changed It is in fact by design :-) -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Don't worry more about tests until I look at what you have done already. -- ___ Python tracker ___

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'mousescroll' was not exact because the mouse is also used to scroll with the scrollbar. 'handlescroll' is worse. 'wheelscroll' seems awkward. 'scrollwheel' (scroll with the mouse wheel) is specific. At least in idlelib, event handlers are routinely

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Cameron Trando
New submission from Cameron Trando : Currently os.PathLike[str] causes a runtime error; however, typeshed sees it as valid and mypy does not throw any errors on it. mypy treats it as os.PathLike[AnyStr] I already filed a bug on typeshed, see https://github.com/python/typeshed/issues/3202

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 5fda09cc1ebcb364a660bc5a831ef8f6463d810b by Miss Islington (bot) in branch '3.8': bpo-28556: Add a regression test to typing (GH-15396) https://github.com/python/cpython/commit/5fda09cc1ebcb364a660bc5a831ef8f6463d810b --

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15106 pull_request: https://github.com/python/cpython/pull/15398 ___ Python tracker ___

[issue37663] Making venv activation script prompts consistent

2019-08-22 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: Fixed by issue37663. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37660] Drop support for Aspen magic directories in venv's activate scripts

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: Fixed by issue37663. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue37890] Modernize several tests in test_importlib

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: I would just read through the other tests files under test_importlib to see how other tests were done. -- ___ Python tracker ___

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: Also, how should I get the new code coverage percentage (or should it be ignored for now)? I'm thinking of adding a few more tests that send invalid events which would raise KeyError but I don't think that this behaviour will be used (and it's not

[issue37918] What about an enum for open() modes?

2019-08-22 Thread Brett Cannon
Change by Brett Cannon : -- priority: normal -> low type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 8889627b53e1eea2e32590f1867fbb0b0fc7407f by Miss Islington (bot) (Ivan Levkivskyi) in branch 'master': bpo-28556: Add a regression test to typing (GH-15396) https://github.com/python/cpython/commit/8889627b53e1eea2e32590f1867fbb0b0fc7407f

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +15105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15397 ___ Python tracker

[issue37919] nntplib throws spurious NNTPProtocolError

2019-08-22 Thread Mark Sapiro
New submission from Mark Sapiro : This is really due to an nntp server bug, but here's the scenerio. A connection is opened to the server. An article is posted via the connection's post() method. The server responds to the article data with 240 Article posted but due to the server bug, if

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cb8de91dadf15925fb95069cb190398e1d485f56 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-14050: Note that not all data can be sorted (GH-15381) (GH-15395)

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If this is only a theoretical problem, might it make sense > to just leave it as is? I'm fine with that. In the last four years, I'm the only one who ever noticed, so it doesn't appear to be a problem in practice. -- resolution: -> wont fix

[issue23987] docs about containers membership testing wrong for broken objects

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like the identity-implies-equality part of this has already been taken care of. The __hash__ invariant also appears to now have extensive coverage, some in the glossary and much more in the data model section of the reference. Cute puzzles

[issue28556] typing.py upgrades

2019-08-22 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +15104 pull_request: https://github.com/python/cpython/pull/15396 ___ Python tracker ___

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though. The handlescroll function is now a standalone module function in tree.py and the

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset d0cdeaab76fef8a6e5a04665df226b6659111e4e by Raymond Hettinger in branch 'master': bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) https://github.com/python/cpython/commit/d0cdeaab76fef8a6e5a04665df226b6659111e4e

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15103 pull_request: https://github.com/python/cpython/pull/15395 ___ Python tracker ___

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4109263a7edce11194e301138cf66fa2d07f7ce4 by Raymond Hettinger in branch 'master': bpo-14050: Note that not all data can be sorted (GH-15381) https://github.com/python/cpython/commit/4109263a7edce11194e301138cf66fa2d07f7ce4 --

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset d0da97de65985ea4fc69cade2343d931f8b9efcd by Miss Islington (bot) in branch '3.7': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 2878f378e02990303a8fe4bedd5386bd90efc26d by Miss Islington (bot) in branch '3.8': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Please see discussion at issue36953 and issue37324. It's currently blocked by Jinja that doesn't have a release with the fix to be used in CI. -- nosy: +xtreak ___ Python tracker

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: It's a work-in-progress: see bpo-37324. -- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> collections: remove deprecated aliases to ABC classes ___ Python

[issue37918] What about an enum for open() modes?

2019-08-22 Thread Marco Sulla
New submission from Marco Sulla : As title. I just created it: https://pastebin.com/pNYezw2V I think it could be useful to have a more descriptive way to declare a file open mode. Many languages has an enum for this. Maybe open(), os.fdopen(), os.popen() and pathlib.Path.open() can just

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread Michael Anckaert
New submission from Michael Anckaert : When importing an ABC from the collections module in Python 3.9 there is a warning that this is deprecated since Python 3.3 and will stop working in Python 3.9. Should this warning be removed and lead to an ImportError? Python 3.9.0a0

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: Thank you for the clarification Paul. It makes sense to me now to not include those accessors. On Thu, 22 Aug 2019 at 17:46, Paul Ganssle wrote: > > Paul Ganssle added the comment: > > > I would support this addition. The timedelta class already has

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Paul Ganssle
Paul Ganssle added the comment: > I would support this addition. The timedelta class already has accessors for > days and seconds, why not for hours and minutes? The `timedelta.days` and `timedelta.seconds` accessors do not do what is being requested here. The component accessors just give

[issue17306] Improve the way abstract base classes are shown in help()

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: I would be very interested and motivated to work on this. I'll start by taking a look at the pointers Raymond gave. If anyone can chime in with some more information / guidance that would be awesome. -- nosy: +michaelanckaert

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: I would support this addition. The timedelta class already has accessors for days and seconds, why not for hours and minutes? The implementation should make use of the idiomatic way as Serhiy mentioned. >>> timedelta(hours=25).seconds // 3600 1 Is

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15102 pull_request: https://github.com/python/cpython/pull/15393 ___ Python tracker ___

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15101 pull_request: https://github.com/python/cpython/pull/15392 ___ Python tracker ___

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a38e9d139929a227e3899fbb638bc46c6cc6d8ba by Pablo Galindo (Sergey Fedoseev) in branch 'master': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Tom and Karthikeyan for the finding and the debugging :) -- ___ Python tracker ___

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is due to an incorrect type check in the timezone_richcompare, it should be a comparison against PyDateTime_TimeZoneType not against PyDateTime_TZInfoType. The segfault is due to an invalid casting to PyDateTime_TimeZoneType (the child) from the

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Tom Augspurger
Tom Augspurger added the comment: Thanks for debugging this Karthikeyan and for the quick fix Pablo! -- ___ Python tracker ___ ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Steve Dower
Steve Dower added the comment: Thanks Zackery for the patch! > The problem is just console pseudohandles in Windows 7 and earlier. Should we add a version check as well [1]? I'm not totally comfortable with bitmasking a handle here, but if we only do this additional check on Win7 then I'm

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +15100 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15390 ___ Python tracker

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +15099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15389 ___ Python tracker ___

[issue37884] Optimize Fraction() and statistics.mean()

2019-08-22 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: May I propose PR 15327 as alternative? It solves some of the same issues as the PR on this issue, in particular supporting arbitrary objects with as_integer_ratio(). It also improves performance somewhat for certain inputs, but that's more by accident.

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > It seems like self.stdout.read() hangs even after the child process > has been killed. This is an issue when the standard handles are inherited or duplicated to a grandchild process, and so on. In the case of Popen(sys.executable), the system is duplicating

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: It should not go on the numeric tower. -- --Guido (mobile) -- ___ Python tracker ___ ___

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems this is due to issue37685 (dde944f9df) on bisecting datetime related changes. Adding Serhiy. I guess this could be marked as release blocker. Here is a simplified reproducer on extracting pytz.utc source [0] which is an object of simple

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Elinaldo Monteiro
Elinaldo Monteiro added the comment: Imagine the following scenario. from datetime import timedelta diff = timedelta(hours=23, minutes=59) - timedelta(hours=20, minutes=45) Which is the simplest ? diff.hours diff.total_seconds() // 3600 -- ___

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was already proposed several times before. The problem is that what do you expect to get from timedelta(hours=24).hours? The idiomatic way to convert a timedelta object to a number of hours is: td = timedelta(...) number_of_hours = td //

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- title: Segfault in comparison between datetime.timezone.utc and putz.utc -> Segfault in comparison between datetime.timezone.utc and pytz.utc ___ Python tracker

[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am adding 3.8 regression since the code works with 3.7 though it involves pytz. -- keywords: +3.8regression nosy: +belopolsky, p-ganssle, xtreak ___ Python tracker

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +15098 pull_request: https://github.com/python/cpython/pull/15388 ___ Python tracker ___

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-08-22 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +15096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15387 ___ Python tracker ___

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-08-22 Thread Jakub Piotr Cłapa
New submission from Jakub Piotr Cłapa : On a macOS hosts the system ranlib does not understand ELF files so using the "ranlib" command causes errors during cross-compilations. The simplest way to fix it is to pass the RANLIB parameter provided to setup.py through to the distutils compiler

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +15095 pull_request: https://github.com/python/cpython/pull/15386 ___ Python tracker ___

[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc

2019-08-22 Thread Tom Augspurger
New submission from Tom Augspurger : The following crashes with Python 3.8b3 ``` import sys import pytz import datetime print(sys.version_info) print(pytz.__version__) print(datetime.timezone.utc == pytz.utc) ``` When run with `-X faulthandler`, I see ``` sys.version_info(major=3, minor=8,

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Ma Lin
Change by Ma Lin : -- nosy: +Ma Lin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list

  1   2   >