[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-08-05 Thread Brandt Bucher
Brandt Bucher added the comment: I’m okay with closing as “won’t fix”. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If the preference is to not support this use-case ,,, I don't really have a preference. Was just letting you know the pros and cons. I'll put together a PR with the "type(self).__lt__(self, other)" substitutions. Let me know if that is the outcome

[issue40935] Links to Python3 docs for some libs return 404

2021-08-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: It looks like all the pages listed were updated with working links to current stable release docs, so this can be closed and if somebody finds more broken links, this issue can be reopened later. -- nosy: +andrei.avk

[issue33140] shutil.chown should not be defined in Windows

2021-08-05 Thread Jack DeVries
Jack DeVries added the comment: Yes, I definitely get that, but that's what the deprecation cycle is for. Certainly hold off on a PR until we see what @steve.dower thinks. I personally feel that having a function that can be introspected with ``dir`` but which should not be used is

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-08-05 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: > We could do that and not incur performance issues. However, it would expand > the API and double the size of the code. If the preference is to not support this use-case, then I'd rather the decorator simply raise an exception and tell me this is going

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

2021-08-05 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: This makes a lot of sense now. Thank you so much for the thorough explanation Ned - and for highlighting where my assumptions were wrong! I didn’t realise I needed to specify MACOSX_DEPLOYMENT_TARGET to enable backwards compatibility. Is there a reason

[issue44846] zipfile: cannot create zip file from files with non-utf8 filenames

2021-08-05 Thread Joel Puig Rubio
New submission from Joel Puig Rubio : I'm attempting to make a script to create ZIP archives from files which filenames are encoded in Shift-JIS. However, Python seems to limit its filenames to ASCII or UTF-8, which means that attempting to archive said files will raise an exception. This is

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Glyph] > why not decide on implementation at decoration time? We could do that and not incur performance issues. However, it would expand the API and double the size of the code. We've had no other reports about this issue since total_ordering() was

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: But that's a perfectly valid filename: $ mkdir -p adl://myblob.azuredatalakestore.net/local/abc/xyz $ ls -R adl: 'adl:': myblob.azuredatalakestore.net/ 'adl:/myblob.azuredatalakestore.net': local/ 'adl:/myblob.azuredatalakestore.net/local': abc/

[issue44803] change tracemalloc.BaseFilter to an abstract class

2021-08-05 Thread Łukasz Langa
Łukasz Langa added the comment: > if you ask me, I would change all of them The problem with adopting an ABC base class for each such use case is two-fold: - it changes the MRO putting the ABCMeta metaclass in which might make existing subclasses suddenly incompatible; and - is costly in

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread miss-islington
miss-islington added the comment: New changeset 0a642d57736be6802c712bdbf2dcff39fe8a39b7 by Miss Islington (bot) in branch '3.10': bpo-44679: [doc] fix typo in unittest.mock.rst (GH-27618) https://github.com/python/cpython/commit/0a642d57736be6802c712bdbf2dcff39fe8a39b7 --

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread Mariatta
Change by Mariatta : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +26114 pull_request: https://github.com/python/cpython/pull/27620 ___ Python tracker ___

[issue33140] shutil.chown should not be defined in Windows

2021-08-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: Jack: I'm not sure if this eventual fix is worth doing.. it might cause issues for users to leave it as is, but can also cause issues to remove it even after deprecation period; I don't have a good feeling if one is more likely than the other, - so I'll

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +26113 pull_request: https://github.com/python/cpython/pull/27619 ___ Python tracker ___

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread miss-islington
miss-islington added the comment: New changeset 938e84b4fa410f1a86f5e0708ebc3af6bb8efb0e by Jack DeVries in branch 'main': bpo-44679: [doc] fix typo in unittest.mock.rst (GH-27618) https://github.com/python/cpython/commit/938e84b4fa410f1a86f5e0708ebc3af6bb8efb0e -- nosy:

[issue33140] shutil.chown should not be defined in Windows

