[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
anthony shaw added the comment: Thanks! I didn't realise it applied the negative operator instead of loading the constant value. -- ___ Python tracker ___ ___

[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: Not a bug, this is due to operator precedence. It is documented under the power operator: https://docs.python.org/3/reference/expressions.html#the-power-operator and in the operator precedence table: https://docs.python.org/3/reference/expressions.html#ope

[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread Tim Peters
Tim Peters added the comment: The binary power operator (`**`) has higher precedence than the unary negation operator (`-`). That is, -x**y groups as -(x**y). Not a bug - that's how it was designed and how it's documented. Note that this isn't novel, either. For example, to give just one ex

[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
Change by anthony shaw : -- title: Const unfolding in parser with negative numbers doesn't match float/int behaviour -> Const folding in parser with negative numbers doesn't match float/int behaviour ___ Python tracker

[issue44692] Const unfolding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
New submission from anthony shaw : Powers with negative bases do not observe the same rules that float_pow/long_pow do when it comes to returning negative results/ Example: > -2 ** 2 -4 >>> x = -2 >>> y = 2 >>> x ** y 4 >>> -2. ** 2. -4.0 >>> x = -2. >>> y = 2. >>> x ** y 4.0 Tested on 3.8

[issue44588] Possible double Py_XDECREF in cpython typeobject.c

2021-07-20 Thread Ziyue Jiang
Ziyue Jiang added the comment: Thanks for replying. I did fix my code by adding Py_TPFLAGS_DEFAULT. It's okay. I just think the behavior is a little strange when I don't set the default flag, thus adding this issue. -- ___ Python tracker

[issue44611] CPython uses deprecated randomness API

2021-07-20 Thread Dong-hee Na
Dong-hee Na added the comment: @tim.peters Can you please take a look at GH-27168? I would like to get your review before merging this PR :) -- ___ Python tracker ___ ___

[issue44691] bug in interactions between argparse and random

2021-07-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: args.seed if args.seed else SEED is not doing what you think it is doing. SEED is an *int* but args.seed is a *str*: >>> random.seed(6385845682483836956) >>> random.randint(10, 500) 92 >>> random.seed('6385845682483836956') >>> random.randint(10, 500) 347 -

[issue44691] bug in interactions between argparse and random

2021-07-20 Thread pierpaolo paolucci
New submission from pierpaolo paolucci : Python 3.9.6 (default, Jun 28 2021, 11:30:47) [GCC 10.3.0] on linux I tried to run the first time a prg and successively reproduce eventals error see the attachment -- components: Library (Lib) files: testRandom.py messages: 397918 nosy: peebl

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-07-20 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +25818 pull_request: https://github.com/python/cpython/pull/27273 ___ Python tracker ___ ___

[issue44690] Adopt binacii.a2b_base64's strict mode in base64.b64decode

2021-07-20 Thread Idan Moral
Change by Idan Moral : -- keywords: +patch pull_requests: +25817 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27272 ___ Python tracker ___ _

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-20 Thread Zachary Ware
Change by Zachary Ware : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44690] Adopt binacii.a2b_base64's strict mode in base64.b64decode

2021-07-20 Thread Idan Moral
New submission from Idan Moral : This is a follow-up PR to GH-24402. Currently, *base64.b64decode* uses a generic regex to validate *s* (when *validate* is true), which sometimes results in unexpected behavior and exception messages. Example: (1)base64.b64decode('ab==', validate=True) #

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-20 Thread Tobias Bergkvist
New submission from Tobias Bergkvist : Python-binaries compiled on either Big Sur or Catalina - and moved to the other MacOS-version will not work as expected when code depends on ctypes.util.find_library. Example symptom of this issue: https://github.com/jupyterlab/jupyterlab/issues/9863 I

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Even if this doesn't cover all cases it seems that everyone else is going with this solution for what I can see, and currently this looks suboptimal on python because we get this wrong on the vast majority of cases so my suggestion is to try to fix th

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Ammar Askar
Ammar Askar added the comment: Indeed, and the unicode_width package seems to implement the wcwidth algorithm: * https://github.com/unicode-rs/unicode-width/blob/master/src/tables.rs#L39-L48 * https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c https://bugs.python.org/issue12568 is an issue from th

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Eric V. Smith
Eric V. Smith added the comment: I think we'd be better off adding a doc parameter to dataclasses.field, and then as @terry.reedy says, modify inspect.getdoc and maybe_finddoc to look in __dataclass_fields__, if it exists. -- versions: +Python 3.11 -Python 3.10 _

[issue44688] [sqlite3] Remove ASCII limitation from sqlite3.Connection.create_collation()

2021-07-20 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The sqlite3.Connection.create_collation() function limits collation names to ASCII characters only. As sqlite3_create_collation_v2() (and sqlite3_create_collation()) support UTF8, there is no need for this limitation anymore. See https://github.com/pyt

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: They seem to be checking the unicode width as we are proposing here. Check the calls to unicode_width::UnicodeWidthChar::width: https://github.com/rust-lang/rust/blob/master/compiler/rustc_errors/src/emitter.rs#L729-L733 -- __

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In bpo this looks bad, but test this small program yourself and check the error in your terminal: fn test(number: String) -> () { println!("Hello, world: {}", number); } fn main() { test("hellooo: 🥳 😏 😒 😞 😔 some emojis"); } -- __

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I don't know, seems that rust can deal with this just fine: ❯ cargo run Compiling rtest v0.1.0 (/home/pablogsal/rtest) error[E0308]: mismatched types --> src/main.rs:7:10 | 7 | test("hellooo: 🥳 😏 😒 😞 😔 some emojis"); | ^^

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25815 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27271 ___ Python tracker ___

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: John-Mark: yep, it's just a draft patch for now. It doesn't need to be two lines; it can be updated to start with an empty dict and perhaps use a shorter special name for the doc dict and then you can do: f1:int = 1 FDOC['f1'] = 'foo' f2:str = 'a' FDOC['f2'

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-07-20 Thread liquidpele
New submission from liquidpele : reecepeg@3c22fb7d6b37 Pulpmill % python3 --version Python 3.9.1 When buffering a small file, calling peek() can read in the entire underlying thing and close it, so then following with a read() throws an error about the file being closed already even though p

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I will push a fix today -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +pablogsal stage: resolved -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44686] use pkgutil.resolve_name in unittest.mock

2021-07-20 Thread Thomas Grainger
New submission from Thomas Grainger : per https://bugs.python.org/issue12915 pkgutil.resolve_name was added for use in mock and other stdlib modules: > pydoc has locate and resolve, packaging has util.resolve_name, unittest has > something else, etc. -- messages: 397905 nosy: grainge

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 1c5c9c89ffc36875afaf4c3cc6a716d4bd089bbf by Łukasz Langa in branch '3.9': [3.9] bpo-44566: resolve differences between asynccontextmanager and contextmanager (GH-27024). (#27269) https://github.com/python/cpython/commit/1c5c9c89ffc36875afaf4c3cc6a

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 68b4690b010d0006e9b0235903afd367191f3c51 by Miss Islington (bot) in branch '3.10': bpo-44566: resolve differences between asynccontextmanager and contextmanager (GH-27024) (#27266) https://github.com/python/cpython/commit/68b4690b010d0006e9b023590

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Thanks for reporting Jakub, and for patching Gregory! -- ___ Python tracker ___ ___ Python-bugs-l

[issue44539] Support recognizing JPEG files without JFIF or Exif markers

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Mohamad! ✨ 🍰 ✨ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue44539] Support recognizing JPEG files without JFIF or Exif markers

2021-07-20 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44539] Support recognizing JPEG files without JFIF or Exif markers

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 3b56b3b97d91e2b412ce1b2bcaddcd43ef3d223b by Mohamad Mansour in branch 'main': bpo-44539: Support recognizing JPEG files without JFIF or Exif markers (GH-26964) https://github.com/python/cpython/commit/3b56b3b97d91e2b412ce1b2bcaddcd43ef3d223b ---

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
miss-islington added the comment: New changeset 574da4633b44b4048f74c93da496ed2a3ead99dd by Miss Islington (bot) in branch '3.10': [3.10] bpo-43219: skip Solaris in the test as well (GH-27257) (GH-27268) https://github.com/python/cpython/commit/574da4633b44b4048f74c93da496ed2a3ead99dd -

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
miss-islington added the comment: New changeset dae4928dd07109db69e090b1c8193a023ce695cd by Miss Islington (bot) in branch '3.9': [3.9] bpo-43219: skip Solaris in the test as well (GH-27257) (GH-27267) https://github.com/python/cpython/commit/dae4928dd07109db69e090b1c8193a023ce695cd ---

[issue42414] unable to document fields of dataclass

2021-07-20 Thread John-Mark Gurney
John-Mark Gurney added the comment: So, just looked at the patch, but it's missing the documentation part of it. Also, yes, you can add the doc as another line, but now that's two lines (yes, you can add semicolons to make it one line, but that might surprise some people). I do request that

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +25813 pull_request: https://github.com/python/cpython/pull/27269 ___ Python tracker ___ _

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: John-Mark: each fields doc can be added to the dictionary separately though.. -- ___ Python tracker ___ _

[issue42414] unable to document fields of dataclass

2021-07-20 Thread John-Mark Gurney
John-Mark Gurney added the comment: Though this suggestion does work, I am not a fan of this solution. The issue is that it separates the doc from the definition. This works well if you have only a field fields in the class, But if you get 10-20+ fields, it moves away the docs and makes it

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +25812 pull_request: https://github.com/python/cpython/pull/27268 ___ Python tracker ___ __

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 6564656495d456a1bcc1aaa06abfc696209f37b2 by Jakub Kulík in branch 'main': bpo-43219: skip Solaris in the test as well (GH-27257) https://github.com/python/cpython/commit/6564656495d456a1bcc1aaa06abfc696209f37b2 -- ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +25811 pull_request: https://github.com/python/cpython/pull/27267 ___ Python tracker ___ __

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +25810 pull_request: https://github.com/python/cpython/pull/27266 ___ Python tracker _

[issue44566] StopIteration subclass suppressed by contextlib.contextmanager

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7f1c330da31c54e028dceaf3610877914c2a4497 by Thomas Grainger in branch 'main': bpo-44566: resolve differences between asynccontextmanager and contextmanager (#27024) https://github.com/python/cpython/commit/7f1c330da31c54e028dceaf3610877914c2a4497

[issue44539] Support recognizing JPEG files without JFIF or Exif markers

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: When JFIF and Exif markers are removed, what we're left with is a "raw" JPEG file. I added a raw equivalent of Lib/test/imghdrdata/python.jpg by running: $ exiftool -all= python.jpg -o python-raw.jpg Mohamad's patch correctly adds support for such files. In fa

[issue44683] Can't subscript objects with the string "1" using str.format()

2021-07-20 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is a "feature" of str.format. If it looks like a number, it's converted to a number, else it's used as a string. It's generally the most useful way to interpret subscripts, but as you note it doesn't handle all cases. -- nosy: +eric.smith re

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've put up a simple PoC PR adding a __field_doc__ optional dict attr to dataclass, which would add the docs to class docstring: @dataclass class A: __field_doc__ = dict(num='number of widgets', total='total widgets') total: int num: int = 5 print

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 4.0 -> 5.0 pull_requests: +25809 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/27265 ___ Python tracker

[issue44631] Refactoring the repr() of the _Environ class (os module)

2021-07-20 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44631] Refactoring the repr() of the _Environ class (os module)

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 85fa3b6b7c11897732fedc443db0e4e8e380c8f8 by Leonardo Freua in branch 'main': bpo-44631: Make the repr() of the _Environ class more readable. (#27128) https://github.com/python/cpython/commit/85fa3b6b7c11897732fedc443db0e4e8e380c8f8 -- __

[issue44684] Docs for mock.call

2021-07-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > A call object is either a tuple of (positional args, keyword args) or (name, > positional args, keyword args) depending on how it was constructed https://github.com/python/cpython/pull/11807 added support for args and kwargs from python 3.9. So I

[issue44353] PEP 604 NewType

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9ae5ba7dbf08d56a1b30d67fcde75532fe136d77 by Miss Islington (bot) in branch '3.10': bpo-44353: Add test to cover __or__ of two NewType (GH-27259) (#27261) https://github.com/python/cpython/commit/9ae5ba7dbf08d56a1b30d67fcde75532fe136d77 --

[issue44683] Can't subscript objects with the string "1" using str.format()

2021-07-20 Thread Dennis Sweeney
Change by Dennis Sweeney : -- title: String formatting -> Can't subscript objects with the string "1" using str.format() ___ Python tracker ___ ___

[issue44685] Email package issue with Outlook msg files

2021-07-20 Thread Heghine
New submission from Heghine : The email package has an issue with extracting the attachments from the email if the email is sent with the Outlook application with .msg files. When I'm sending an email from the Outlook app by attaching .msg files to the email, the recipient receives the email

[issue38091] Import deadlock detection causes deadlock

2021-07-20 Thread Victor Zhestkov
Victor Zhestkov added the comment: I ported the fix from https://github.com/python/cpython/commit/6daa37fd42c5d5300172728e8b4de74fe0b319fc for 3.6 and 3.8 shipped with SLE 15SP2 and openSUSE Tumbleweed, but it seems that this fix doesn't help. I have a deadlocks on running `salt-api` process

[issue44683] String formatting

2021-07-20 Thread Dennis Sweeney
Dennis Sweeney added the comment: If I understand correctly, this shows the behavior you're objecting to: >>> class A: ... def __getitem__(self, key): ... print(f"{key = }") ... return "apple" ... ... >>> '{0[1]}'.format(A()) # passes an integer key = 1 'apple' >>> '{

[issue44588] Possible double Py_XDECREF in cpython typeobject.c

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +25808 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27260 ___ Python tracker ___ __

[issue44353] PEP 604 NewType

2021-07-20 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- pull_requests: +25807 pull_request: https://github.com/python/cpython/pull/27262 ___ Python tracker ___ _

[issue43950] Include column offsets for bytecode instructions

2021-07-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset fbc349ff790c21f1a59af939d42033470790c530 by Batuhan Taskaya in branch 'main': bpo-43950: Distinguish errors happening on character offset decoding (GH-27217) https://github.com/python/cpython/commit/fbc349ff790c21f1a59af939d42033470790c53

[issue44353] PEP 604 NewType

2021-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +25806 pull_request: https://github.com/python/cpython/pull/27261 ___ Python tracker ___ __

[issue44353] PEP 604 NewType

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c2f33dfc83ab270412bf243fb21f724037effa1a by Miss Islington (bot) in branch '3.10': bpo-44353: Refactor typing.NewType into callable class (GH-27250) (#27258) https://github.com/python/cpython/commit/c2f33dfc83ab270412bf243fb21f724037effa1a --

[issue44353] PEP 604 NewType

2021-07-20 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Jelle thanks for pointing this out, I will implement helper function in C and use it as a __call__ method for NewType -- ___ Python tracker ___

[issue44353] PEP 604 NewType

2021-07-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I found that replacing __call__ on the NewType class with an identity function written in C makes things faster instead: In [54]: %timeit ntc2(1) 79 ns ± 0.37 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) In [55]: %timeit ntc(1) 126 ns ± 0.315

[issue44353] PEP 604 NewType

2021-07-20 Thread Guido van Rossum
Guido van Rossum added the comment: OTOH, for 3.10 the clock is ticking. Let's go for it. (If it's deemed too slow, we could eventually add an accelerator just for this.) -- ___ Python tracker _

[issue44353] PEP 604 NewType

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: > Hm, 20% isn't so bad, but one of the arguments for NewType was that it > "disappears" at runtime -- which the current version does, but the > class-based version doesn't quite. NewType was described originally in https://github.com/python/typing/issues/189 a

[issue44353] PEP 604 NewType

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4868b94c6089d457673b1ba5b5b64c2f38c435af by Yurii Karabas in branch 'main': bpo-44353: Add test to cover __or__ of two NewType (#27259) https://github.com/python/cpython/commit/4868b94c6089d457673b1ba5b5b64c2f38c435af --

[issue44588] Possible double Py_XDECREF in cpython typeobject.c

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: Please use Py_TPFLAGS_DEFAULT when creating objects. Do you have a reason to not do it? The flag Py_TPFLAGS_HAVE_VERSION_TAG is unneeded and Python should not check for it. There's bpo-42747 open for that already; I sent a PR for it. -- nosy: +petr.

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +25805 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27260 ___ Python tracker ___ __

[issue44684] Docs for mock.call

2021-07-20 Thread Thomas Guettler
New submission from Thomas Guettler : The docs for `mock.call` could get improved: https://docs.python.org/3/library/unittest.mock.html#call Up to now it is not clear how to access individual members of the call. Example: I want to check if the call used the kwarg "foo" with the value of "ba

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: The bit cannot be repurposed, since older extensions using the stable ABI might set it. It doesn't make much sense to remove the Py_TPFLAGS_HAVE_VERSION_TAG or Py_TPFLAGS_HAVE_FINALIZE defines; I'd let them stay to document that the bits are reserved. --

[issue42085] Add dedicated slot for sending values

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: Py_TPFLAGS_HAVE_AM_SEND is unnecessary and I'd like to remove it. It is not possible for type objects to have a different layout than the interpreter: - extensions using the regular ABI must be recompiled for each feature version of Python - extensions using

[issue40263] ValueError exception on _winapi.WaitForMultipleObjects

2021-07-20 Thread Christian Fersch
Christian Fersch added the comment: This is still an issue in python3.9. It just hit us while using the default config on a Threadripper 3990X that has 128 logical cores: with concurrent.futures.ProcessPoolExecutor() as executor: -- nosy: +Chronial versions: +Python 3.9 __

[issue44353] PEP 604 NewType

2021-07-20 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- pull_requests: +25804 pull_request: https://github.com/python/cpython/pull/27259 ___ Python tracker ___ _

[issue44663] Possible bug in datetime utc

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- components: +Library (Lib) -C API ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43334] venv does not install libpython

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: A venv does *not* create a replica of a python installation directory. Files shared with the main Python installation are not copied nor linked. This goes for the standard library, as well as the libraries and headers. (*Executables* are an exception; they're

[issue44353] PEP 604 NewType

2021-07-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +25803 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27258 ___ Python tracker _

[issue44353] PEP 604 NewType

2021-07-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 965dd76e9060e27e2253ba8c8d21a142b178720d by Yurii Karabas in branch 'main': bpo-44353: Refactor typing.NewType into callable class (GH-27250) https://github.com/python/cpython/commit/965dd76e9060e27e2253ba8c8d21a142b178720d -- nosy: +luka

[issue44683] String formatting

2021-07-20 Thread Mykyta
Change by Mykyta : Removed file: https://bugs.python.org/file50166/1.png ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43629] fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother.

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: The public function that calls _PyRun_SimpleFileObject is PyRun_SimpleStringFlags, and the behavior is as specified in its documentation: "Executes the Python source code from command in the __main__ module according to the flags argument. If __main__ does no

[issue44683] String formatting

2021-07-20 Thread Mykyta
New submission from Mykyta : The formatting does not work correctly. I have a dict with string representations of integers as keys, such as {'1': 'a'} and trying to format it this way: '{0[1]}' and KeyError occurs. But I think it should not as '{0[a]}'.format(a) works properly with a = {'a':

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Finalise establishing sqlite3 global state (GH-27155) https://github.com/python/cpython/commit/4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9 --

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Jakub Kulik
Change by Jakub Kulik : -- pull_requests: +25802 pull_request: https://github.com/python/cpython/pull/27257 ___ Python tracker ___ _

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Jakub Kulik
Jakub Kulik added the comment: On Solaris (I checked this on Oracle and SmartOS), the error is: NotADirectoryError: [Errno 20] Not a directory: 'not_a_dir/' which I think belongs to the 'errors are not confusing' category with Windows and macOS. -- nosy: +kulikjak ___

[issue44621] Python 3.9 traces async for/else incorrectly

2021-07-20 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-20 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +25801 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27256 ___ Python tracker _

[issue44621] Python 3.9 traces async for/else incorrectly

2021-07-20 Thread Mark Shannon
Mark Shannon added the comment: Not quite trivial, but simple enough :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44621] Python 3.9 traces async for/else incorrectly

2021-07-20 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +25800 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27255 ___ Python tracker ___ ___

[issue44681] time.sleep(0.001) not working properly

2021-07-20 Thread Eryk Sun
Eryk Sun added the comment: The implementation of time.sleep() uses WaitForSingleObjectEx() on the main thread. It waits for an event object that gets signaled by Ctrl+C. On other threads it simply calls Sleep(). Thread wait functions such as WaitForSingleObjectEx() and Sleep() are based on

[issue31426] [3.5] crash in gen_traverse(): gi_frame.ob_type=NULL, called by subtract_refs() during a GC collection

2021-07-20 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44621] Python 3.9 traces async for/else incorrectly

2021-07-20 Thread Mark Shannon
Mark Shannon added the comment: We can fix this for 3.9. The fix to 3.10 was trivial and should port easily. -- ___ Python tracker ___

[issue14739] Add PyArg_Parse format unit like O& but providing context

2021-07-20 Thread Irit Katriel
Irit Katriel added the comment: Now we have exception chaining, so Serhiy's pattern is even simpler to implement than with exception wrappers. -- nosy: +iritkatriel ___ Python tracker __

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-20 Thread Piotr Tokarski
Piotr Tokarski added the comment: I think changing `(?P["\']).*?(?P=quote)` to `(?P["\'])[^\n]*?(?P=quote)` in all regexes does the trick, doesn't it? -- ___ Python tracker _

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-20 Thread Piotr Tokarski
Piotr Tokarski added the comment: Test sample: ``` import csv from io import StringIO def csv_text(): return StringIO("a|b\nc| 'd\ne|' f") with csv_text() as input_file: print('The following text is going to be parsed:') print(input_file.read()) print() with csv_text() as

[issue31426] [3.5] crash in gen_traverse(): gi_frame.ob_type=NULL, called by subtract_refs() during a GC collection

2021-07-20 Thread Victor Zhestkov
Change by Victor Zhestkov : Added file: https://bugs.python.org/file50165/gbd-bt-brief.txt ___ Python tracker ___ ___ Python-bugs-list maili

[issue31426] [3.5] crash in gen_traverse(): gi_frame.ob_type=NULL, called by subtract_refs() during a GC collection

2021-07-20 Thread Victor Zhestkov
Change by Victor Zhestkov : Added file: https://bugs.python.org/file50164/py-bt.txt ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31426] [3.5] crash in gen_traverse(): gi_frame.ob_type=NULL, called by subtract_refs() during a GC collection

2021-07-20 Thread Victor Zhestkov
Victor Zhestkov added the comment: It seems I have the same segfault, but with 3.6.13 python shipped with SLE15SP2. It's salt-api process under intensive usage. I'm able to reproduce it, but can't isolate due to the service complexity. In some cases it takes about 5 minutes to be crashed, bu

[issue44681] time.sleep(0.001) not working properly

2021-07-20 Thread Thereisfood
Thereisfood added the comment: I think this is Windows 10 issue after build 1909. Because I tested on Windows 10 build 1909 is about 0.001 - 0.002 and tested on 20H2 is the attached results. -- ___ Python tracker