[issue39809] argparse: add max_text_width parameter to ArgumentParser

2020-03-02 Thread paul j3
paul j3 added the comment: But you can replace the simple 'lambda' with a function that takes the max with 'columns'. In other words, include: width = _shutil.get_terminal_size().columns width -= 2 width = min(max_text_width, width) The only thing

[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-02 Thread Paul Ganssle
Paul Ganssle added the comment: I don't think adding a default_year parameter is the right solution here. The actual problem is that `time.strptime`, and by extension `datetime.strptime` has a strange and confusing interface. What should happen is either that `year` is set to None or some

[issue39809] argparse: add max_text_width parameter to ArgumentParser

2020-03-01 Thread paul j3
paul j3 added the comment: https://bugs.python.org/issue13041 is (I think) the latest issue/patch to deal with the help width. I don't like the idea of adding more parameters to the `ArgumentParser` class. It's too complicated already. There are a couple of ways that a user can do

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-29 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: -p-ganssle ___ Python tracker <https://bugs.python.org/issue39763> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39804] timezone constants in time module inaccurate with negative DST (e.g. Ireland)

2020-02-29 Thread Paul Ganssle
New submission from Paul Ganssle : >From a report on the dateutil tracker today, I found that `time.timezone` and >`time.altzone` are not accurate in Ireland (at least on Linux, not tested on >other platforms): https://github.com/dateutil/dateutil/issues/1009 Europe/Dublin in the m

[issue39650] Creating zip file where names in local header don't match with central header

2020-02-16 Thread Paul Marquess
New submission from Paul Marquess : Consider this code (based on code from an issue on StackOverflow) import zipfile import os allFilesToZip = ["/tmp/tom"] with zipfile.ZipFile(allZipPath, 'w') as allZip: for f in allFilesToZip: allZip.write(f, compress_type=zipfile.ZI

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Paul Moore
Paul Moore added the comment: You've provided links to your branches, but not to the specific text you're proposing to add. Can you link to a diff or something that shows what you've added more precisely? -- ___ Python tracker <ht

[issue30155] Add ability to get tzinfo from a datetime instance in C API

2020-02-10 Thread Paul Ganssle
Paul Ganssle added the comment: So this bug is asking for two things: 1. An official accessor for the `tzinfo` component of an existing datetime, which I think is very reasonable in light of the fact that there are official accessors for all the other components of a datetime. 2

[issue39604] Document PyDateTimeAPI / PyDateTime_CAPI struct

2020-02-10 Thread Paul Ganssle
New submission from Paul Ganssle : The entire public interface documented for the datetime C API is various C macros (see: https://docs.python.org/3/c-api/datetime.html) which are wrappers around function calls to the PyDateTimeAPI / PyDatetime_CAPI struct, but the struct itself

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-10 Thread Paul Moore
Paul Moore added the comment: > In short -- I understand that this is a complex issue, but making an absolute > path is a pretty common use case, and we've had os.path.abspath() for > decades, so there should be one obvious way to do it, and it should be easily > disco

[issue39550] isinstance accepts subtypes of tuples as second argument

2020-02-04 Thread Paul Ganssle
Paul Ganssle added the comment: Serhiy: I think at least a test for this particular corner case should be added, so that no implementations of `isinstance` that use the CPython test suite hit an infinite recursion in that event, I guess? Though I think it's maybe an open question as to what

[issue39541] distutils: Remove bdist_wininst (Windows .exe installers) in favor of bdist_wheel (.whl)

2020-02-03 Thread Paul Ganssle
Paul Ganssle added the comment: Per my reasoning in the discourse thread, I disagree with this move. I think that this should be handled in setuptools, which is where we tend to handle breaking changes or even enhancements to distutils. If we do this in setuptools, we'll get a backport

[issue39197] argparse: title and description for mutually exclusive arg groups

2020-01-17 Thread paul j3
paul j3 added the comment: https://bugs.python.org/issue9694 is the original issue about the titles of the base argument groups. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2020-01-17 Thread paul j3
paul j3 added the comment: I don't think the SO question is relevant. It's about changing the order of Actions in the Help and/or usage. Here it's a question of whether to sort the `argparse.Namespace` display. I think it's been adequately discussed in the recent bug/issues

[issue39197] argparse: title and description for mutually exclusive arg groups

2020-01-17 Thread paul j3
paul j3 added the comment: A mutually_exclusive_group is not an argument_group. It affects parsing and the usage, but does nothing in the help lines. A mutually_exclusive_group may be nested in an argument_group if you want another group title. g1 = parser.add_argument_group('My

[issue39283] Add ability to inherit unittest arguement parser

2020-01-17 Thread paul j3
paul j3 added the comment: The issue of testing a script that uses argparse has come up on StackOverFlow a number of times. As noted the unittesting framework(s) often use their own parsers (not necessarily argparse). That means they are looking at the sys.argv commandline

[issue36078] argparse: positional with type=int, default=SUPPRESS raise ValueError

2020-01-17 Thread paul j3
paul j3 added the comment: This is a complicated issue that needs a lot of thought and testing before we make any changes. While all Actions have the 'required' attribute, the programmer can only set it for optionals. _get_positional_kwargs() will raise an error if the programmer tries

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-17 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > We may be possible to replace bytecode from `STORE_GLOBAL _cnt; LOAD_GLOBAL > _cnt` into `DUP_TOP; STORE_GLOBAL _cnt`. Sounds good, and that's why I personally care about the "STORE" case, and the patch I submit touches only it, which w

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-17 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Absolutely should be able to optimize namespace access. The fact that namespace is a dict is an implementation detail, it's still inefficient even with all those version counters and inline caches. Ironically, to let people prototype better, more efficient

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > exec() function is currently quite clear A recent case: https://bugs.python.org/issue38316, co_stacksize was quite clear what it is. Turned out, a bug in the documentation (likely, just someone forgot to update it to the actual code). That's just

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Namespace performances are really critical for overall Python performances. Yeah, that's why I'd like for myself and other people to make it easy to explore the behavior of namespace lookups, to see how to optimize them. > You're free to fork

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Paul: you're are in front of 3 core developers who are rejecting your feature > request. But no, it's not my feature request. There were 2 tickets by at least 2 people. I just saw my case to be similar to cases of those people, so instead of cr

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > you ask to modify Python so you can pass dict subclasses as namespaces and > expect CPython to respect the mapping protocol But no, per your own account, you made noticeable, though not complete, code changes in that direction. The only thing I'm

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Ok, so the patch for my usecase (STORE_GLOBAL) is vividly trivial, so to go thru the full circle, I posted it: https://github.com/python/cpython/pull/18033 . -- ___ Python tracker <https://bugs.python.

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2020-01-16 Thread Paul Sokolovsky
Change by Paul Sokolovsky : -- pull_requests: +17429 pull_request: https://github.com/python/cpython/pull/18033 ___ Python tracker <https://bugs.python.org/issue36

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: s/only our own usecase/only your own usecase/ (missing "y" typo) -- ___ Python tracker <https://bugs.python.o

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Later, I closed my pysandbox beause it was "broken by design": https://lwn.net/Articles/574215/ Thanks for the link, insightful. Still unclear, by design of what it's broken ;-). > Paul Sokolovsky wrote in bpo-36220 than his idea is a

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-16 Thread Paul Ollis
Paul Ollis added the comment: > I thought that if this raises a (normal) exception, it always means that it > did not have overtaken the `fd`, i.e. never results in an unreferenced file > object which has taken ownership of `fd`. The current CPython implementation does not guar

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-15 Thread Paul Ollis
Paul Ollis added the comment: I think it is worth pointing out that the semantics of f = ``open(fd, closefd=True)`` are broken (IMHO) because an exception can result in an unreferenced file object that has taken over reponsibility for closing the fd, but it can also fail without

[issue39280] Don't allow datetime parsing to accept non-Ascii digits

2020-01-10 Thread Paul Ganssle
Paul Ganssle added the comment: > Yes, but not within the same format. If someone were to choose the format > '2014-04-10T24:00:00', they would have a reasonable expectation that there is > only one unique string that corresponds with that datetime That's a particularly bad example

[issue39280] Don't allow datetime parsing to accept non-Ascii digits

2020-01-09 Thread Paul Ganssle
Paul Ganssle added the comment: I don't love the inconsistency, but can you elaborate on the actual *danger* posed by this? What security vulnerabilities involve parsing a datetime using a non-ascii digit? The reason that `fromisoformat` doesn't accept non-ASCII digits is actually because

[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Paul Moore
Paul Moore added the comment: For me, I headed straight for "Sharing state between processes" and the "Shared memory" object. That's probably because I was reviewing someone else's code, rather than writing my own, but nevertheless when coding I do tend to dive stra

[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Paul Moore
Paul Moore added the comment: Agreed it's not a bug, but I will say it took me a while to work out *why* it's not a bug (namely, that even though the OP is using shared memory values, the code relies on fork semantics to share the two Value objects that *reference* the shared memory

[issue30717] Add unicode grapheme cluster break algorithm

2020-01-06 Thread Paul Ganssle
Paul Ganssle added the comment: > Oh, also, if y'all are fine with binding to Rust (through a C ABI) I'd love > to help y'all use unicode-segmentation, which is much less work that pulling > in ICU. Otherwise if y'all have implementation questions I can answer them. > This s

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > I agree with Terry, the moment you pass a dict subclass to exec you are out > of contract. If any, we may need to sanitize the input to exec, although I > don't think is worth paying the performance price for that. exec() params are alread

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > The doc for exec says globals "must be a dictionary (and not a subclass of > dictionary)" Docs are full of mistakes and outdated information. Fixing STORE_GLOBAL case from https://bugs.python.org/issue36220#msg359046 would be triv

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Some smart maintainer closed https://bugs.python.org/issue36220 as a duplicate of this one. That ticket might have more details of the underlying issues. -- nosy: +pfalcon ___ Python tracker <ht

[issue39167] argparse boolean type bug

2019-12-30 Thread paul j3
paul j3 added the comment: The rejected boolean type proposal: https://bugs.python.org/issue37564 -- ___ Python tracker <https://bugs.python.org/issue39

[issue39167] argparse boolean type bug

2019-12-30 Thread paul j3
paul j3 added the comment: Despite the name, the 'type' parameter specifies a function, not a Python class. The only string that produces False is the empty one: bool(''). So 'type=bool' is valid Python, even if it isn't useful. With `nargs='+'` there's no problem with providing strings

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > I wanted to write a sandbox for Python. Sandbox indeed, it is. class NS(dict): def __setitem__(self, k, v): if not isinstance(v, type(lambda: 0)): raise RuntimeError("Global variables considered harmful") globals

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread Paul Sokolovsky
Change by Paul Sokolovsky : -- nosy: +pfalcon title: LOAD_NAME and LOAD_GLOBAL handle dict subclasses for globals() differently -> LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently ___ Python tracker <

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2019-12-20 Thread Paul Ganssle
Change by Paul Ganssle : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue13305> ___ ___ Python-bug

[issue39103] [linux] strftime renders %Y with only 3 characters

2019-12-20 Thread Paul Ganssle
Paul Ganssle added the comment: This is a duplicate of issue 13305. Right now we have some shims around `strftime` to improve consistency in some situations and for other reasons, but mostly we just call the libc version. There is an open issue from 2008 (#3173) to ship our own

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread paul j3
paul j3 added the comment: This patch changes the super class, _AttributeHolder. ArgumentParser and Actions also inherit from this, though they have their own _get_kwargs methods, and so aren't affected by the sort and its removal. I just had occasion on stackoverflow to discuss the order

[issue39076] Use types.SimpleNamespace for argparse.Namespace

2019-12-17 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue39076> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore
Paul Moore added the comment: Can you also confirm that the installation of Python was done with the standard Python installer from the python.org website, and is not another distribution (such as Anaconda)? -- ___ Python tracker <ht

[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore
Paul Moore added the comment: > sys.path = [ >'C:\\Developing\\Python\\python38.zip', >'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\', >'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\lib-tk', >'C:\\Developing\\Python\\python-3.8.0.amd64\\DLLs\\', >

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Paul Moore
Paul Moore added the comment: Most items in the Scripts directory can be run using the `-m` flag to Python, so you can use something like `py -m pip` to run pip without needing the Scripts directory in PATH. If an individual project like PyQt doesn't support -m, it's relatively easy

[issue38999] Python launcher on Windows does not detect active venv

2019-12-09 Thread Paul Moore
Paul Moore added the comment: See PEP 486 (https://www.python.org/dev/peps/pep-0486/). This is intended behaviour, as it is assumed that explicitly specifying a Python version means that the user had a specific Python interpreter in mind. There are also technical issues - if the shebang

[issue38999] Python launcher on Windows does not detect active venv

2019-12-09 Thread Paul Moore
Change by Paul Moore : -- Removed message: https://bugs.python.org/msg358060 ___ Python tracker <https://bugs.python.org/issue38999> ___ ___ Python-bugs-list m

[issue38999] Python launcher on Windows does not detect active venv

2019-12-09 Thread Paul Moore
Paul Moore added the comment: See PEP 486 (https://www.youtube.com/watch?v=Lmq13nrEFaM=PLuE3ABw6vYeR0gcPT6uj25ZZhmSP9vRB2=28=0s). This is intended behaviour, as it is assumed that explicitly specifying a Python version means that the user had a specific Python interpreter in mind

[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Paul Moore
Change by Paul Moore : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38974> ___ ___ Python-bugs-list mailing list Unsub

[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Paul Moore
Paul Moore added the comment: Can you provide a minimal, self-contained, example of a program that demonstrates this behaviour in 3.8, but works in 3.7. It's not really possible to determine what the issue might be without a means of reproducing the problem. -- components: +Tkinter

[issue38950] argparse uses "optional arguments" for "keyword arguments"

2019-12-02 Thread paul j3
paul j3 added the comment: This related to an old issue https://bugs.python.org/issue9694 argparse required arguments displayed under "optional arguments" argparse defines two initial argument groups, titled 'positional arguments' and 'optional arguments'. Alternatives have been

[issue38021] pep425 tag for AIX is inadequate

2019-11-26 Thread Paul Moore
Paul Moore added the comment: > replacement platform_tag, not compatibility tag. Ah, I see, sorry. In that case, this should be fine, it's purely a CPython question. There's obviously a follow-on discussion about how that platform tag is *incorporated* into the compatibility t

[issue38914] Clarify wording for warning message when checking a package

2019-11-26 Thread Paul Ganssle
Paul Ganssle added the comment: For the future, we generally tend to keep distutils pretty "frozen", only making minor changes or the changes needed to build Python itself. Instead we generally make changes in setuptools, which for the moment monkey-patches distutils (and

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-25 Thread Paul Moore
Paul Moore added the comment: I presume there's also the option of setting up the environment (or however it's done now - I know the details changed as the feature was developed) so that the "base" python.exe pretends to be the venv one, exactly as the wrapper does. However, tha

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-25 Thread Paul Moore
Paul Moore added the comment: Yes, it does. I think we'd need input from Steve Dower here, as these changes were made (I believe) in support of the Windows Store build of Python, so any changes would need to be considered in the light of how they would affect that. I do, however, consider

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-25 Thread Paul Moore
Paul Moore added the comment: The behaviour in this area is different between 3.7.0, 3.7.2, and 3.7.3 (at least). I have reproduced the issue with 3.7.3. Steve Dower made changes to the way the python executable works in venvs in the point releases of 3.7 - see https://github.com/pypa

[issue38021] pep425 tag for AIX is inadequate

2019-11-23 Thread Paul Moore
Paul Moore added the comment: Thanks for the clarification, Nick. Yes, I agree that the basic "this is the tag that matches this precise CPython installation" is not the difficult part of the problem here, and if that is all that this issue is targeting, there should be no maj

[issue38021] pep425 tag for AIX is inadequate

2019-11-22 Thread Paul Moore
Paul Moore added the comment: What complicates the issue for AIX (and reminds me very strongly of the MacOS and manylinux situations, both of which were defined after the original tag PEP, and so contain additional insights) is the business of certain tags being compatible across multiple

[issue38021] pep425 tag for AIX is inadequate

2019-11-22 Thread Paul Moore
Paul Moore added the comment: PyPA member here - if this PR is defining new compatibility tags, I would have expected it to need discussion as a revision to PEP 425, much like the manylinux efforts did. (It may actually be a closer parallel with MacOS, which didn't have a tagging PEP - I'm

[issue38843] Document argparse behaviour when custom namespace object already has the field set

2019-11-18 Thread paul j3
paul j3 added the comment: It doesn't have to be a special class. It can be a `argparse.Namespace` object. If the preexisting namespace has an attribute set, the action default will not over write it. In [85]: parser = argparse.ArgumentParser() ...: parser.add_argument('--foo

[issue38821] argparse calls ngettext with deprecated non-integer value

2019-11-18 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue38821> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-17 Thread Paul Ganssle
Paul Ganssle added the comment: I do not think this is a bug in pytz, but if it's a bug in Python it's one in reporting what the error is. The issue is that the time zone offset for "rules-based zones" like America/Denver (i.e. most time zones) is *undefined* for bare time

[issue38736] argparse: wrong type from get_default when type is set

2019-11-12 Thread paul j3
Change by paul j3 : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38736> ___ ___ Python-bugs-list

[issue38736] argparse: wrong type from get_default when type is set

2019-11-08 Thread paul j3
paul j3 added the comment: Yes you can set the default to be any object, such as an evaluated string. If it isn't a string it won't be passed through 'type'. The purpose of the delayed evaluation that I described is to avoid unnecessary evaluations. The worse case would be a write

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread paul j3
paul j3 added the comment: get_default just returns the default attribute as it is stored in the Action. Defaults are stored as given. During parsing the Action's default is placed in the args namespace at the start. At the end, it checks if the value in the namespace is a string

[issue38734] Python 3.7 and 3.8 in Windows Store do not start under git bash

2019-11-07 Thread Paul Anton Letnes
New submission from Paul Anton Letnes : Python 3.7 and 3.8 installed from the Windows Store do not start under git bash. Rather, they give some variation of this error message: bash: /c/Users/pa/AppData/Local/Microsoft/WindowsApps/python: Permission denied However, the permissions are rwxr

[issue38590] argparse unexpected behavior with argument group inside mutually exclusive group

2019-11-04 Thread paul j3
paul j3 added the comment: With one exception, groups are not designed or intended to be nested. But by inheritance (from _ActionsContainer) nesting isn't blocked nor does it raise any errors. As you surmise, an ArgumentGroup, is used only for grouping the help lines. By default

[issue11354] argparse: nargs could accept range of options count

2019-11-03 Thread paul j3
paul j3 added the comment: A couple of quick observations: - this is one of the first patches that I worked on, so the details aren't fresh in my mind. A glance at my latest patch show that this isn't a trivial change. - nargs changes affect the input handling, the parsing, help

[issue37903] IDLE Shell sidebar.

2019-11-02 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: @rhettinger: The turtle demo is easily accessible through the menus via Help > Turtle Demo. It is nice to see there are others interested in IDLE's improvement. :-) -- ___ Python tracker <

[issue37527] Timestamp conversion on windows fails with timestamps close to EPOCH

2019-11-01 Thread Paul Ganssle
Paul Ganssle added the comment: Ah, my mistake. The examples all use `datetime.fromtimestamp`, so I didn't notice that it was failing only on the `timestamp` side. Re-opening, thanks! -- resolution: duplicate -> status: closed -> open superseder: [Windows] datetime.fromtimes

[issue36439] Inconsistencies with datetime.fromtimestamp(t) when t < 0

2019-11-01 Thread Paul Ganssle
Paul Ganssle added the comment: This has been coming up in a few different contexts lately, so I think it would be really good if we could get some sort of fix for it. One option is to implement our own versions of these APIs for use in Windows, but a thought occurred to me recently: we

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

2019-11-01 Thread Paul Ganssle
Paul Ganssle added the comment: Changing the superceder here as I think #36439 matches better than #37527. -- nosy: +p-ganssle resolution: duplicate -> status: closed -> open superseder: Timestamp conversion on windows fails with timestamps close to EPOCH -> Incons

[issue37527] Timestamp conversion on windows fails with timestamps close to EPOCH

2019-11-01 Thread Paul Ganssle
Paul Ganssle added the comment: This indeed seems to be a duplicate of 29097, which is fixed in Python 3.7, so we can close this bug. Thank you for your report Dschoni, and thank you for finding the duplicate Ma Lin! -- resolution: -> duplicate stage: -> resolved status

[issue37903] IDLE Shell sidebar.

2019-11-01 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: Zero: "not to have them added as text as is usual in a terminal window" taleinat: "removing prompts from the shell window's text widget" Zero: "print the values of ps1 and ps2 in the proposed ShellIO subclass&quo

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
Paul Martin added the comment: Good points. I made a mistake in run Should be: async def run(self, func, *args, **kwargs): call = functools.partial(func, *args, **kwargs) return await self._loop.run_in_executor(self._executor, call) Also in this case run awaits

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
Paul Martin added the comment: Run method should be: async def run(self, func, *args, **kwargs): call = functools.partial(func, *args, **kwargs) return await self._loop.run_in_executor(None, call) -- ___ Python tracker <ht

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-01 Thread Paul Martin
Paul Martin added the comment: I don't think changing the default executor is a good approach. What happens, if two or more thread pools are running at the same time? In that case they will use the same default executor anyway, so creating a new executor each time seems like a waste

[issue36664] argparse: parser aliases in subparsers stores alias in dest variable

2019-10-31 Thread paul j3
paul j3 added the comment: Just clarify how the code currently works. `subparsers` is a positional Action of subclass _SubParsersAction. It has a nargs='+...', requiring at least one string, and taking all remaining strings. Its __call__ has the standard signature. So everything that's

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: Maybe my impression has been false this whole time, but the Python interactive interpreter seems to be very similar to the IDLE shell window. My question is, "Why not make them even more so?" Having IDLE react to sys.ps1 and sys.ps2

[issue6188] Error Evaluating float(x) ** float(y)

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue6188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21957] ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue21957> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24185] Add Function for Sending File to Trash (or Recycling Bin)

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue24185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue21402> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18601] Example "command-line interface to difflib" has typographical error

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue18601> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21537] functools.lru_cache does not cache exceptions

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue21537> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18558] Iterable glossary entry needs clarification

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue18558> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue31848> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31476] Stdlib source files not installed

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue31476> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7676] IDLE shell shouldn't use TABs

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker <https://bugs.python.org/issue7676> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: The documentation for sys.ps1 and sys.ps2 states that they "are only defined if the interpreter is in interactive mode." Since the IDLE shell is meant to be interactive (and to reduce the differences between the shell and running Python

[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: When I start IDLE and the shell window appears, my first task is to press "Alt + T" to change from using tabs to spaces and then "Alt + U" to change from using 8 spaces to 4. This allows code pasted from the shell into an editor

[issue38636] "Alt + T" and "Alt + U" Broken in IDLE on Windows

2019-10-29 Thread Stephen Paul Chappell
New submission from Stephen Paul Chappell : In the latest Python 3.8.0 installation when running IDLE on Windows, pressing "Alt + T" generates the following error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Pytho

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2019-10-24 Thread paul j3
paul j3 added the comment: Just today on SO someone found a similar bug in the help format with metavars, that involved an unpacking the expected only one value, but got 2. https://stackoverflow.com/questions/58541460/tuple-metavar-value-for-positional-argument-with-nargs-1 This had

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-24 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue38438> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2019-10-24 Thread paul j3
paul j3 added the comment: So the error occurs in HelpFormatter._format_action when 'help_lines' is an empty list: if action.help: help_text = self._expand_help(action) help_lines = self._split_lines(help_text, help_width) >> parts.

[issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called

2019-10-20 Thread Paul Martin
Change by Paul Martin : -- pull_requests: +16408 pull_request: https://github.com/python/cpython/pull/16863 ___ Python tracker <https://bugs.python.org/issue38

[issue38533] v3.7.5 py script run ok with python.exe but not pythonw.exe (python silent console not working)

2019-10-20 Thread Paul Moore
Paul Moore added the comment: Can you give an example of a script that fails? If you try to print (or otherwise use the standard IO streams) pythonw will fail, because there are no stdio streams for a GUI executable - and the traceback, which goes to stderr by default, will be lost

<    1   2   3   4   5   6   7   8   9   10   >