2021-08-05 Thread Jack DeVries
Jack DeVries added the comment: I'm pretty sure the 3.11 dev cycle started since this conversation, right? Can we introduce the deprecation warning now? Maybe something like what is in the attached diff? @andrei.avk, if it turns out that the time has come, you can go ahead and take the PR

[issue44844] The command line of launching Edge on Linux hangs

2021-08-05 Thread Steve Dower
Steve Dower added the comment: Adding a new browser should be pretty easy, and it seems like that's all that is needed here. It has to go into a few places though to support each platform, and unfortunately it's only good for 3.11, and not any of the existing releases. -- keywords:

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
Manish Satwani added the comment: Thanks for the update Eric, if it is not designed to support URI it should tell to the user. It is very wired it just returns wrong data. You can detect it very well if user has specified URI or not. -- ___

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread Jack DeVries
Jack DeVries added the comment: @gaydayav I agree. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44679] unittest.mock.sentinel documentation typo

2021-08-05 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 2.0 -> 3.0 pull_requests: +26112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27618 ___ Python tracker

[issue44697] Memory leak when asyncio.open_connection raise

2021-08-05 Thread Jack DeVries
Change by Jack DeVries : -- pull_requests: -26111 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44697] Memory leak when asyncio.open_connection raise

2021-08-05 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 6.0 -> 7.0 pull_requests: +26111 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27617 ___ Python tracker

[issue44845] Allow keyword arguments in code.__new__

2021-08-05 Thread Patrick Reader
New submission from Patrick Reader : Per bpo-41263, code.__new__ now uses Argument Clinic. However, it still has a / marker which prevents the use of keyword arguments

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-05 Thread Jack DeVries
Jack DeVries added the comment: For reference, it looks like Wayback Machine has a snapshot of the old article for reference: https://web.archive.org/web/20210613191914/https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines @mark.dickinson, do you feel like that new

[issue41946] Add concrete examples to os.path documentation

2021-08-05 Thread Jack DeVries
Jack DeVries added the comment: > Some examples were added since this issue was created See bpo-35183 -- nosy: +jack__d ___ Python tracker ___

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

2021-08-05 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44835] What does "Python for Windows will still be Python for DOS" mean?

2021-08-05 Thread Steve Dower
Steve Dower added the comment: Yep, it's just a thank you and acknowledgement that was in the installer, so I brought it forward. However, we removed it a couple of versions ago (with Mark's permission). So it's certainly not an issue that needs to be addressed now ;) --

[issue44844] The command line of launching Edge on Linux hangs

2021-08-05 Thread Ray Luo
New submission from Ray Luo : Launching Chrome on Linux from command line: $ export BROWSER=google-chrome; python -m webbrowser https://httpbin.org/delay/10 It can successfully launch Chrome with the specified web page opened in a new tab. And the console command line finishes

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ken Jin. But it does not explain why objects which currently have __name__/__qualname__ is None should have these attribute. There is no builtin data type that corresponds to ClassVar, Final, Literal, Concatenate or TypeGuard. And (int | str)

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-08-05 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: > Do you all have preference for 1) expanding the range of use cases to cover > metaclasses but incurring a performance hit for common cases, or 2) leaving > it as-is and documenting that it doesn't work for metaclasses? If we do need the slow approach for

[issue41946] Add concrete examples to os.path documentation

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: If some examples are added, the should note which operating system is being used. -- ___ Python tracker ___

[issue44843] Add CLI flag to disable hash randomization

2021-08-05 Thread Filipe Laíns
New submission from Filipe Laíns : There are select use-cases where hash randomization is undesirable, having a CLI option to switch it off would be very helpful. One example would be packaging, where hash randomization will make the bytecode unreproducible. Currently, we have to set

