[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Marco
New submission from Marco : Hello, a pyrelp module was released to send messages over RELP to a RELP server, such as rsylog: https://github.com/mathias-nyman/pyrelp https://github.com/rsyslog/librelp It should be very useful the possibility to add this feature as a logging handler. A

[issue39628] msg.walk memory leak?

2020-02-13 Thread Marco
New submission from Marco : Hello, if I write ``` msg = email.message_from_bytes(...) for part in msg.walk(): content_type = part.get_content_type() if not part.get_content_maintype() == 'multipart': filename = part.get_filename(None) attachment = part.get_payload(d

[issue39628] msg.walk memory leak?

2020-02-21 Thread Marco
Marco added the comment: uhm, no. I can no more reproduce this. I was wrong. Sorry for the noise. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue6070] Pyhon 2.6 makes .pyc/.pyo bytecode files executable

2009-05-24 Thread Marco
Marco added the comment: I attach a patch to correct this little bug. Bye ;) -- nosy: +markon Added file: http://bugs.python.org/file14049/import_patch.c ___ Python tracker <http://bugs.python.org/issue6

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-24 Thread Marco
Marco added the comment: It seems Python is using a default mask to compile modules. If you open a file b.py as "r", and you import it from a.py, you can see that b.pyc is: -rwxr-xr-x 1 marco marco9 24 mag 16:17 a.py -r--r--r-- 1 marco marco 10 24 mag 16:17 b.py -rw-r--r-- 1 m

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-25 Thread Marco
Marco added the comment: TO georg.brandl: I remembered that Windows wasn't POSIX compliant, but...I thought they used the same sys/stat.h constants. I was wrong :P TO loewis: ok, I've added a new patch. Since I've never written any code for Windows, can you check if it works

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-25 Thread Marco
Changes by Marco : Removed file: http://bugs.python.org/file14069/import_patch2.patch ___ Python tracker <http://bugs.python.org/issue6070> ___ ___ Python-bugs-list mailin

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-25 Thread Marco
Changes by Marco : Added file: http://bugs.python.org/file14070/import_patch2.patch ___ Python tracker <http://bugs.python.org/issue6070> ___ ___ Python-bugs-list mailin

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco
Marco added the comment: TO loewis: this new patch works fine. I've removed the first #endif. thank you ;) -- Added file: http://bugs.python.org/file14072/import_patch2.patch ___ Python tracker <http://bugs.python.org/i

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco
Changes by Marco : Removed file: http://bugs.python.org/file14049/import_patch.c ___ Python tracker <http://bugs.python.org/issue6070> ___ ___ Python-bugs-list mailin

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco
Changes by Marco : Removed file: http://bugs.python.org/file14070/import_patch2.patch ___ Python tracker <http://bugs.python.org/issue6070> ___ ___ Python-bugs-list mailin

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-26 Thread Marco
Marco added the comment: Which version are you using? I've seen the source code of import.c (2.5 and 2.6) and it seems that in the 2.6 some bugfixes/features have been added. However, I've just used the version 2.7 and it works fine (as 2.6, since they have the same code (at least i

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-26 Thread Marco
Marco added the comment: TO pdsimanyi: chmod it's not appropriate to change the permissions as you made: 0666 et voilà. However, I don't understand if it can be a problem since you're using Cygwin (and Bash under Windows) or not. I think this because Windows is not POSIX comp

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-06-22 Thread Marco
Marco added the comment: hmm.. the problem is that Windows doesn't support well permissions as all the other POSIX compliant OSs ... I've searched for a solution on the web, and I've found a complete answer on: http://stackoverflow.com/questions/592448/c-how-to-set-file-pe

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-06-23 Thread Marco
Marco added the comment: Thank you David.. sorry for my errors :) but this is my first patch :P I've recompiled py2.6 and it works fine on my Debian. As you can see: -rwxr-xr-x 1 marco marco81822 30 set 2008 setup.py ./python -c "import setup" -rw-r--r-- 1 marco marco

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-06-26 Thread Marco
Marco added the comment: Thank you for your report :P Otherwise I really didn't know how solve it, thank you :P However, on *NIX-like systems it can work well; but can someone try it on Windows? Since I know that only NTFS (and versions >= XP) supports permissions, if a user have a F

[issue29685] test_gdb failed

2017-03-01 Thread Marco
New submission from Marco: make test output studio@linux:~/Python-3.6.0> ./python -m test -v test_gdb == CPython 3.6.0 (default, Mar 1 2017, 15:51:48) [GCC 4.8.5] == Linux-4.4.49-16-default-x86_64-with-SuSE-42.2-x86_64 little-endian == hash algorithm: siphash24 64bit == cwd: /home/stu

[issue26953] Failed building wheel for greenlet

2016-05-04 Thread Marco
Changes by Marco : -- components: Installation nosy: marcoconte_008 priority: normal severity: normal status: open title: Failed building wheel for greenlet versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue26

[issue26953] Failed building wheel for greenlet

2016-05-04 Thread Marco
New submission from Marco: I have tried to install bpython on Linux with this result studio@linux:/usr/bin> pip install bpython ... ... Running setup.py bdist_wheel for greenlet ... error greenlet.h:8:20: fatal error: Python.h: No such file or directory #incl

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Marco Pagliaricci
Marco Pagliaricci added the comment: Andrew, many thanks for your time, solving this issue. I think your solution is the best to fix this little problem and I agree with you on backporting. My Best Regards, and thanks again. Marco On Thu, Feb 17, 2022 at 10:29 AM Andrew Svetlov wrote

[issue13254] maildir.items() broken

2011-10-24 Thread marco ghidinelli
New submission from marco ghidinelli : since python 2.7.2 maildir.items() doesn't return anything: >>> from mailbox import Maildir >>> x = Maildir('test') >>> x.items() [] untils something was written on the maildir. >>> x.add('b

[issue13254] maildir.items() broken

2011-10-24 Thread marco ghidinelli
marco ghidinelli added the comment: i verified now, and the 2.7.1 version is ok, the bug is present since the 2.7.2 -- ___ Python tracker <http://bugs.python.org/issue13

[issue13254] maildir.items() broken

2011-10-24 Thread marco ghidinelli
marco ghidinelli added the comment: 3.1 is ok 3.2.2 is affected -- ___ Python tracker <http://bugs.python.org/issue13254> ___ ___ Python-bugs-list mailin

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
New submission from Marco Scataglini : The IDLE shell sys.path does not contains any entry for the Current Working Directory ('' or '.' or '.\'); without it, when changing the CWD with os.chdir(), the shell cannot find, execute or import scripts or module in

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
Changes by Marco Scataglini : -- nosy: +kbk ___ Python tracker <http://bugs.python.org/issue13506> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
Marco Scataglini added the comment: ... I think it could be fixed by adding sys.path.insert(0,"") on the # process sys.argv and sys.path: section in PyShell.py after (~about) line 1383 sys.path.insert(0, dir) sys.path.insert(0,"")<HE

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-04 Thread Marco Scataglini
Marco Scataglini added the comment: At first I did no see the difference on preserving the existing correct behavior and fixing the issue between the two patches... and I thought less is more, so mine was better... But, I checked again and by: "... running a python script will have sys

[issue2057] difflib: add patch capability

2011-12-05 Thread Marco Scataglini
Marco Scataglini added the comment: I agree with Anatoly that it should be an easy way to create and apply Unified Diff Patches within Python. Also issue 2142 should get fixed, as proposed, but also include the fix at least on 2.7 not only on 3.x -- nosy: +marco

[issue13586] Replace selected not working/consistent with find

2011-12-11 Thread Marco Scataglini
New submission from Marco Scataglini : Entering the Replace dialog (by ctrl+h or from Edit/Replace... menu) with a selection does not auto-magically have the selected text in the find field. This is not consistent with the other find functions (ctrl+f: Find...; alt+F3: Find in Files...; ctrl

[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-16 Thread Marco Scataglini
Marco Scataglini added the comment: Win 7 Pro 32bit. -- ___ Python tracker <http://bugs.python.org/issue13586> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-17 Thread Marco Scataglini
Marco Scataglini added the comment: To check on 3.2 I installed a fresh Python 3.2.1.1 on Win7 x86 32bit and it has the same problem. So this issues is valid on 2.7.2.1 and 3.2.1.1 I --dry-run Roger patch on both 2.7 and 3.2 with no errors or warnings messages and after patching it fixes the

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-17 Thread Marco Scataglini
Marco Scataglini added the comment: I test Roger patch on 2.7.2.1 and 3.2.1.1 fresh installs on Win7 Pro 32bit and I confirm it is fixing the issue and it also keeps the existing correct behavior. - Note: - I had to apply the patch with GNU patch: Tortoise is not patching my local

[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-17 Thread Marco Scataglini
Marco Scataglini added the comment: To follow on Terry thought, I think find dialog box should stay open when 'Find' button is pressed, since there is a 'close' button to close it. That would also be a more accepted behavior similar to all the other editors I know. An

[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2011-12-18 Thread Marco Scataglini
New submission from Marco Scataglini : Found text does not show at all highlighted on some text colors (like green and orange) when using the find button in the replace dialog box when box is open/visible. Then when dialog box is closed it will highlight the found text in black on gray like

[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-18 Thread Marco Scataglini
Marco Scataglini added the comment: Thank you Roger find_keep_open.patch works, but now that brings me to issue13630 that I thought was existing, and now this confirms it. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2011-12-20 Thread Marco Scataglini
Marco Scataglini added the comment: Well I checked 'SearchBar' IDLE extension and is not bad... has some minor bugs, nothing major just very very minor quirky behavior, but nothing that seems to impair functionality AFAIK. It should be cleaned up and added to release in place of th

[issue13654] IDLE: Freezes and/or crash on SyntaxWarning... is used prior to global declaration

2011-12-22 Thread Marco Scataglini
New submission from Marco Scataglini : Writing the following code in the IDLE module/scriptneditor and then running it (F5) will momentarily freeze without giving the expected warning message ("SyntaxWarning: name 'GLOBAL1' is used prior to global declaration") and it

[issue9830] Python 2.7 x64 not properly installed on Windows 7 (registry)

2010-09-11 Thread Marco Buccini
New submission from Marco Buccini : I've just installed Python 2.7 x86-64, on my 64-bit Windows 7, then I've tried to install some packages - such as setuptools and pyside - but a message during the installation said something like "Cannot find Python2.7 in the windows regi

[issue8639] Allow callable objects in inspect.getargspec

2010-09-16 Thread Marco Mariani
Marco Mariani added the comment: I second this, I depend on this monkeypatch for my turbogears projects, where I use callable objects as error handlers: def getargspec(func): if getattr(func, '__call__') and not isfunction(func) and not ismethod(func): f

[issue8398] Modules with a dot in the filename don't load

2010-04-14 Thread marco stamazza
New submission from marco stamazza : On my windows Xp system running Python 2.6 (from the (x,y) package) I tried to load a module named "GetMy.com_MOD.py". I kept receiving the error Traceback (most recent call last): File "D:\Docs\Futures-Strategy\StCHF\Test\GetMy.com_2.

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2022-04-08 Thread Marco Barisione
Marco Barisione added the comment: This is particularly annoying if you are using `Annotated` with a dataclass. For instance: ``` from __future__ import annotations import dataclasses from typing import Annotated, get_type_hints @dataclasses.dataclass class C: v: Annotated[int, &quo

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2022-04-08 Thread Marco Barisione
Marco Barisione added the comment: Actually, sorry I realise I can pass `include_extras` to `get_type_hints`. Still, it would be nicer not to have to do that. -- ___ Python tracker <https://bugs.python.org/issue39

[issue37587] JSON loads performance improvement for long strings

2019-08-15 Thread Marco Paolini
Marco Paolini added the comment: I also confirm Inada's patch further improves performance! All my previous benchmarks were done with gcc and PGO optimizations performed only with test_json task... maybe this explains the weird results? I tested the performance of new m

[issue37587] JSON loads performance improvement for long strings

2019-08-15 Thread Marco Paolini
Marco Paolini added the comment: also worth noting escape sequences for non-ascii characters are slower, even when encoded length is the same. python -m pyperf timeit -s 'import json;' -s 'c = "€"; s = json.dumps(c * (2**10 // len(json.dumps(c)) - 2))' 

[issue37587] JSON loads performance improvement for long strings

2019-08-15 Thread Marco Paolini
Marco Paolini added the comment: ops sorry here's the right commands python -m pyperf timeit -s 'import json;' -s 'c = "a"; s = json.dumps(c * (2**10 // (len(json.dumps(c)) - 2)))' 'json.loads(s)' -o ascii2k.json python -m pyperf timeit -s '

[issue37587] JSON loads performance improvement for long strings

2019-08-15 Thread Marco Paolini
Marco Paolini added the comment: ujson (https://github.com/esnme/ultrajson) instead is faster when decoding non-ascii in the same example above, so it is likely there is room for improvement... -- ___ Python tracker <https://bugs.python.

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-21 Thread Marco Sulla
Marco Sulla added the comment: @scoder: 1. the fact that == does not traverse the Element is IMHO unpythonic and non-standard. A trivial example: >>> a = {1: {2: 3}} >>> b = {1: {2: 3}} >>> a == b True You can have a dictionary complicated as you want, but if th

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-21 Thread Marco Sulla
Marco Sulla added the comment: @rhettinger: "Deprecating [...] just cause disruption to existing, deployed code" How? Deprecating is used just to maintain intact the already existing code... "Please do not go down of the path of making yourself the arbiter of what is Pytho

[issue37918] What about an enum for open() modes?

2019-08-22 Thread Marco Sulla
New submission from Marco Sulla : As title. I just created it: https://pastebin.com/pNYezw2V I think it could be useful to have a more descriptive way to declare a file open mode. Many languages has an enum for this. Maybe open(), os.fdopen(), os.popen() and pathlib.Path.open() can just

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-22 Thread Marco Sulla
Marco Sulla added the comment: Thanks, but telling the truth: 1. I just not use SubElement, even if it's more convenient. I just create an Element and I append to the parent one. It's much more clear IMHO 2. I do not use `fromstring` and all its friends. It was just a sugges

[issue37918] What about an enum for open() modes?

2019-08-28 Thread Marco Sulla
Marco Sulla added the comment: Mh. No one is interested? -- ___ Python tracker <https://bugs.python.org/issue37918> ___ ___ Python-bugs-list mailing list Unsub

[issue37918] What about an enum for open() modes?

2019-08-29 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, but this is not a bug report, but a feature request. Indeed there's the possibility to submit also enhancements, not only bugs, as in all bug reporting board worthy of respect. You see the Type select with "Enhancement"

[issue37918] What about an enum for open() modes?

2019-08-30 Thread Marco Sulla
Marco Sulla added the comment: Well, I'll discuss it in python-ideas. Let me do the testament before... :D @serhiy.storchaka thank you for the StrEnum tip, but no PyPi package please. It has no sense to add an addional package only for having an enum that should be built-in as in all

[issue37918] What about an enum for open() modes?

2019-08-30 Thread Marco Sulla
Marco Sulla added the comment: @vstinner Note that I wrote about os.fdopen(), not os.open(). -- ___ Python tracker <https://bugs.python.org/issue37918> ___ ___

[issue36232] Improve error message on dbm.open

2019-09-25 Thread Marco Rougeth
Change by Marco Rougeth : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36232> ___ ___ Python-bugs-list

[issue38569] Unknown distribution option: 'license_files'

2019-10-23 Thread Marco Sulla
New submission from Marco Sulla : I tried to add to `setuptools.setup()` the argument license_files. It works, but I get this warning: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'license_files' I suppose the warning can

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth
New submission from Marco Rougeth : The translation of the Python docs for Brazilian Portuguese is at around 20%. The Brazilian community have been working hard on it for the past 2 years, and as discussed with Julien, we believe this is a good moment to add the pt-br language switcher

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth
Change by Marco Rougeth : -- keywords: +patch pull_requests: +16454 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16924 ___ Python tracker <https://bugs.python.org/issu

[issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library

2019-10-30 Thread Marco Ippolito
New submission from Marco Ippolito : Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encoun

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-11-02 Thread Marco Rougeth
Change by Marco Rougeth : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38677] Arraymodule initialization error handling improvements

2019-11-03 Thread Marco Paolini
New submission from Marco Paolini : Module two-phase initialization does not report errors correctly to the import machinery -- components: Extension Modules messages: 355913 nosy: mpaolini priority: normal severity: normal status: open title: Arraymodule initialization error handling

[issue38677] Arraymodule initialization error handling improvements

2019-11-03 Thread Marco Paolini
Change by Marco Paolini : -- keywords: +patch pull_requests: +16552 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17039 ___ Python tracker <https://bugs.python.org/issu

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-06 Thread Marco Sulla
Marco Sulla added the comment: If I can say my two cents: 1. I preferred that the default behaviour of multi-line was to dedent. But breaking old code, even if for a little percentage of code, IMHO is never a good idea. Py2->Py3 should have proved it. 2. ``` remembers me too much

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Anyway there's something strange in string escaping and `inspect.cleandoc()`: >>> a = """ ... \nciao ... bello ... \ ciao ... """ >>> print(inspect.cleandoc(a)) ciao bello \ ciao >>> pri

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Excuse me for the spam, but against make it the default behavior I have a simple consideration: what will expect a person that reads the code, that doesn't know Python? IMHO it expects that the string is *exactly* like it's written. The fact that

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: When Python started to emulate the other languages? Who cares about what other languages do? Python uses `raise` instead of `throw`, even if `throw` is much more popular in the most used languages, only because `raise` in English has more sense. And IMHO a

[issue44585] csv library does not correctly interpret some files

2021-07-08 Thread Marco E.
New submission from Marco E. : The CSV library does not correctly interpret files in the following format (test.csv): "A" ,"B" ,"C" "aa","bbb","" "a" ,"bb" ,"ccc" "aaa

[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 <https://bugs.python.or

[issue44921] dict subclassing is slow

2021-08-15 Thread Marco Sulla
New submission from Marco Sulla : I asked on SO why subclassing dict makes the subclass much slower in some operations. This is the answer by Monica (https://stackoverflow.com/a/59914459/1763602): Indexing and in are slower in dict subclasses because of a bad interaction between a dict

[issue44921] dict subclassing is slow

2021-08-17 Thread Marco Sulla
Marco Sulla added the comment: Since my knowledge of this is very poor, I informed Monica about the issue. I'm quite sure that if there's a way to turn lemons into lemonade :) -- ___ Python tracker <https://bugs.python.o

[issue44921] dict subclassing is slow

2021-08-17 Thread Marco Sulla
Marco Sulla added the comment: I not finished my phrase. I'm sure that if there's a way to turn lemons into lemonade, she is **MUCH** more skilled than me to find one. -- ___ Python tracker <https://bugs.python.o

[issue44921] dict subclassing is slow

2021-08-19 Thread Marco Sulla
Marco Sulla added the comment: Since probably Monica are taking her holidays, I try to decipher her answer. Probably, the more problematic function spotted by Monica is update_one_slot. I re-quote her sentence: update_one_slot looks for the parent implementation by trying to find the

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-06 Thread Marco Pagliaricci
New submission from Marco Pagliaricci : I've spotted a little bug in how asyncio.CancelledError() exception is propagated inside an asyncio.Task. Since python 3.9 the asyncio.Task.cancel() method has a new 'msg' parameter, that will create an asyncio.CancelledError

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-09 Thread Marco Pagliaricci
Marco Pagliaricci added the comment: OK, I see your point. But I still can't understand one thing and I think it's very confusing: 1) if you see my example, inside the job() coroutine, I get correctly cancelled with an `asyncio.CancelledError` exception containing my message. 2) No

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-09 Thread Marco Pagliaricci
Marco Pagliaricci added the comment: Chris, I'm attaching to this e-mail the code I'm referring to. As you can see, in line 10, I re-raise the asyncio.CancelledError exception with a message "TEST". That message is lost, due to the reasons we've talked about. My point

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-09 Thread Marco Pagliaricci
Marco Pagliaricci added the comment: Chris, ok, I have modified the snippet of code to better show what I mean. Still here, the message of the CancelledError exception is lost, but if I comment line 10, and uncomment line 11, so I throw a ValueError("TEST"), that "TEST" st

[issue37295] Possible optimizations for math.comb()

2021-10-17 Thread Marco Cognetta
Change by Marco Cognetta : -- keywords: +patch nosy: +mcognetta nosy_count: 6.0 -> 7.0 pull_requests: +27293 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29020 ___ Python tracker <https://bugs.python.org/i

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-08 Thread Marco Sulla
New submission from Marco Sulla : Sometimes I’m lazy and I would test code copy - pasted from internet or from other sources directly in the interpreter, in interactive mode. But if the code contains completely blank lines, the copy - paste fails. For example: def f(): print("

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: Well, maybe too much feature requests in a single report. I'll report them separately, with more rationale. -- ___ Python tracker <https://bugs.python.org/is

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: Steven: currently I'm developing `frozendict` as part of CPython. About IDLE, IDLE can't be used on a server without a GUI. Furthermore, I *really* hope that IDLE is simply a GUI wrapper of REPL, with some additiona

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-10 Thread Marco Sulla
Marco Sulla added the comment: @Eryk: why a C extension apart and not a patch to `readline`? -- ___ Python tracker <https://bugs.python.org/issue38747> ___ ___

[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2019-11-11 Thread Marco Sulla
Marco Sulla added the comment: @Terry: > Jupyter Console is, I read, QT based Nope. It's shell based by default. You can open it also as a QT app, like IDLE, but by default `jupyter console` is via terminal. > they must use "‘magic’ commands" entered after the '

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: I'm in favor of a `math.total_ordering` function, but IMHO sorting functions should emit a warning if they contains an unorderable objects. This can be done easily: I suppose the sorting function checks if the objects of the iterable are minor that an

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, a little errata: > After the current object a is checked against the object b, if > `all_orderables` is true [...] must be change to > After the current object a is checked against the object b, ***if the check > returns fal

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, but have you, Dickinson and Peters, read how I propose to check if the object is orderable or not? I explained it in a very detailed way, and this does not change the float comparison. And does not need to check first if the iterable it totally

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Anyway, Java by default puts NaNs at the end of the iterable: https://onlinegdb.com/SJjuiXE0S -- ___ Python tracker <https://bugs.python.org/issue36

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: > No idea what "are minor that another object" could possibly mean. Oh my god... a < b? > I don't know what purpose would be served by checking ">=" too Well, it's very simple. Since the sorting algorithm checks if

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, I had an epiphany. NaN returns False for every comparison. So in teory any element of the iterable should result minor that NaN. So NaN should treated as the highest element, and should be at the end of the sorted result! Indeed this is the

[issue36095] Better NaN sorting.

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: marco@buzz:~$ python3.9 Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from decimal

[issue36095] Better NaN sorting.

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, ignore my previous post. -- ___ Python tracker <https://bugs.python.org/issue36095> ___ ___ Python-bugs-list mailin

[issue11986] Min/max not symmetric in presence of NaN

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: marco@buzz:~$ python3.9 Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from decimal

[issue39516] ++ does not throw a SyntaxError

2020-02-01 Thread Marco Sulla
New submission from Marco Sulla : Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1 ++ 2 3 This is probably because

[issue39516] ++ does not throw a SyntaxError

2020-02-01 Thread Marco Sulla
Marco Sulla added the comment: > This is not a bug No one said it's a bug. It's a defect. > This has been part of Python since version 1 There are many things that was part of Python 1 that was removed. > `++` should never be an operator in the future, precisely because

[issue39516] ++ does not throw a SyntaxError

2020-02-01 Thread Marco Sulla
Marco Sulla added the comment: > `++` isn't special Indeed the problem is that no error or warning is raised if two operators are consecutive, without a space between. All the cases you listed are terribly unreadable and hardly intelligible. Anyway I do not agree `++` is not

[issue39516] ++ does not throw a SyntaxError

2020-02-04 Thread Marco Sulla
Marco Sulla added the comment: > this is the sort of thing that is usually best suited to be reported by > linters, not the Python runtime. TL;DR: if you write something like `a -- b`, it's quite extraordinary that you really wanted to write this. You probably wanted to write

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : When I first done `make` to compile Python 3.9, I did not installed some debian development packages, like `uuid-dev`. So `_uuid` module was not built. After installed the debian package I re-run `make`, but it failed to build `_uuid` module. I had to edit

[issue39696] Failed to build _ssl module, but libraries was installed

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : Similarly to enhancement request #39695, I missed to install the debian package with the include files for SSL, before compiling Python 3.9. After installed it, `make` continued to not find the libraries and skipped the creation of module _ssl. Searching on

[issue39697] Failed to build with --with-cxx-main=g++-9.2.0

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : I tried to compile Python 3.9 with: CC=gcc-9.2.0 ./configure --enable-optimizations --with-lto --with-cxx-main=g++-9.2.0 make -j 2 I got this error: g++-9.2.0 -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -flto -fuse-linker-plugin

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : Python 3.9.0a3+ (heads/master-dirty:f2ee21d858, Feb 19 2020, 23:19:22) [GCC 9.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.sleep(-1

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Marco Sulla
Marco Sulla added the comment: > I recall very many cases in third-party libraries and commercial applications Source? -- ___ Python tracker <https://bugs.python.org/issu

  1   2   3   4   5   >