Re: argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Matt Wheeler
g to process --verbose, then > exit? > > Thx, > > Skip > -- > https://mail.python.org/mailman/listinfo/python-list -- Matt Wheeler http://funkyh.at -- https://mail.python.org/mailman/listinfo/python-list

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-04-03 Thread Matt Wozniski
Matt Wozniski added the comment: > My main hesitation with this name is that I suspect users may think that > `use_utc_designator` means that they *unconditionally* want to use `Z` — > without reading the documentation (which we can assume 99% of users won't do) I was thinking alon

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-03-21 Thread Matt Wozniski
Change by Matt Wozniski : -- keywords: +patch pull_requests: +30131 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32041 ___ Python tracker <https://bugs.python.org/issu

[issue46892] Async Call-Stack Reconstruction

2022-03-11 Thread Matt Page
Matt Page added the comment: Sorry for the confusion, I'm working on a PR. I filed the BPO to gauge interest in the feature. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-03-11 Thread Matt Bogosian
Change by Matt Bogosian : -- pull_requests: +29919 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/31821 ___ Python tracker <https://bugs.python.org/issu

[issue39829] __len__ called twice in the list() constructor

2022-03-07 Thread Matt Wozniski
Matt Wozniski added the comment: Pardon me for necroing an old issue, but someone pointed out the surprising behavior of `__len__` being called twice by `list(iterable)`, and it caught my curiosity. https://github.com/python/cpython/commit/372d705d958964289d762953d0a61622755f5386 made

[issue46895] Allow extensions to set a callback to be invoked when a type is modified

2022-03-01 Thread Matt Page
Change by Matt Page : -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue46895> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46898] Add API to allow extensions to set callback function on creation and destruction of PyCodeObject

2022-03-01 Thread Matt Page
New submission from Matt Page : CPython extensions providing optimized execution of Python bytecode (e.g. the Cinder JIT) may need to hook into the lifecycle of code objects to determine what to optimize or to free resources allocated for code objects that no longer exist. We propose adding

[issue46897] Add API to allow extensions to set callback function on creation, modification, and destruction of PyFunctionObject

2022-03-01 Thread Matt Page
New submission from Matt Page : CPython extensions providing optimized execution of Python bytecode (e.g. the Cinder JIT) may need to hook into the lifecycle of function objects to determine what to optimize, invalidate previously-optimized functions, or free resources allocated

[issue46895] Allow extensions to set a callback to be invoked when a type is modified

2022-03-01 Thread Matt Page
Change by Matt Page : -- title: Type-Modified Callbacks -> Allow extensions to set a callback to be invoked when a type is modified ___ Python tracker <https://bugs.python.org/issu

[issue46895] Type-Modified Callbacks