[issue41946] Add concrete examples to os.path documentation

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Concrete examples for os.path are problematic because typical inputs and outputs vary across difference file systems. The point of os.path is to hide these differences. -- nosy: +rhettinger ___ Python tracker

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-05 Thread Ned Deily
Ned Deily added the comment: > I used brew.sh to install Python, which I think uses the universal installer As far as I know, Homebrew builds its own Python and Tk. > After I reinstall macOS, if you need further testing, i’m open to trying. Thanks. I think the next step would be to try to

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do you all have preference for 1) expanding the range of use cases to cover metaclasses but incurring a performance hit for common cases, or 2) leaving it as-is and documenting that it doesn't work for metaclasses? --

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > In particularly it allows to modify __dict__ of builtin types. This doesn't look like something that would happen accidentally. We've never had any bug reports about this occurring in the wild. [GvR] > Maybe we should not fix this then?

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread miss-islington
miss-islington added the comment: New changeset b1bd16c2528295b8b28395827f6b589dccea0624 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-44838: Refine the custom syntax errors for invalid 'if' expressions (GH-27615). (GH-27616)

[issue44818] '\t' (tab) support

2021-08-05 Thread Pooia
Pooia added the comment: Awesome, thanks! On Thu, Aug 5, 2021 at 3:14 PM Erlend E. Aasland wrote: > > Erlend E. Aasland added the comment: > > > I guess Python can't support tab > > AFAIK, it was a deliberate decision during the Python 2 => Python 3 > transition. > > > [...] it sounds Gnu

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Ken Jin
Ken Jin added the comment: @Serhiy a summary from what I understand. I hope this helps: > I am confused. Why do these objects should have __name__ and __qualname__ > attributes? What document specifies this? I don't think any doc specifies this. The docs for __name__ and __qualname__ say

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26110 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27616 ___ Python tracker ___

[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-08-05 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset f5cbea6b1b5fc39cca377c6cc93f222916015fc4 by Pablo Galindo Salgado in branch 'main': bpo-44838: Refine the custom syntax errors for invalid 'if' expressions (GH-27615)

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Opened https://github.com/python/cpython/pull/27615 -- ___ Python tracker ___ ___

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > but when you do the test to identify if an 'else' is missing, could the fact > that there is a colon instead of the expected 'else' be used to avoid > misidentifying this case? Yeah! That is what I was thinking. The key here is that the ':' is the

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +26109 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27615 ___ Python tracker

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am confusing. Why do these objects should have __name__ and __qualname__ attributes? What document specifies this? How are these attributes used? collections.abc.MutableSet and typing.MutableSet are different things. The former is a class, the latter is

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Technically this example si more or less equivalent to: [ something, blech if 42: True [Bluch]] I wonder if the better fix here is just not to raise the rule if we find a ':', which is the only token that actually makes sense after 'if'

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: pathlib is not designed to support URIs, so this behavior is not surprising. You want to use a different library, maybe urllib. -- nosy: +eric.smith ___ Python tracker

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Andre Roberge
Andre Roberge added the comment: I have no idea how the parser works ... but when you do the test to identify if an 'else' is missing, could the fact that there is a colon instead of the expected 'else' be used to avoid misidentifying this case? Note: I am keenly aware of the difficulties

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Bas van Beek
Bas van Beek added the comment: All right, the `__name__` bug fix is up at https://github.com/python/cpython/pull/27614. -- ___ Python tracker ___

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is a tricky one because the tokenizer doesn't see the enclosed parentheses because is actually closed (the second print has two ')' parentheses). This is tricky indeed because the parser is parsing the ( after the print as a group, not as a

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Bas van Beek
Change by Bas van Beek : -- pull_requests: +26108 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27614 ___ Python tracker ___

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
Manish Satwani added the comment: import pathlib p = pathlib.Path('adl://myblob.azuredatalakestore.net/local/abc/xyz') s = str(p) print(s) what you expect s to be?? There is a bug in path.Path.str(conversion to string) and it remove a slash s is

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
New submission from Manish Satwani : import pathlib p = pathlib.Path('adl://myblob.azuredatalakestore.net/local/abc/xyz') s = str(p) print(s) what you expect s to be?? There is a bug in path.Path.str(conversion to string) and it remove a slash s is

