[issue46078] `ast.unparse` fails on `class C: i: int`… convert broken from `ast.AnnAssign` to `ast.Assign`

2021-12-14 Thread Samuel Marks
Samuel Marks added the comment: Just fixed the issue by using this value: ```py "```(None)```" if sys.version_info[:2] >= (3, 9) else "```None```" ``` -- stage: -> resolved status: open -> closed ___ Python trac

[issue46078] `ast.unparse` fails on `class C: i: int`… convert broken from `ast.AnnAssign` to `ast.Assign`

2021-12-14 Thread Samuel Marks
New submission from Samuel Marks : astor fails with: ``` File "python3.8/site-packages/astor/code_gen.py", line 63, in to_source generator.visit(node) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "pyth

[issue45544] Close 2to3 issues and list them here

2021-10-20 Thread Samuel Tatasurya
Change by Samuel Tatasurya : -- keywords: +patch nosy: +samtatasurya nosy_count: 1.0 -> 2.0 pull_requests: +27381 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17096 ___ Python tracker <https://bugs.p

[issue45108] frame.f_lasti points at DICT_MERGE instead of CALL_FUNCTION_EX in Windows only

2021-09-05 Thread Samuel Colvin
Samuel Colvin added the comment: Perhaps worth adding that the tests don't fail on python 3.6, 3.7 or 3.8. -- nosy: +samuelcolvin ___ Python tracker <https://bugs.python.org/issue45

[issue44825] node.annotation is not a str in `ast`'s `class _Unparser(NodeVisitor)`

2021-08-04 Thread Samuel Marks
Samuel Marks added the comment: Fixed with https://github.com/offscale/cdd-python/commit/079dc28 -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue44825] node.annotation is not a str in `ast`'s `class _Unparser(NodeVisitor)`

2021-08-04 Thread Samuel Marks
Samuel Marks added the comment: Hmm, debugging my test and I was able to replicate it with this smaller one: ``` from ast import FunctionDef, arguments, Load, Name, AnnAssign, Store, BinOp, Add, unparse unparse(FunctionDef(args=arguments(args=[], defaults

[issue44825] node.annotation is not a str in `ast`'s `class _Unparser(NodeVisitor)`

2021-08-04 Thread Samuel Marks
New submission from Samuel Marks : I tried making `node.annotation` an `ast.Name("str", ast.Load())`, which worked but when the AST was unparsed to a string it shows as `# type: `. https://github.com/offscale/cdd-python/runs/3213864077 Replicate with: ``` unparse(Assign(annot

[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2021-06-30 Thread Samuel Henrique
Samuel Henrique added the comment: Hello Vinay Sajip, I would like to kindly ask you to please reconsider and give your thoughts on my description of the issue here. Let me try to work based on your last reply: > ...has been around since Jan 2008, and it seems that no one in that time

[issue44470] 3.11 docs.python.org in Polish not English?

2021-06-24 Thread Samuel Marks
Samuel Marks added the comment: Yep exactly like my screenshot but now the Polish has turned Korean… my family was never Korean! -- ___ Python tracker <https://bugs.python.org/issue44

[issue44470] 3.11 docs.python.org in Polish not English?

2021-06-21 Thread Samuel Marks
New submission from Samuel Marks : It's been too long since my family have been Polish! (see screenshot of https://docs.python.org/3.11/library/parser.html ) My computer is only configured for English. Running Firefox 90.0b9 (64-bit) on macOS 11.4 (20F71). -- assignee: docs@python

[issue44402] Python 3.9 and 3.10 fails to install in WINE

2021-06-11 Thread Samuel Marks
New submission from Samuel Marks : What works: - python-3.7.9.exe python-3.8.9.exe What fails: - python-3.10.0b2.exe python-3.9.5.exe (I'm debugging some regressions on my test suite… macOS and Linux [incl. in Docker] work, Windows fails) How to reproduce (macOS): 0. Install WINE

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
Samuel Marks added the comment: `EXIT_SUCCESS` is defined in `stdlib.h`, as per https://docs.microsoft.com/en-us/cpp/c-runtime-library/exit-success-exit-failure (following the standard https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html) There are also https

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
Change by Samuel Marks : -- keywords: +patch pull_requests: +25147 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26559 ___ Python tracker <https://bugs.python.org/issu

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
New submission from Samuel Marks : Since Python 2.3 alpha 2 [19-Feb-2003] `EX_OK` has existed… but only for Unix. This adds support for Windows. -- components: Windows messages: 395203 nosy: paul.moore, samuelmarks, steve.dower, tim.golden, zach.ware priority: normal severity: normal

[issue43747] Can't create new interpreter in multi thread

2021-04-09 Thread Samuel Thibault
Samuel Thibault added the comment: I don't see how to reopen this, we'd probably want to mark it as a duplicate of the newly-opened https://bugs.python.org/issue43793 , see https://mail.python.org/archives/list/capi-...@python.org/thread/7FI6V2KFBFZIXC6LZLKHY4Z7TUJ6YWTX

[issue43793] [C API] Py_NewInterpreter() cannot be called from a thread which has no Python thread state

2021-04-09 Thread Samuel Thibault
Change by Samuel Thibault : -- nosy: +samuel-thibault ___ Python tracker <https://bugs.python.org/issue43793> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43747] Can't create new interpreter in multi thread

2021-04-06 Thread Samuel Thibault
Change by Samuel Thibault : -- nosy: +samuel-thibault ___ Python tracker <https://bugs.python.org/issue43747> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12657] Cannot override JSON encoding of basic type subclasses

2021-04-01 Thread Samuel Freilich
Samuel Freilich added the comment: A fully general solution for this might require a separate way to override the behavior for serializing dict keys (since those have to be serialized as strings). -- ___ Python tracker <https://bugs.python.

[issue12657] Cannot override JSON encoding of basic type subclasses

2021-04-01 Thread Samuel Freilich
Samuel Freilich added the comment: > A modern solution for this is to define a singledispatch function (with > implementations for your custom types) and pass it as the `default` parameter > to the dump functions. Does that work? I thought the default function only got called

[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2021-04-01 Thread Samuel Freilich
Samuel Freilich added the comment: I think the less-minor issue, of which this is a small subset, is that JSONEncoder doesn't allow changing the behavior for default-serializable types at all. That means you can't choose to lose less information in round-trip serialization/deserialization

[issue43671] segfault when using tkinter + pygame for ~5 minutes

2021-03-30 Thread Samuel Kirwin
New submission from Samuel Kirwin : Per the attached file, when testing an adapted version of pygame's alien script as part of research. Python segfaulted. This has occured twice about 5 minutes in. I had console running all messages at the time if more logs needed. MacOS Big Sur 11.2.3

[issue43596] change assertRaises message when wrong exception is raised

2021-03-22 Thread R. Samuel Klatchko
New submission from R. Samuel Klatchko : Right now, this code: class FooError(Exception): pass class BarError(Exception): pass def test_me(self): with self.assertRaises(FooError): raise BarError("something") will have the error "BarE

[issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set

2021-02-27 Thread Samuel Marks
Samuel Marks added the comment: Nevermind it actually was that missing `PKG_CONFIG_PATH` line… -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set

2021-02-27 Thread Samuel Marks
New submission from Samuel Marks : I was on 3.10a4 on macOS 11.1 for ages, finally decided to upgrade to a5, building from source. With latest `brew install openssl zlib`. ``` $ export LDFLAGS='-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib' $ export CPPFLAGS='-I/usr/local/opt

[issue43203] Default value incorrectly read with unittests on Windows & macOS but not Linux

2021-02-11 Thread Samuel Marks
New submission from Samuel Marks : Had a couple of commits to try and fix it on GitHub Actions (as I was unable to replicate locally), ended up with this very easy fix for Windows: https://github.com/SamuelMarks/doctrans/commit/98203e9fee3e0a888ab1f4128011dde5fad98f63 To completely remove

Re: Force Python ast to emit lines no longer than $length

2021-01-21 Thread Samuel Marks
I ended up adding word-wrap support directly to my code-generation: https://github.com/SamuelMarks/doctrans/commit/6147b21e168b66623aa1be95cb38b1969daa5147 Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://gith

Force Python ast to emit lines no longer than $length

2021-01-19 Thread Samuel Marks
I've written a library that works at the ast level. Sometimes the generated output goes over the linter line length limit. "foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz" How do I generate this kind of code instead?

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: There were only 12k occurrences, I'm sure I could manually go through that in an afternoon. Would you accept it then? On Tue, 22 Dec 2020, 12:22 am Eric V. Smith, wrote: > > Eric V. Smith added the comment: > > See https://github.com/ikamensh/f

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: EDIT: Just found https://github.com/ikamensh/flynt -- ___ Python tracker <https://bugs.python.org/issue42699> ___ ___ Python-bug

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: I suppose that's a good justification to never improve/upgrade the syntax and quality of the codebase. In terms of automatic upgrades of the codebase, one could always replicate the approach I use in doctrans—i.e., use of `ast` and/or `inspect

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: Wait I don't understand why you wouldn't accept a wholesale replacement of all `%` and `format` with f-strings through the entire CPython codebase [master branch]? BTW: Kinda unrelated, but would be great to have perspective on this little project - https

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: Yeah I hear ya, was just trying for the most concise issue title. I tend to [over]use `map`, `filter`, `filterfalse` and other `itertools` and `operator` methods in my own codebase. Surprised with that result, that using an explicit list is actually faster

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Samuel Marks
Samuel Marks added the comment: @eric.smith No benchmarks offhand, but I'd expect it to be a very minor improvement (if detectable). If this gets accepted I'll probably do a bunch of little changes like this, to improve things, e.g., replace '%' with '.format' (or f-strings, whatever you

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Samuel Marks
New submission from Samuel Marks : This is an extremely minor improvement. Rather than create a `list`—using a comprehension—then have it consumed by `.join`, one can skip the list construction entirely. (I remember this working from at least Python 2.7… probably earlier also

[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-11-05 Thread Samuel Marks
Samuel Marks added the comment: Since we're bringing these back, would you accept a backport of these types? [I'm writing a bunch of parsers/emitters—and starting to maintain an old runtime type-checker—for 3.6+] -- nosy: +samuelmarks ___ Python

[issue42242] Backport SQLite trace API v2

2020-11-02 Thread Samuel Marks
Samuel Marks added the comment: Done, thanks for the how-to: - https://github.com/python/cpython/pull/23103 [3.8] - https://github.com/python/cpython/pull/23102 [3.9] -- ___ Python tracker <https://bugs.python.org/issue42

[issue40318] Migrate to SQLite3 trace v2 API

2020-11-02 Thread Samuel Marks
Change by Samuel Marks : -- pull_requests: +22020 pull_request: https://github.com/python/cpython/pull/23103 ___ Python tracker <https://bugs.python.org/issue40

[issue40318] Migrate to SQLite3 trace v2 API

2020-11-02 Thread Samuel Marks
Change by Samuel Marks : -- nosy: +samuelmarks nosy_count: 4.0 -> 5.0 pull_requests: +22019 pull_request: https://github.com/python/cpython/pull/23102 ___ Python tracker <https://bugs.python.org/issu

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
Samuel Marks added the comment: Opened two issues and two PRs for 3.8 and 3.8: - https://bugs.python.org/issue42241 - https://bugs.python.org/issue42242 -- ___ Python tracker <https://bugs.python.org/issue42

[issue42242] Backport SQLite trace API v2

2020-11-01 Thread Samuel Marks
New submission from Samuel Marks : Backports https://github.com/python/cpython/pull/19581 https://bugs.python.org/issue40318 as per https://bugs.python.org/issue42229 See also 3.9 backporting: https://bugs.python.org/issue42241 [not sure if this is how you do backporting, a new issue and GH

[issue42241] Backport SQLite trace API v2

2020-11-01 Thread Samuel Marks
New submission from Samuel Marks : Backports https://github.com/python/cpython/pull/19581 https://bugs.python.org/issue40318 as per https://bugs.python.org/issue42229 -- components: Build messages: 380185 nosy: samuelmarks priority: normal pull_requests: 22011 severity: normal status

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
Change by Samuel Marks : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42229> ___ ___ Python-bugs-list

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
Samuel Marks added the comment:  -- ___ Python tracker <https://bugs.python.org/issue42229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
Samuel Marks added the comment: @erlendaasland Hmm… just double-checked, and this issue is present on Python 3.8.6 and 3.9.0 but not master [d3b4e068077dd26927ae7485bd0303e09d962c02] as you referenced. Should I close this issue—and PR—then? - Backport from master

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
Samuel Marks added the comment: Yes, this commit extends his changes to include macOS support (for some reason that SQLite version check doesn’t work properly on macOS; so this checks the macOS version, knowing AOT when SQLite trace v1 APIs were deprecated. Curious

[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks
New submission from Samuel Marks : Planned to fix all the compiler warnings on macOS. Ended up just fixing this SQLite one: ``` Python-3.9.0/Modules/_sqlite/connection.c:1066:9: warning: 'sqlite3_trace' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations

Static typing—with annotations—function name & arguments, or result of call, or string

2020-10-22 Thread Samuel Marks
`choices` for argparse? [which will need to be subclassed in order to enable that "--optimizer 'Adam' 'learning_rate = True'" syntax] * https://github.com/SamuelMarks/ml-params-tensorflow/blob/1d48502/ml_params_tensorflow/ml_params/trainer.py#L213-L215 What makes sense? Thanks for you

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-16 Thread Samuel Marks
t; need to play on the command line. > > > > And yea, I’ve written a command line parsing function in C a long time > ago. I thought that really cool at the time. I wouldn’t want to do it now. > > > > Karen. > > > >> On Oct 15, 2020, at 9:58 PM, Samuel M

Re: Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
/ml-params/blob/d1fb184/ml_params/__main__.py#L89 [I didn't know `getopt` was exposed otherwise I'd use that , but there has to be a solution just using argparse?] Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://gith

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
to expose this as CLI options. `--optimizer Adam` is a good first step, but it should error if I try and give it `momentum`. The comma syntax is my favourite so far. I guess I'll just have to write a validator outside the CLI parser to handle this… Samuel Marks Charity <https://sydneys

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
Simpson wrote: > One other thing: > > On 15Oct2020 20:53, Samuel Marks wrote: > >Idea: preprocess `sys.argv` so that this syntax would work > >`--optimizer Adam[learning_rate=0.01]`* > > > >*square rather than round so as not to require escape characters or >

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
Maurer wrote: > Samuel Marks wrote at 2020-10-15 20:53 +1100: > > ... > >To illustrate the issue, using `ml-params` and ml-params-tensorflow: > > ... > >What's the right solution here? > > While Python provides several modules in its standard library > to process

CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
? Thanks, Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/offscale> | LinkedIn <https://linkedin.com/in/samuelmarks> -- https://mail.python.org/mailman/listinfo/python-list

[issue41114] "TypeError: unhashable type" could often be more clear

2020-10-13 Thread Samuel Freilich
Samuel Freilich added the comment: python-ideas thread: https://mail.python.org/archives/list/python-id...@python.org/thread/B6OMGYIM47OVGOCZLEY3MEUJDFURJRDV/ The most minimal ideas from that seem to be: 1. Maybe link to the glossary from the error message (if links to documentation

[issue41114] "TypeError: unhashable type" could often be more clear

2020-09-28 Thread Samuel Freilich
Samuel Freilich added the comment: > I think it's reasonable to discuss the problem on python-ideas rather than on > a bugs issue, when it's not obvious what the right solution is. I did start a thread there. Don't object to that, if that's a better forum for this sort of

[issue41114] "TypeError: unhashable type" could often be more clear

2020-09-28 Thread Samuel Freilich
Samuel Freilich added the comment: > No minor tweak to the exception message will make this go away. For > understanding to occur, the only way to forward is to learn a bit about > hashability. That is a step that every beginner must take. This is a derisive and beginner-hostile

[issue41114] "TypeError: unhashable type" could often be more clear

2020-09-27 Thread Samuel Freilich
Samuel Freilich added the comment: > The user already knows The example I link to in the initial description appears to be one case where the user does not in fact know. I do think context that this restriction applies to dict key in particular is very relevant. The line could use the s

[issue41819] Fix some compiler warnings

2020-09-20 Thread Samuel Marks
Change by Samuel Marks : -- keywords: +patch pull_requests: +21376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22332 ___ Python tracker <https://bugs.python.org/issu

[issue41819] Fix some compiler warnings

2020-09-20 Thread Samuel Marks
Samuel Marks added the comment: Okay I'll redo it on master, here is my config, on macOS 10.15.6: ``` $ export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" $ export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" $ export LDFLAGS="-L/usr/local/opt/

[issue41819] Fix some compiler warnings

2020-09-20 Thread Samuel Marks
New submission from Samuel Marks : https://github.com/SamuelMarks/cpython/tree/3.9-compiler-fixes -- components: Build messages: 377205 nosy: samuelmarks priority: normal pull_requests: 21373 severity: normal status: open title: Fix some compiler warnings type: compile error versions

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-29 Thread Samuel Marks
where `Animal` could actually be `Dog` or `Horse` [making the obvious Base `ABC` & `abstractmethod` approach 'wrong'] 1. Each implementer framework can maintain wildly different internal APIs, making more hardcore integrations—in a multi-ML sense—far more difficult Samuel Marks Charity &l

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-29 Thread Samuel Marks
ing both interfaces in a straightforward manner. Thanks for your suggestions, Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/offscale> | LinkedIn <https://linkedin.com/in/samuelmarks> On Fri, Aug

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-27 Thread Samuel Marks
a little project I wrote that `import ast`). What are my options here? - It doesn't seem like the metaclass or decorator approaches will help here… Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/offscale>

ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-24 Thread Samuel Marks
ot;"" :param a: var :type a: ```int``` :param b: var :type b: ```int``` """ super(Pharm, self).foo(a=a) Thanks, Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source

[issue41114] "TypeError: unhashable type" could often be more clear

2020-06-25 Thread Samuel Freilich
New submission from Samuel Freilich : Currently, if you (for example) put a dict as a value in a set or key in a dict, you get: TypeError: unhashable type: 'dict' I'm pretty sure this wording goes back a long time, but I've noticed that Python beginners tend to find this really confusing

[issue40832] hi param in bisect module should not accept negative values

2020-05-31 Thread Vikash Raja Samuel Selvin
Vikash Raja Samuel Selvin added the comment: Thanks for your comments. Just to make sure I understood correctly, even though something like bisect.bisect_right(l, 5.1, 0, -2) [This returns 0 which is wrong] is allowed, since it is not common / intended it is ok to not check for negative

[issue40832] hi param in bisect module should not accept negative values

2020-05-31 Thread Vikash Raja Samuel Selvin
New submission from Vikash Raja Samuel Selvin : >>> bisect.bisect_right(l, 5.1, -1) Traceback (most recent call last): File "", line 1, in ValueError: lo must be non-negative >>> l [0, 1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9] >>> bisect.bisect_right(l, 5.1

[issue38830] `A Qt GUI for logging` produces TypeError

2019-11-17 Thread Samuel Mathias
New submission from Samuel Mathias : On the "logging cookbook" page: https://docs.python.org/3/howto/logging-cookbook.html#logging-cookbook The recipe "A Qt GUI for logging" produces the following error: `TypeError: update_status() missing 1 required position

[issue38681] 2to3 Conversion Result using BlankLine() can be Syntactically Incorrect

2019-11-03 Thread Samuel Tatasurya
New submission from Samuel Tatasurya : Transformation performed by certain fixers (e.g. future, itertools_imports) that causes a statement to be replaced by a blank line will generate a Python file that contains syntax error. For example, assuming a Python file (foo.py) containing line below

[issue38561] multiprocessing.Queue fails intermittently with "Broken pipe"

2019-10-22 Thread Samuel Grayson
New submission from Samuel Grayson : See [this SO post for more details](https://stackoverflow.com/q/51680479/1078199) -- components: Library (Lib) files: test.py messages: 355204 nosy: Samuel Grayson priority: normal severity: normal status: open title: multiprocessing.Queue fails

[issue38431] dataclasses.InitVar breaks with typing.Optional

2019-10-10 Thread Samuel Colvin
Change by Samuel Colvin : -- pull_requests: +16288 pull_request: https://github.com/python/cpython/pull/16702 ___ Python tracker <https://bugs.python.org/issue38

[issue38431] dataclasses.InitVar breaks with typing.Optional

2019-10-10 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch pull_requests: +16286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16700 ___ Python tracker <https://bugs.python.org/issu

[issue38431] dataclasses.InitVar breaks with typing.Optional

2019-10-10 Thread Samuel Colvin
Samuel Colvin added the comment: This is a bug with the `__repr__` method on `InitVar`. I'm working on a PR now. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38431] dataclasses.InitVar breaks with typing.Optional

2019-10-10 Thread Samuel Colvin
New submission from Samuel Colvin : The following code works fine with python 3.7 but breaks with 3.8: ``` import dataclasses from typing import Optional @dataclasses.dataclass class TestingDataclass: base_path: dataclasses.InitVar[Optional[str]] = None ``` Exception traceback

[issue22240] argparse support for "python -m module" in help

2019-10-04 Thread Samuel Marks
Samuel Marks added the comment: See https://bugs.python.org/msg353987 for manual test -- Added file: https://bugs.python.org/file48643/prog-module-name-handler.patch ___ Python tracker <https://bugs.python.org/issue22

[issue22240] argparse support for "python -m module" in help

2019-10-04 Thread Samuel Marks
Samuel Marks added the comment: Until this is accepted, I've modified my codebase: ``` from argparse import ArgumentParser ArgumentParser( prog=None if globals().get('__spec__') is None else 'python -m {}'.format(__spec__.name.partition('.')[0]) ) ``` -- nosy: +samuelmarks

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-09-24 Thread Samuel Freilich
Change by Samuel Freilich : -- keywords: +patch pull_requests: +15942 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/16361 ___ Python tracker <https://bugs.python.org/issu

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

2019-09-21 Thread Srinivasan Samuel
Srinivasan Samuel added the comment: Thanks Ammar for your time, service and reply. It was really helpful. I learned some thing more.God Bless you.Srinivasan Samuel On Saturday, September 21, 2019, 10:50:32 PM GMT+5:30, Ammar Askar wrote: Ammar Askar added the comment: Check out

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

2019-09-21 Thread Srinivasan Samuel
New submission from Srinivasan Samuel : Here is the my direct cut & paste from my Python 3.7.3 Shell >>> C = 2*[[]] >>> C [[], []] >>> >>> M = [[],[]] >>> M [[], []] >>> >>> C == M True >>> >>> M[0].app

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-09-12 Thread Samuel Freilich
Samuel Freilich added the comment: Check out my PR, which solves a much smaller issue: It fixes a bug in the exception raising logic in assert_has_calls (and _awaits) which makes complicated problems like the one you mention much harder to debug. Also it has tests

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-09-11 Thread Samuel Freilich
Samuel Freilich added the comment: Sure, but the bug in error-handling should still be fixed. Currently, if _call_matcher returns an exception, that's ignored by assert_has_calls, and the error message generated as a result is extremely misleading

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-09-11 Thread Samuel Freilich
Change by Samuel Freilich : -- pull_requests: +15630 pull_request: https://github.com/python/cpython/pull/16005 ___ Python tracker <https://bugs.python.org/issue36

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-09-11 Thread Samuel Freilich
Samuel Freilich added the comment: This is still not totally fixed. This solves the underlying error with method specs, but not the bug that was causing the error-swallowing in assert_has_calls: https://github.com/python/cpython/blob/ee536b2020b1f0baad1286dbd4345e13870324af/Lib/unittest

Re: [poliastro-dev] ANN: poliastro 0.13.0 released 

2019-08-10 Thread Samuel Lelièvre
Le mar. 6 août 2019 à 08:33, Samuel Dupree a écrit : > Juan Luis Cano, > > When will poliastro ver. 0.13.0 become available from Anaconda? At the > time of this note, only ver. 0.12.0 is available. > > Lastly what is the recommended procedure to update poliastro from vers.

Re: [poliastro-dev] ANN: poliastro 0.13.0 released 

2019-08-07 Thread Samuel Lelièvre
Le mar. 6 août 2019 à 08:33, Samuel Dupree a écrit : > Juan Luis Cano, > > When will poliastro ver. 0.13.0 become available from Anaconda? At the > time of this note, only ver. 0.12.0 is available. > > Lastly what is the recommended procedure to update poliastro from vers.

Re: [poliastro-dev] ANN: poliastro 0.13.0 released 

2019-08-06 Thread Samuel Dupree
Juan Luis Cano, When will poliastro ver. 0.13.0 become available from Anaconda? At the time of this note, only ver. 0.12.0 is available. Lastly what is the recommended procedure to update poliastro from vers. 0.12.0 to 0.13.0? Sam Dupree On August/05/2019 16:48:37, Juan Luis Cano wrote:

[issue37744] thread native id support for GNU/Hurd

2019-08-01 Thread Samuel Thibault
New submission from Samuel Thibault : Hello, Here is a patch to add thread native ID support for GNU/Hurd. Samuel -- components: Interpreter Core files: hurd_thread_native_id.diff keywords: patch messages: 348879 nosy: samuel-thibault priority: normal severity: normal status: open

[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Samuel Freilich
New submission from Samuel Freilich : Currently, it's an error to call the stop() method of a patcher object created by mock.patch repeatedly: >>> patch = mock.patch.object(Foo, 'BAR', 'x') >>> patch.start() 'x' >>> patch.stop() >>> patch.stop() RuntimeErr

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Samuel GIFFARD
Samuel GIFFARD added the comment: I've created a similar ticket on mypy side: https://github.com/python/mypy/issues/6383 as I'm not sure where this belongs to. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Samuel GIFFARD
New submission from Samuel GIFFARD : Some modules cannot be found with mypy. And cannot be silenced/skipped by mypy. Have the following 3 files: ## # example1.py from asyncio import BaseEventLoop # Module 'asyncio' has no attribute 'BaseEventLoop' from asyncio

[issue35844] Calling `Multiprocessing.Queue.close()` too quickly causes intermittent failure (BrokenPipeError)

2019-01-28 Thread Samuel Grayson
New submission from Samuel Grayson : If all processes try to close the Queue immediately after someone has written to it, this causes [an error][1] (see the link for more details). Uncommenting any of the `time.sleep`s makes it work consistently again. import multiprocessing import

[issue35837] smtpd PureProxy breaks on mail_options keyword argument

2019-01-27 Thread Samuel Colvin
Samuel Colvin added the comment: Hi, did you see https://bugs.python.org/issue35788#msg334155 later in the issue? -- ___ Python tracker <https://bugs.python.org/issue35

[issue35800] remove smtpd.MailmanProxy

2019-01-25 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch, patch, patch pull_requests: +11494, 11495, 11496 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35800] remove smtpd.MailmanProxy

2019-01-25 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch, patch pull_requests: +11494, 11495 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35800] remove smtpd.MailmanProxy

2019-01-25 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch pull_requests: +11494 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35800> ___ ___ Py

[issue35800] remove smtpd.MailmanProxy

2019-01-22 Thread Samuel Colvin
Samuel Colvin added the comment: Ok, if I create a PR, should it just remove MailmanProxy completely or mark it as deprecated in the docs to be removed in 3.9? Personally, I think it should be ok to remove it completely since it hasn't been working at all for the last 4 minor versions

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-21 Thread Samuel Colvin
Samuel Colvin added the comment: Great, https://bugs.python.org/issue35799 and https://bugs.python.org/issue35800 created. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35800] remove smtpd.MailmanProxy

2019-01-21 Thread Samuel Colvin
New submission from Samuel Colvin : smtpd.MailmanProxy is completely broken, it takes the wrong arguments but also assumes the existence of a "Mailman" module which doesn't exist. It should be removed in 3.8 or 3.9. Created from https://bugs.python.org/issue35788 Happy to c

[issue35799] fix or remove smtpd.PureProxy

2019-01-21 Thread Samuel Colvin
New submission from Samuel Colvin : smtpd.PureProxy.process_message is defined to not receive the extra kwargs which it is called with. It also expects "data" to be str when it's actually bytes. PureProxy should either be removed for fixed. Personally, I think it should be fixed

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-21 Thread Samuel Colvin
Samuel Colvin added the comment: Ok. Thanks for your explanation. Makes sense. -- ___ Python tracker <https://bugs.python.org/issue35788> ___ ___ Python-bug

  1   2   3   4   >