2022-03-01 Thread Matt Page
New submission from Matt Page : CPython extensions providing optimized execution of Python bytecode (e.g. the Cinder JIT), or even CPython itself (e.g. the faster-cpython project) may wish to cache access to lookups in the class hierarchy (e.g. when resolving the target of a method call

[issue46892] Async Call-Stack Reconstruction

2022-03-01 Thread Matt Page
New submission from Matt Page : Profiling tools that use the call-stack (i.e. all of them) paint an incomplete picture of what’s really going on in async-heavy codebases. They can only show the stack of the currently executing task; they miss the chain of awaitables that are transitively

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-02-11 Thread Matt Wozniski
Matt Wozniski added the comment: > I feel like "If the offset is 00:00, use Z" is the wrong rule to use > conceptually This is a really good point that I hadn't considered: `+00:00` and `Z` are semantically different, and just because a datetime has a UTC offset of 0 doesn'

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt Bogosian
Change by Matt Bogosian : -- keywords: +patch nosy: +mbogosian nosy_count: 4.0 -> 5.0 pull_requests: +29243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31061 ___ Python tracker <https://bugs.python.org/i

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt B
Matt B added the comment: Thanks, @kj! Fantastic education and insight! I'm sad that I needed you as an interpreter but very grateful you were around to provide the interpretation. Working on a patch now…. -- ___ Python tracker <ht

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt B
Matt B added the comment: I am happy to attempt a patch, but I don't understand what's going on with _ConcatenateGenericAlias. Or rather, I don't fully understand the various copy_with semantics. This code is *very* hard to follow. Patching _GenericAlias.copy_with seems relatively

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-01-30 Thread Matt B
Matt B added the comment: Filed by request: https://github.com/python/cpython/pull/26091#issuecomment-1024900261 -- ___ Python tracker <https://bugs.python.org/issue46

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-01-30 Thread Matt B
New submission from Matt B : c55ff1b352f8b82184f80d9dea220e832691acfc was submitted to fix #44098 and added the _typevar_types and _paramspec_tvars properties to _GenericAlias. However, those properties continue to be omitted from _GenericAlias.copy_with[1]. Further, typing.py is fairly

[issue42343] threading.local documentation should be on the net...

2022-01-27 Thread Matt B
Matt B added the comment: @ztane, if you are interested in trying your hand at a PR, these will be generally useful: * https://devguide.python.org/ * https://devguide.python.org/documenting/ -- ___ Python tracker <https://bugs.python.

[issue42343] threading.local documentation should be on the net...

2022-01-27 Thread Matt B
Matt B added the comment: @rhettinger, the docstring[1] alluded to in the docs is quite lengthy. Are you suggesting copying it straight across to the standard library documentation? If not, can you give (or link to) some documentation standards or other guidance on constructing a viable PR

[issue35829] datetime: parse "Z" timezone suffix in fromisoformat()

2022-01-26 Thread Matt Wozniski
Matt Wozniski added the comment: I agree with Brett. Adding `allow_z` (or perhaps `compact` or `use_utc_designator` if we're bikeshedding) as an optional keyword only argument to `.isoformat()` would allow us to keep the explanation that what `.fromisoformat()` can parse is exactly what

[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B
Matt B added the comment: Please treat this as a feature request to add the ability for pdb (and internals) to ingest sources for exec-generated code. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B
Change by Matt B : -- resolution: not a bug -> ___ Python tracker <https://bugs.python.org/issue46133> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B
Change by Matt B : -- status: closed -> open title: Unclear whether one can (or how to) provide source to exec-generated code -> Feature request: allow mechanism for creator of exec-generated code to provide source to pdb type: behavior -> en

[issue46260] Misleading SyntaxError on f-string

2022-01-05 Thread Matt Delengowski
Matt Delengowski added the comment: Hi Eric, I see what are you referring to. Like you said unintuitive but still correct. Do you think it would be worthwhile to change the order of the checking such that '}' is always first? Or could the same edge case still appear but just the other way

[issue46260] Misleading SyntaxError on f-string

2022-01-04 Thread Matt Delengowski
New submission from Matt Delengowski : Example code ``` foo = 1 f"blank (open paren {foo )" ``` Error report File "", line 1 f"blank (open paren {foo )" ^ SyntaxError: f-string: unmatched ')' The problem i

[issue46133] Unclear whether one can (or how to) provide source to exec-generated code

2021-12-19 Thread Matt B
Change by Matt B : -- components: +Library (Lib) type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issu

[issue46133] Unclear whether one can (or how to) provide source to exec-generated code

2021-12-19 Thread Matt B
New submission from Matt B : Unless I missed it, looking at https://github.com/python/cpython/blob/main/Lib/pdb.py, https://github.com/python/cpython/blob/main/Lib/inspect.py, and https://docs.python.org/3/library/pdb.html doesn't give much of a clue how to provide sources to exec-generated

[issue46050] [pathlib] Option so that OSError does not block glob in pathlib library

2021-12-11 Thread matt
New submission from matt : Hi there, ISSUE DESCRIPTION when I browse starting from the linux root ('/') path = pathlib.Path('/') _glob = '**/*' for p in path.glob(_glob): The program stops on my machine because of OSError. File "/usr/lib/python3.8/pathlib.py"

[issue34798] pprint ignores the compact parameter for dicts

2021-12-11 Thread Matt Bogosian
Matt Bogosian added the comment: Please consider highlighting that dicts are not included in the documentation. While *technically* true, this ... > compact impacts the way that long sequences (lists, tuples, sets, etc) are > formatted. If compact is false (the default) then eac

[issue45982] Bug in Error messages

2021-12-04 Thread Matt Wozniski
Matt Wozniski added the comment: > Syntactically, this could be many possible errors: missing comma, missing > period, missing parens, missing brackets, etc. Syntactically, it cannot be a missing comma. Adding the comma is a syntax error. $ python3 -c 'if datetime.now(),strftime(...)

[issue45955] Calling read() on HTTPError may cause KeyError in tempfile

2021-12-01 Thread Matt Martz
New submission from Matt Martz : HTTPError may not be fully initialized in some scenarios leading to an inconsistent interface. This is documented in code at: https://github.com/python/cpython/blob/55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0/Lib/urllib/error.py#L45-L50 Unfortunately the way

[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-11-29 Thread Matt Wozniski
Matt Wozniski added the comment: I wondered if it would be backwards compatible to make `pkgutil.get_data()` delegate to `importlib.resources.read_binary()`. It isn't, because `pkgutil.get_data()` accepts a relative path for the resource, and `importlib.resources.read_binary()` accepts only

[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-10-29 Thread Matt Wozniski
Matt Wozniski added the comment: The original case where I encountered this was with a namespace package, but the behavior appears to be the same for a subpackage of a regular package. -- title: pkgutil.get_data() doesn't add subpackages to namespaces when importing

[issue45675] pkgutil.get_data() doesn't add subpackages to namespaces when importing

2021-10-29 Thread Matt Wozniski
New submission from Matt Wozniski : If a module hasn't yet been imported, `pkgutil.get_data(pkg_name, data_file)` will import it, but when it does, it doesn't add the submodule to its parent package when the parent package is a PEP 420 implicit namespace package. ``` $ mkdir -p namespace

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread Matt Wozniski
Matt Wozniski added the comment: > "!value" or "!!value" also has the issue if I understood correctly. No, just as "value != 0" is an int, so is "!value". -- ___ Python t

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: The leftmost argument of the ternary is an int for every example that Victor and I found in the stdlib, so no casting would be required in any of these cases. -- ___ Python tracker <https://bugs.python.

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: I spotted three other uses in the stdlib: Modules/_io/_iomodule.c raw = PyObject_CallFunction(RawIO_class, "OsOO", path_or_fd, rawmode, closefd ? Py_True

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: > but there is a catch -- the arguments should be a C int Or a type that promotes to int. If you pass a C short or char, or a C++ bool, it is implicitly promoted to int. > so you will need to write "expr ? 1 : 0" Or alternatively &

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2021-09-23 Thread Matt Bogosian
Matt Bogosian added the comment: Thanks! Where's that documented? (Apologies if I missed it.) -- ___ Python tracker <https://bugs.python.org/issue40346> ___ ___

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2021-09-23 Thread Matt Bogosian
Matt Bogosian added the comment: I landed here after investigating this surprising result: # test_case.py from random import Random from typing import Sequence, Union _RandSeed = Union[None, int, Sequence[int]] class MyRandom(Random): def __init__( self, seed

[issue45043] Typo (change 'two' to 'three')

2021-08-29 Thread Matt Schuster
Matt Schuster added the comment: Yes, I meant the day of week. Ok, no problem as this is 'date of month'. Closing as 'not a bug'. Thanks!! -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue45043] Typo (change 'two' to 'three')

2021-08-29 Thread Matt Schuster
New submission from Matt Schuster : Reference https://docs.python.org/3/library/time.html?highlight=time%20time#module-time in 3.8, 3.9, 3.10, 3.11 (previous versions do not have same issue). Specifically under time.asctime([t]) and time.ctime([secs]) Change "day field is two characters

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-06-10 Thread Matt Whitlock
Matt Whitlock added the comment: Observed this same failure mode on a Raspberry Pi 1 while running 'make install' on Python 3.9.5 with 9 concurrent workers. Exception in thread Thread-1: Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-3.9.5_p2/image/us

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-03 Thread Matt Billenstein
Matt Billenstein added the comment: I have been stopping it since the initial problem - there’s something wonky with using the system python on macos afaict... M -- Matt Billenstein m...@vazor.com > On Jun 3, 2021, at 4:39 AM, STINNER Victor wrote: > >  > STINNER V

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein
Matt Billenstein added the comment: So, I'd been trying various things before the master restart and I was using python3 supplied by homebrew - I decided I didn't like that dependency and switched it back to /usr/bin/python3 as supplied by the system [1]. I did a rebuild on 325 a couple more

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein
Matt Billenstein added the comment: Hmm, yeah, it did seem to me like the server was wedged or something... glad to see it going. M -- Matt Billenstein m...@vazor.com > On Jun 2, 2021, at 6:13 PM, STINNER Victor wrote: > >  > STINNER Victor added the comment: > >&

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein
Matt Billenstein added the comment: Probably at 321 where it lost connection - I would have shut it down and wiped the buildarea. I'm not sure what's going on now, I'm walking back versions of buildbot-worker and they seem to never connect to the master... m On Wed, Jun 02, 2021 at 07:25

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein
Matt Billenstein added the comment: Hmm, digging, afaict the buildbot-worker is up and running - something on the master? I just updated my setup to use python3 instead of python2... On Wed, Jun 02, 2021 at 06:24:23PM +, Ned Deily wrote: > > Ned Deily added the comment: > >

[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein
Matt Billenstein added the comment: I rebuilt it a while ago which could have caused this - can you re-run the affected build? thx m On Wed, Jun 02, 2021 at 06:08:16PM +, Ned Deily wrote: > > Ned Deily added the comment: > > I can't reproduce that failure with that chec

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Matt Harrison
Matt Harrison added the comment: And by "if your model is in the correct layout", I meant "if your data is in the correct layout" -- ___ Python tracker <https://bug

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Matt Harrison
Matt Harrison added the comment: The ML world has collapsed on the terms X and y. (With that capitalization). Moreover, most (Python libraries) follow the interface of scikit-learn [0]. Training a model looks like this: model = LinearRegression() model.fit(X, y) After

Re: Not found in the documentation

2021-04-29 Thread Matt Wheeler
, 6, 7, 8, 9] ``` range objects are iterables, not iterators. We can see the consuming behaviour I think you are referring to by calling iter(): ``` >>> i = iter(r) >>> next(i) 0 >>> list(i) [1, 2, 3, 4, 5, 6, 7, 8, 9] ``` -- Matt Wheeler http://funkyh.at -- https://mail.python.org/mailman/listinfo/python-list

Re: Code Formatter Questions

2021-03-29 Thread Matt Wheeler
> On 29 Mar 2021, at 04:45, Cameron Simpson wrote: > > yapf has many tunings. Worth a look. It is my preferred formatter. By > comparison, black is both opinionated and has basicly no tuning, > something I greatly dislike. This is not a mark or a vote against yapf (I’ve never used it), but

[issue43572] "Too many open files" on macOS buildbot

2021-03-20 Thread Matt Billenstein
Matt Billenstein added the comment: Ah, word, was looking at stdout -- 256 is pretty low, raised it to 200k... -- ___ Python tracker <https://bugs.python.org/issue43

[issue43572] "Too many open files" on macOS buildbot

2021-03-20 Thread Matt Billenstein
Matt Billenstein added the comment: In any case - I've raised file/process limits on the buildbot. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43572] "Too many open files" on macOS buildbot

2021-03-20 Thread Matt Billenstein
Matt Billenstein added the comment: I don't see that error message - where are you seeing it? -- ___ Python tracker <https://bugs.python.org/issue43572> ___ ___

[ANN] PyYAML-5.4.1 Released

2021-01-20 Thread Matt Davis
: https://github.com/yaml/pyyaml description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistence, pickle] ``` Maintainers === The following people are currently responsible for maintaining PyYAML: * Ingy döt Net * Matt Davis and many thanks

[ANN] PyYAML-5.4.1 Released

2021-01-20 Thread Matt Davis
: https://github.com/yaml/pyyaml description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistence, pickle] ``` Maintainers === The following people are currently responsible for maintaining PyYAML: * Ingy döt Net * Matt Davis and many thanks

[ANN] PyYAML-5.4 Released

2021-01-19 Thread Matt Davis
} >>> print(yaml.dump(_)) name: PyYAML homepage: https://github.com/yaml/pyyaml description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistence, pickle] ``` Maintainers === The following people are currently responsible for maintain

[ANN] PyYAML-5.4 Released

2021-01-19 Thread Matt Davis
} >>> print(yaml.dump(_)) name: PyYAML homepage: https://github.com/yaml/pyyaml description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistence, pickle] ``` Maintainers === The following people are currently responsible for maintain

[ANN] PyYAML-5.4b1: Linux and Mac users, please test wheels!

2021-01-14 Thread Matt Davis
[YAML, serialization, configuration, persistence, pickle] Maintainers === The following people are currently responsible for maintaining PyYAML: * Ingy döt Net * Matt Davis and many thanks to all who have contribributed! See: https://github.com/yaml/pyyaml/pulls Copyright =

[ANN] PyYAML-5.4b1: Linux and Mac users, please test wheels!

2021-01-13 Thread Matt Davis
[YAML, serialization, configuration, persistence, pickle] Maintainers === The following people are currently responsible for maintaining PyYAML: * Ingy döt Net * Matt Davis and many thanks to all who have contribributed! See: https://github.com/yaml/pyyaml/pulls Copyright =

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Matt Wheeler
On 29 Dec 2020, 14:48 +, Chris Green , wrote: > I seem to have quite a lot of old python packages installed over the > years using pip and would like, if I can. to clear some of them out. > > > Is there any way to tell if a python package was installed by me > directly using pip or was

[issue42703] Asyncio Event Documentation Links Incorrect

2020-12-21 Thread Matt Fowler
Change by Matt Fowler : -- keywords: +patch pull_requests: +22741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23881 ___ Python tracker <https://bugs.python.org/issu

[issue42703] Asyncio Event Documentation Links Incorrect

2020-12-21 Thread Matt Fowler
New submission from Matt Fowler : The documentation for `asyncio.Event` has incorrect links. The `wait` coroutine incorrectly links to the docs for the `asyncio.wait` waiting primitive, and the `set` method incorrectly links to the docs for the `set` class constructor. -- assignee

[issue17140] Document multiprocessing.pool.ThreadPool

2020-12-16 Thread Matt Wozniski
Change by Matt Wozniski : -- keywords: +patch nosy: +godlygeek nosy_count: 7.0 -> 8.0 pull_requests: +22673 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23812 ___ Python tracker <https://bugs.p

Re: dict.get(key, default) evaluates default even if key exists

2020-12-15 Thread Matt Ruffalo
On 15/12/20 15:26, Grant Edwards wrote: > On 2020-12-15, Mark Polesky via Python-list wrote: > >> I see. Perhaps counterintuitive, > I guess that depends on what programming language you normally think > in. Python's handling of function parameters is exactly what I > expected, because all of the

Re: list of dictionaries search using kwargs

2020-12-07 Thread Matt Wheeler
for item in self.data:     if all(item[k] == v for k,v in kwargs.items()):         return item Or return [item for item in self.data if all(item[k] == v for k,v in kwargs.items())] to return all matches Beware though that either of these will be slow if your list of dicts is large. If the

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner
Matt Joiner added the comment: I do not think so. mypy has the same issue. The ByteString type does not include the methods shared by all its implementations. I already linked to this in https://bugs.python.org/msg375553. I also showed that mypy doesn't work in my last comment

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner
Matt Joiner added the comment: $ pyright hex.py stubPath /Users/anacrolix/src/dht-scraper/typings is not a valid directory. Assuming Python platform Darwin Searching for source files Found 1 source file /Users/anacrolix/src/dht-scraper/hex.py 3:9 - error: Cannot access member "hex"

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner
Change by Matt Joiner : Added file: https://bugs.python.org/file49423/hex.py ___ Python tracker <https://bugs.python.org/issue41564> ___ ___ Python-bugs-list mailin

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2020-08-17 Thread Matt Prahl
Change by Matt Prahl : -- nosy: +mprahl nosy_count: 7.0 -> 8.0 pull_requests: +21025 pull_request: https://github.com/python/cpython/pull/21909 ___ Python tracker <https://bugs.python.org/issu

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-17 Thread Matt Joiner
Matt Joiner added the comment: https://github.com/python/cpython/blob/48b069a003ba6c684a9ba78493fbbec5e89f10b8/Lib/_collections_abc.py#L953 https://github.com/python/cpython/blob/0e95bbf08571e98f4b688524efc2dcf20d315d91/Lib/typing.py#L1612 -- status: pending -> o

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-16 Thread Matt Joiner
New submission from Matt Joiner : I get this error when running pyright for a type of typing.ByteString. All the implementations of ByteString (bytes, bytearray, memoryview) have the hex method, so this seems unexpected? -- components: Library (Lib) messages: 375523 nosy: anacrolix

Re: How to remove "" from starting of a string if provided by the user

2020-08-12 Thread Matt Wheeler
On Tue, 11 Aug 2020, 02:20 Ganesh Pal, wrote: > The possible value of stat['server2'] can be either (a) > "'/fileno_100.txt'" or (b) '/fileno_100.txt' . > > How do I check if it the value was (a) i.e string started and ended > with a quote , so that I can use ast.literal_eval() > BAFP > def

Re: How to turn a defaultdict into a normal dict.

2020-06-16 Thread Matt Wheeler
t; >>> from collections import defaultdict > >>> d = defaultdict(list) > >>> d["x"] > [] > >>> d.default_factory = None > >>> d["y"] > Traceback (most recent call last): > File "", line 1, in > KeyE

[issue40879] Strange regex cycle

2020-06-05 Thread Matt Miller
New submission from Matt Miller : I was evaluating a few regular expressions for parsing URL. One such expression (https://daringfireball.net/2010/07/improved_regex_for_matching_urls) causes the `re.Pattern` to exhibit some strange behavior (notice the stripped characters in the `repr

[issue38894] Path.glob() sometimes misses files that match

2020-03-06 Thread Matt Wozniski
Matt Wozniski added the comment: A simple test case for this issue: ~>mkdir tmp ~>cd tmp tmp>touch 1.txt tmp>ln -s subdir/file 2.txt tmp>touch 3.txt tmp>ls -l total 0 -rw-rw-r-- 1 mwoznisk general 0 Mar 6 14:52 1.txt lrwxrwxrwx 1 mwoznisk general 11 Mar 6 14:52 2.txt -&g

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-25 Thread Matt Kokotovich
Change by Matt Kokotovich : -- pull_requests: +17573 pull_request: https://github.com/python/cpython/pull/18190 ___ Python tracker <https://bugs.python.org/issue39

Re: Threading

2020-01-24 Thread Matt
> Not quite. > > 1. Create a list of threads. > > 2. Put the items into a _queue_, not a list. > > 3. Start the threads. > > 4. Iterate over the list of threads, using .join() on each. > > If you're going to start the threads before you've put all of the items > into the queue, you can also put a

Re: Threading

2020-01-24 Thread Matt
"Creating Threads..." port = 80 for i in range(1, 10): t = threading.Thread(target=start_test) t.start() print "Waiting on Threads..." t.join() print "Finished..." On Fri, Jan 24, 2020 at 2:44 PM Chris Angelico wrote: > > On Sat, Jan 25, 2020 at 7:3

Re: Threading

2020-01-24 Thread Matt
that be thread safe? On Fri, Jan 24, 2020 at 2:44 PM Chris Angelico wrote: > > On Sat, Jan 25, 2020 at 7:35 AM Matt wrote: > > > > I am using this example for threading in Python: > > > > from threading import Thread > > > > def start_test( address, port ): &

Threading

2020-01-24 Thread Matt
I am using this example for threading in Python: from threading import Thread def start_test( address, port ): print address, port sleep(1) for line in big_list: t = Thread(target=start_test, args=(line, 80)) t.start() But say big_list has thousands of items and I only want to

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-22 Thread Matt Kokotovich
Matt Kokotovich added the comment: I'd love to see this issue resolved, as it is keeping me from being able to switch to 3.8. I have a PR with Karthikeyan's suggestion, as I agree it makes more sense and could apply to more cases: https://github.com/python/cpython/pull/18116

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-20 Thread Matt Kokotovich
Change by Matt Kokotovich : -- nosy: +mkokotovich ___ Python tracker <https://bugs.python.org/issue39082> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39021] multiprocessing is_alive() between children processes

2019-12-10 Thread Matt
New submission from Matt : I'm trying to evaluate process' state between two "sibling" processes (processes created by the same parent process); using the .is_alive() and exitcode to evaluate whether a process has been init'd, started, finished successfully or unsuccessfully. The

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Matt McEwen
Matt McEwen added the comment: My interpretation of issue 24018 was that the Generator ABC was trying to follow the PEP as much as possible, so that users were able to produce a custom generator object and have it behave just like a builtin generator object. I know that subclassing

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Matt McEwen
New submission from Matt McEwen : The Generator ABC in the standard library lets users define objects that follow the Generator specification given in PEP342, and which can be used in the place of builtin generator objects. This was originally added in issue 24018 The ABC enforces

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

2019-10-26 Thread Matt Ward
Matt Ward added the comment: You're welcome! On Fri, Oct 25, 2019 at 10:53 PM Ammar Askar wrote: > > Ammar Askar added the comment: > > Thank you for the report Matt! > > -- > nosy: +ammar2 > resolution: -> fixed > stage: patch review ->

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

2019-10-22 Thread Matt Ward
New submission from Matt Ward : The 3.8 documentation still includes the text. ```Note that in Python, unlike C, assignment cannot occur inside expressions. C programmers may grumble about this, but it avoids a common class of problems encountered in C programs: typing = in an expression

Re: issue with regular expressions

2019-10-22 Thread Matt Wheeler
On Tue, 22 Oct 2019, 09:44 joseph pareti, wrote: > the following code ends in an exception: > > import re > pattern = 'Sottoscrizione unica soluzione' > mylines = []# Declare an empty list. with open ('tmp.txt', 'rt') as myfile: # Open tmp.txt for reading

[issue13322] The io module doesn't support non-blocking files

2019-10-10 Thread Matt Joiner
Change by Matt Joiner : -- nosy: -anacrolix ___ Python tracker <https://bugs.python.org/issue13322> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-09-20 Thread Matt
Matt added the comment: I will close this issue and post in one of the two places you linked. Thank you for your prompt reply and affirmation of my observations. I feel my language was colored by frustration, yet you focused instead on my willingness to help. I appreciate that and find

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

2019-09-20 Thread Matt
New submission from Matt : * Problem: Documentation search results favor tutorials and over language specifications * How to reproduce: I often forget simple syntax. For example, say I want to raise an exception. Clearly, I need to search for "raise". 1. Go to https://docs.

[issue37870] os.path.ismount returns false for disconnected CIFS mounts in Linux

2019-08-15 Thread Matt Christopher
New submission from Matt Christopher : I've got a case where we mount a CIFS filesystem and then later the actual backing filesystem is deleted (but the mount remains on the machine). When running from a shell, this is the behavior which I see after the backing CIFS filesystem has gone away

Re: Python string with character exchange

2019-07-15 Thread Matt Zand
Thanks Reto. I got it now. Matt On Sun, Jul 14, 2019 at 2:26 PM Reto wrote: > On Sun, Jul 14, 2019 at 12:20:56PM -0400, Matt Zand wrote: > > Given a string, return a new string where the first and last chars have > > been exchanged. > > This sounds awfully like a homework

Python string with character exchange

2019-07-14 Thread Matt Zand
I am new to Python. I am trying to solve below Python question: Given a string, return a new string where the first and last chars have been exchanged. -- Cheers, Matt Zand Cell: 202-420-9192 Work: 240-200-6131 High School Technology Services <https://myhsts.org/> DC Web Makers

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-09 Thread Matt Martz
New submission from Matt Martz : The behavior of how SSL certificate validation is handled was changed in https://bugs.python.org/issue31399 This introduced a new exception, ssl.SSLCertVerificationError, which is raised for any certificate validation error, instead of the previous exception

[issue36738] Add 'array_hook' for json module

2019-04-27 Thread matt farrugia
Change by matt farrugia : -- keywords: +patch pull_requests: +12906 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36738> ___ ___ Py

  1   2   3   4   5   6   7   8   9   10   >