Re: Ask for help on using re

2021-08-05 Thread ast
Le 05/08/2021 à 17:11, ast a écrit : Le 05/08/2021 à 11:40, Jach Feng a écrit : I want to distinguish between numbers with/without a dot attached: text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' re.compile(r'ch \d{1,}[.]').findall(text) ['ch 1.', 'ch 23.'] re.compile(r'ch

Re: Ask for help on using re

2021-08-05 Thread ast
Le 05/08/2021 à 17:11, ast a écrit : Le 05/08/2021 à 11:40, Jach Feng a écrit : I want to distinguish between numbers with/without a dot attached: text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' re.compile(r'ch \d{1,}[.]').findall(text) ['ch 1.', 'ch 23.'] re.compile(r'ch

Re: Ask for help on using re

2021-08-05 Thread Peter Pearson
On Thu, 5 Aug 2021 02:40:30 -0700 (PDT), Jach Feng wrote: I want to distinguish between numbers with/without a dot attached: >>> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' >>> re.compile(r'ch \d{1,}[.]').findall(text) ['ch 1.', 'ch 23.'] >>> re.compile(r'ch

Re: Ask for help on using re

2021-08-05 Thread ast
Le 05/08/2021 à 11:40, Jach Feng a écrit : I want to distinguish between numbers with/without a dot attached: text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' re.compile(r'ch \d{1,}[.]').findall(text) ['ch 1.', 'ch 23.'] re.compile(r'ch \d{1,}[^.]').findall(text) ['ch 23', 'ch 4 ', 'ch 56

error from pypa build

2021-08-05 Thread Robin Becker
I'm building a pure python wheel in a python3.9 virtualenv. If I use python setup.py bdist_wheel I do get a wheel named rlextra-3.6.0-py3-none-any.whl I'm trying out building a modern python 3 only wheel so I followed instructions here

Re: Ask for help on using re

2021-08-05 Thread Neil
Jach Feng wrote: > I want to distinguish between numbers with/without a dot attached: > text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' re.compile(r'ch \d{1,}[.]').findall(text) > ['ch 1.', 'ch 23.'] re.compile(r'ch \d{1,}[^.]').findall(text) > ['ch 23', 'ch 4 ', 'ch 56 '] > >

Re: Ask for help on using re

2021-08-05 Thread Jach Feng
Neil 在 2021年8月5日 星期四下午6:36:58 [UTC+8] 的信中寫道: > Jach Feng wrote: > > I want to distinguish between numbers with/without a dot attached: > > > text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' > re.compile(r'ch \d{1,}[.]').findall(text) > > ['ch 1.', 'ch 23.'] > re.compile(r'ch

Ask for help on using re

2021-08-05 Thread Jach Feng
I want to distinguish between numbers with/without a dot attached: >>> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n' >>> re.compile(r'ch \d{1,}[.]').findall(text) ['ch 1.', 'ch 23.'] >>> re.compile(r'ch \d{1,}[^.]').findall(text) ['ch 23', 'ch 4 ', 'ch 56 '] I can guess why the 'ch 23'

[issue44814] python 3.9.6 installation installs 0 modules

2021-08-05 Thread nyizel
Change by nyizel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36424] Pickle fails on frozen dataclass that has slots

2021-08-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: This was fixed in https://github.com/python/cpython/pull/25786 , and so can be closed. -- nosy: +andrei.avk ___ Python tracker ___

[issue44841] ZipInfo crashes on filemode

2021-08-05 Thread Gabor Rakosy
New submission from Gabor Rakosy : """ ZipInfo crashes on filemode In file /usr/lib/python3.7/zipfile.py | class ZipInfo.__slots__ Does not contain keyword 'filemode'. """ import zipfile file_zip = zipfile.ZipFile("test-one-dir.zip", mode='r') res = [] info = file_zip.infolist()

[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-08-05 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3d315c311676888201f4a3576e4ee3698684a3a2 by Kirill Pinchuk in branch 'main': bpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490) https://github.com/python/cpython/commit/3d315c311676888201f4a3576e4ee3698684a3a2 --

[issue44840] Nested if/else gets phantom else trace again (3.10)

2021-08-05 Thread Sergey B Kirpichev
Change by Sergey B Kirpichev : -- nosy: +Sergey.Kirpichev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44762] getpass.getpass on Windows fallback detection is incomplete

2021-08-05 Thread Eryk Sun
Eryk Sun added the comment: The `sys.stdin is not sys.__stdin__` check is not relevant information. We need to know whether msvcrt.getwch() works and that the user should be able to type the password in the console window. sys.__stdin__ could be a file object for the NUL device, a pipe, or

[issue44840] Nested if/else gets phantom else trace again (3.10)

2021-08-05 Thread Ned Batchelder
New submission from Ned Batchelder : Note: this is very similar to https://bugs.python.org/issue42810 This was originally reported against coverage.py: https://github.com/nedbat/coveragepy/issues/1205 ---8<- import linecache, sys def trace(frame, event, arg): # The weird

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Oh, this is a difficult one. It's caused by GH-27506 that was recently added to produce better errors for things like `print('hello' if something)`, where the correct syntax is `print('hello' if something else 'hi'). This is going to have a lot of

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, Aug 05, 2021 at 12:00:31PM +, krey wrote: > @steven.daprano My suggestion was changing the names of the args, not the > order > > Current > def os.symlink(src, dst): > ln -s src dst So far so good. > Changing the names > def

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: There is no one single set of names used by `ln` that we could have chosen. Any choice we made would have annoyed some people. I strongly argue that, of all the various naming conventions in common usage (see below), Python's choice of src, dest (source,

[issue44839] Convert Python exceptions to appropriate SQLite error codes

2021-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was grown from bigmem tests for issue44822. -- ___ Python tracker ___ ___ Python-bugs-list

[issue44839] Convert Python exceptions to appropriate SQLite error codes

2021-08-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently, any exception raised in user-defined function set the general SQLITE_ERROR error which then produce sqlite3.OperationalError. For example, if the user function returns a string or bytes object larger than INT_MAX you get OperationalError, but

[issue44839] Convert Python exceptions to appropriate SQLite error codes

2021-08-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26107 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27613 ___ Python tracker

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: @eric.smith Fair enough, though the impact would probably be quite low in reality. Nobody seems to pass these args by keyword: https://github.com/search?q=%22os.symlink(src%3D%22=Code @steven.daprano My suggestion was changing the names of the args, not the order

[issue39940] Micro-optimizations to PySequence_Tuple()

2021-08-05 Thread Marco Sulla
Marco Sulla added the comment: Close it, I have no time now :-( -- resolution: -> later stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: There's really no way we'd consider breaking possibly millions of working programs to change the parameter names. I guess you could come up with some way of supporting both sets of parameter names, but I doubt we'd accept that, either. While maybe in

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Yes, we have a process: - At least one full release with a pending deprecation warning (silent by default); 3.11 is the earliest that could take place. - At least one full release with an active deprecation warning; 3.12 would be the earliest for this.

[issue21465] sqlite3 Row can return duplicate keys when using adapters

2021-08-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Closing this for now. If anyone disagrees, please reopen :) -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker

[issue20587] sqlite3 converter not being called

2021-08-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Closing as out-of-date. If anyone disagrees, please reopen :) -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Ken Jin
Ken Jin added the comment: @Bas van Beek, thanks for testing numpy on 3.10rc1 and sending that link over. I was confused about what your original question entailed. The link provided much more context :). Seems that __name__ = None unintentionally breaks things that use annotations to

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: @eric.smith Sorry for tagging this as docs, wasn't sure what to pick. I guess it should be under Library Does CPython have a process for changing arg names via deprecation warnings? -- ___ Python tracker

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Andre Roberge
New submission from Andre Roberge : Given the following code containing no if expression (only if statements): if True: print('hello' if 2: print(123)) The following traceback is generated in Python 3.10.0RC1 File "...\example.py", line 2 print('hello' ^^^

[issue44818] '\t' (tab) support

2021-08-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I guess Python can't support tab AFAIK, it was a deliberate decision during the Python 2 => Python 3 transition. > [...] it sounds Gnu nano mix spaces and tabs! You can set up GNU nano to expand tabs: $ echo "set tabstospaces" >> ~/.nanorc --

[issue44818] '\t' (tab) support

2021-08-05 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Bas van Beek
Bas van Beek added the comment: I do agree that it's nice to have a `__name__` for special forms, as they do very much behave like types even though they're strictly speaking not distinct classes. Whether we should have this feature is a distinct "problem" from its `__name__` being `None`

[issue44818] '\t' (tab) support

2021-08-05 Thread Pooia
Pooia added the comment: Got it, thanks! Erlend E. Aasland: > I'm guessing this has to do with mixing spaces and tabs when indenting code. This can be fixed in your text editor precisely! It's the problem. Thank you I guess Python can't support tab but it sounds Gnu nano mix spaces and tabs!

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: @krey: What's your suggested change? We can change neither the parameter order nor parameter names without breaking code, so that won't happen. You created this as a documentation issue. Do you have a suggested documentation change? -- nosy:

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Order of arguments for ln: ln -s SOURCE DESTINATION Order of arguments for os.symlink: os.symlink(SOURCE, DESTINATION) They are exactly the same order. > Everywhere else I've seen, arrows (or directed edges in a graph) point as > SOURCE -> TARGET

[issue44524] __name__ attribute in typing module

2021-08-05 Thread Ken Jin
Ken Jin added the comment: > This PRs herein have created a situation wherein the > `__name__`/`__qualname__` attributes of certain typing objects can be `None`. > Is this behavior intentional? The affected objects are special forms which can hold types, so Union[], TypeGuard[], and

[issue44803] change tracemalloc.BaseFilter to an abstract class

2021-08-05 Thread Anton Grübel
Anton Grübel added the comment: Even it is a private method, it is essential, when you use Snapshot.filter_traces(). Creating a Filter without implementing this method will just result in a runtime error.

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: OK, let's ignore the analogy. Everywhere else I've seen, arrows (or directed edges in a graph) point as SOURCE -> TARGET SOURCE -> DESTINATION (TARGET and DESTINATION are synonymous in this context) An example from math:

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: There is nothing wrong with saying Create a symbolic link pointing to `src` named `dst`. That is grammatically correct English. We could say "create a sym link called dst pointing to src" but they mean exactly the same thing. And given that the order

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-05 Thread Petr Viktorin
Petr Viktorin added the comment: I see that I wrote "counts" rather than "cycles" before; that line should be: The clear function is used to break reference cycles. In this case, there are no reference cycles to be broken, so it is not called. Thanks to Pablo for the review & Łukasz for

[issue44803] change tracemalloc.BaseFilter to an abstract class

2021-08-05 Thread STINNER Victor
STINNER Victor added the comment: I don't see the benefit of the PR 27527. "BaseFilter" contains "Base" in its name and its only *private* method raises NotImplementedError. Maybe my design mistake (I wrote the tracemalloc module) was to expose it in the first place. I suggest to leave the

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
New submission from krey : From: https://docs.python.org/3/library/os.html os.symlink(src, dst, target_is_directory=False, *, dir_fd=None) Create a symbolic link pointing to `src` named `dst`. It's a bit like saying find(needle, haystack) Finds `haystack` in `needle` If you look

[issue44749] LOAD_NAME not using PyObject_GetItem when globals() is a dict subclass

2021-08-05 Thread Douglas Raillard
Douglas Raillard added the comment: I ended up with a slightly different API that allows me to preemptively set some global names before the code runs in the module, so my use case sort of vanished. I don't think there is a real need of beating the dead horse here. My only suggestion on the

  1   2   >