[issue1583] Patch for signal.set_wakeup_fd

2007-12-10 Thread Adam Olsen
Adam Olsen added the comment: Guido, it looks like I can't alter the Assigned To field. You get the Nosy List instead. ;) -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1583] Patch for signal.set_wakeup_fd

2007-12-10 Thread Adam Olsen
Adam Olsen added the comment: version 2, adds to Doc/library/signal.rst. It also tweaks the set_wakeup_fd's docstring. I haven't verified that my formatting in signal.rst is correct. Specifically, the '\0' should be checked. Added file: http://bugs.python.or

[issue1583] Patch for signal.set_wakeup_fd

2007-12-11 Thread Adam Olsen
Adam Olsen added the comment: Thanks georg. Added file: http://bugs.python.org/file8925/python2.6-set_wakeup_fd3.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1583> __Index: Doc/librar

[issue1583] Patch for signal.set_wakeup_fd

2007-12-15 Thread Adam Olsen
Adam Olsen added the comment: The python API has the advantage that you can test for it at runtime, avoiding a compile-time check. I don't know if this is significant though. I don't see the big deal about a C API. All you need to do is call PyImport_ImportModule(&qu

[issue1225584] crash in gcmodule.c on python reinitialization

2007-12-15 Thread Adam Olsen
Adam Olsen added the comment: mwh, my threading patch is extensive enough and has enough overlap that I'm not intimidating by fixing this. It's low on my list of priorities though. So far my tendency is to rip out multiple interpreters, as I haven't seen what it wants to ac

[issue1635] Float patch for inf and nan on Windows (and other platforms)

2007-12-17 Thread Adam Olsen
Adam Olsen added the comment: You have: #define Py_NAN Py_HUGE_VAL * 0 I think this would be safer as: #define Py_NAN (Py_HUGE_VAL * 0) For instance, in code that may do "a / Py_NAN". Those manual string copies (*cp++ = 'n';) are ugly. Can't you use strcpy()

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Adam Olsen
Adam Olsen added the comment: Minor typo. Should be IEEE: "Return the sign of an int, long or float. On platforms with full IEE 754\n\" -- nosy: +rhamphoryncus __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1676] Fork/exec issues with Tk 8.5/Python 2.5.1 on OS X

2007-12-23 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +rhamphoryncus __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1676> __ ___ Python-bugs-list mailing list Unsubs

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-01-08 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +rhamphoryncus __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1683> __ ___ Python-bugs-list mailing list Unsubs

[issue1215] Python hang when catching a segfault

2008-01-12 Thread Adam Olsen
Adam Olsen added the comment: The warning in the documentation should be strengthened. Python simply does not and cannot support synchronously-generated signals. It is possible to send a normally synchronous signal asynchronously, such as the os.kill() Ralf mentioned, so it's theoreti

[issue1215] Python hang when catching a segfault

2008-01-14 Thread Adam Olsen
Adam Olsen added the comment: In essence, it's a weakness of the POSIX API that it doesn't distinguish synchronous from asynchronous signals. The consequences of either approach seem minor though. I cannot imagine a sane use case for catching SIGSEGV, but documentation changes

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: Is the bug avoided if you import threading first and use it instead of thread? I'd like to see thread removed in 3.0 (renamed to _thread or the like.) -- nosy: +Rhamphoryncus _ Tracker <[EMAIL PROTECTED

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: I think non-main threads should kill themselves off if they grab the interpreter lock and the interpreter is tearing down. They're about to get killed off anyway, when the process exits. PyGILState_Ensure would still be broken. It touches various things tha

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: Hrm. It seems you're right. Python needs thread-local data to determine if the GIL is held by the current thread. Thus, autoTLSkey and all that need to never be torn down. (The check could be done much more directly than the current PyThreadState_IsCu

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: PyGILState_Ensure WOULD block forever if it acquired the GIL before doing anything else. The only way to make Py_Initialize callable after Py_Finalize is to make various bits of the finalization into no-ops. For instance, it's currently impossible to unl

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: > Adam, did you notice the change on revision 59231 ? the > PyGILState_Ensure stuff should now remain valid during the > PyInterpreterState_Clear() call. That doesn't matter. PyGILState_Ensure needs to remain valid *forever*. Only once the process

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: I'm not sure I understand you, Gregory. Are arguing in favour of adding extra logic to the GIL code, or against it? I'm attaching a patch that has non-main thread exit, and it seems to fix the test case. It doesn't fix the PyGILState_Ensure problem

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +Rhamphoryncus _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1303614> _ ___ Python-bugs-list mailing list Unsubs

[issue1941] 2.6 stdlib using with statement

2008-01-26 Thread Adam Olsen
Adam Olsen added the comment: Is there a guarantee that the with-statement is safe in the face of KeyboardInterrupt? PEP 343 seems to imply it's not, using it as a reason for why we need no special handling if __exit__ fails. -- nosy: +Rhamphor

[issue1941] 2.6 stdlib using with statement

2008-01-26 Thread Adam Olsen
Adam Olsen added the comment: Yes, but there's no guarantee it will even reach the C function. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1941> __ ___

[issue1955] fix using unittest as a superclass

2008-01-28 Thread Adam Goucher
New submission from Adam Goucher: There are a couple places in unittest where 'issubclass(something, TestCase)' is used. This prevents you from organizing your test code via class hierarchies. To solve this problem, issubclass should be looking whether the object is a s

[issue2001] Pydoc interactive browsing enhancement

2008-02-02 Thread Ron Adam
New submission from Ron Adam: This patch removes the gui tk control panel and replaces it with a navigation bar on the served web pages. This offers a nicer user experience because one no longer needs to jump back and forth between windows. The navbar supports getting specific modules

[issue2001] Pydoc interactive browsing enhancement

2008-02-04 Thread Ron Adam
Changes by Ron Adam: -- versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2001> __ ___ Python-bugs-list mailing list Unsubs

[issue1722344] Thread shutdown exception in Thread.notify()

2008-02-05 Thread Adam Olsen
Adam Olsen added the comment: Py_Main calls WaitForThreadShutdown before calling Py_Finalize, which should wait for all these threads to finish shutting down before it starts wiping their globals. However, if SystemExit is raised (such as via sys.exit()), Py_Exit is called, and it directly

[issue1722344] Thread shutdown exception in Thread.notify()

2008-02-05 Thread Adam Olsen
Adam Olsen added the comment: To put it another way: SystemExit turns non-daemon threads into daemon threads. This is clearly wrong. Brent, could you reopen the bug? _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/iss

[issue1722344] Thread shutdown exception in Thread.notify()

2008-02-05 Thread Adam Olsen
Adam Olsen added the comment: I disagree. sys.exit() attempts to gracefully shutdown the interpreter, invoking try/finally blocks and the like. If you want to truly force shutdown you should use os.abort() or os._exit(). Note that, as python doesn't call a main function, you have t

[issue2001] Pydoc interactive browsing enhancement

2008-02-12 Thread Ron Adam
Ron Adam added the comment: Added a topics and keywords index choices to the navbar. This gives the web interface the same functionality as the cli interface. Fixed the -p option which I had missed. Added file: http://bugs.python.org/file9423/pydocnotk.diff

[issue2001] Pydoc interactive browsing enhancement

2008-02-17 Thread Ron Adam
Ron Adam added the comment: Remade the diff with correct directory name so it patches correctly. Is there a way to add the patch keyword? Added file: http://bugs.python.org/file9448/pydocnotk.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: The original bug is not whether or not python reuses int objects, but rather that an existing optimization disappears under certain circumstances. Something is breaking our optimization. The later cases where the optimization is simply g

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Unless someone has a legitimate use case for disabling small_int that doesn't involve debugging (which I really doubt), I'd just assume it's always in use. __ Tracker <[EMAIL PROTECTED]&

[issue902061] pydoc insists upon producing file: URLs

2008-04-13 Thread Ron Adam
Ron Adam <[EMAIL PROTECTED]> added the comment: The following patch also fixes this along with other improvements. Maybe someone can review it. http://bugs.python.org/issue2001 -- nosy: +ron_adam Tracker <[EMAIL PROTECTED]> <http://

[issue1722344] Thread shutdown exception in Thread.notify()

2008-05-01 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: This bug was introduced by r53249, which was fixing bug #1566280. Fixed by moving the WaitForThreadShutdown call into Py_Finalize, so all shutdown paths use it. I also tweaked the name to follow local helper function conventions. Martin,

[issue1722344] Thread shutdown exception in Thread.notify()

2008-05-01 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Oh, and the patch includes a testcase. The current test_threading.py doesn't work with older versions, but a freestanding version of this testcase passes in 2.1 to 2.4, fails in 2.5 and trunk, and passes wit

[issue2778] set_swap_bodies is unsafe

2008-05-06 Thread Adam Olsen
New submission from Adam Olsen <[EMAIL PROTECTED]>: set_swap_bodies() is used to cheaply create a frozenset from a set, which is then used for lookups within a set. It does this by creating a temporary empty frozenset, swapping its contents with the original set, doing the lookup usi

[issue1348] httplib closes socket, then tries to read from it

2008-05-07 Thread Adam Olsen
Changes by Adam Olsen <[EMAIL PROTECTED]>: -- nosy: +Rhamphoryncus __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1348> __ ___ Python-bugs

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Cleaned up version of Amaury's patch. I stop releasing the GIL after sys.exitfunc is called, which protects threads from the ensuing teardown. I also grab the import lock (and never release it). This should prevent the nasty issue

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: The intended use is unsafe. contains, remove, and discard all use it for a lookup, which can't be fixed. Upon further inspection, intersection_update is fine. Only a temporary set (not frozenset!) is given junk, which I don't

[issue2787] Patch to flush unittest output

2008-05-07 Thread Adam Olsen
New submission from Adam Olsen <[EMAIL PROTECTED]>: In 3.0, unittest's output has become line buffered. Instead of printing the test name when it starts a test, then "ok" when it finishes, the test name is delayed until the "ok" is printed. This makes it unnece

[issue2787] Patch to flush unittest output

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Hrm, this behaviour exists in trunk as well. I must be confused about the cause (but the patch still fixes it.) __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: I decided not to wait. Here's a patch. Several of set's unit tests covered the auto-conversion, so I've modified them. -- keywords: +patch Added file: http://bugs.python.org/file1021

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: PEP 218 explicitly dropped auto-conversion as a feature. Why should this be an exception? __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2778] set_swap_bodies is unsafe

2008-05-08 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: I've been unable to find any discussion on this feature. If anything, I think when PEP 218 was discussed and accepted (and PEP 351 rejected), the assumption was it didn't exist. Adding it now should be regarded as a new feature

[issue2778] set_swap_bodies is unsafe

2008-05-08 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Nevermind that the current implementation *is* broken, even if you consider fixing it to be a low priority. Closing the report with a doc tweak isn't right. __ Tracker <[EMAIL PROTECTED]> <ht

[issue2778] set_swap_bodies is unsafe

2008-05-08 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: So why doesn't set() in {} work? Why was PEP 351 rejected when it would do this properly? __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1174606] Reading /dev/zero causes SystemError

2008-05-10 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: new_buffersize returns a size_t. You should use SIZE_MAX instead (although I don't see it used elsewhere in CPython, so maybe there's portability problems.) The call to _PyString_Resize implicitly casts the size_t to Py_ssi

[issue1174606] Reading /dev/zero causes SystemError

2008-05-10 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: The indentation still needs tweaking. You have only one tab where you should have two, and one line uses a mix of tabs and spaces. _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue2821] unittest.py sys.exit error

2008-05-11 Thread Adam Getchell
New submission from Adam Getchell <[EMAIL PROTECTED]>: Picking the canonical example of unit test: import random import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.seq = range(10) def testshuffle(self): # make sure the sh

[issue2821] unittest.py sys.exit error

2008-05-12 Thread Adam Getchell
Adam Getchell <[EMAIL PROTECTED]> added the comment: Agreed. C:\Projects\Python>python randomunittest.py ... -- Ran 3 tests in 0.003s OK C:\Projects\Python> > -Original Message- > From: Georg Bra

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-12-04 Thread Adam Olsen
Changes by Adam Olsen <[EMAIL PROTECTED]>: -- nosy: +Rhamphoryncus ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4006> ___ __

[issue1215] Python hang when catching a segfault

2008-12-05 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: I'm in favour of just the doc change now. It's less work and we don't really need to disable that usage. ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue3999] Real segmentation fault handler

2008-12-10 Thread Adam Olsen
Changes by Adam Olsen <[EMAIL PROTECTED]>: -- nosy: +Rhamphoryncus ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3999> ___ __

[issue4074] Building a list of tuples has non-linear performance

2008-12-14 Thread Adam Olsen
Adam Olsen added the comment: I didn't test it, but the patch looks okay to me. -- nosy: +Rhamphoryncus ___ Python tracker <http://bugs.python.org/i

[issue3959] Add Google's ipaddr.py to the stdlib

2009-01-05 Thread Adam Olsen
Changes by Adam Olsen : -- nosy: +Rhamphoryncus ___ Python tracker <http://bugs.python.org/issue3959> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5153] Extra ) in optparse sample

2009-02-04 Thread Adam Vandenberg
New submission from Adam Vandenberg : In the "Callback example 6: variable arguments" section of the optparse documentation, the example code has an extra ) at the end of the last line of the function: setattr(parser.values, option.dest, value)) -- assignee: georg.brandl

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-10 Thread Adam Olsen
Adam Olsen added the comment: On my 64-bit linux box there's nothing in the last 4 bits: >>> [id(o)%16 for o in [object() for i in range(128)]] [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-10 Thread Adam Olsen
Adam Olsen added the comment: Upon further inspection, although a shift of 4 (on a 64-bit linux box) isn't perfect for dict, it's fairly close to it and well beyond random hash values. Mixing things more is just gonna lower it towards random values. >>> c() 2: 1, 1,

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-11 Thread Adam Olsen
Adam Olsen added the comment: The alignment requirements (long double) make it impossible to have anything in those bits. Hypothetically, a custom allocator could lower the alignment requirements to sizeof(void *). However, rotating to the high bits is pointless as they're the least like

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-11 Thread Adam Olsen
Adam Olsen added the comment: Antoine, I only meant list() and dict() to be an example of objects with a larger allocation pattern. We get a substantial benefit from the sequentially increasing memory addresses, and I wanted to make sure that benefit wasn't lost on larger allocations

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-11 Thread Adam Olsen
Adam Olsen added the comment: > At four bits, you may be throwing away information and I don't think > that's cool. Even if some selected timings are better with more bits > shifted, all you're really showing is that there is more randomness in > the upper bits tha

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-11 Thread Adam Olsen
Adam Olsen added the comment: Testing with a large set of ids is a good demonstration, but not proof. Forming a set of *all* possible values within a certain range is proof. However, XOR does work (OR definitely does not) — it's a 1-to-1 transformation (reversible as you say.) Additio

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-12 Thread Adam Olsen
Adam Olsen added the comment: Antoine, x ^= x>>4 has a higher collision rate than just a rotate. However, it's still lower than a statistically random hash. If you modify the benchmark to randomly discard 90% of its contents this should give you random addresses, reflecting a l

[issue5254] Formatting error in "findertools" header

2009-02-13 Thread Adam Vandenberg
New submission from Adam Vandenberg : There is a formatting error in the "findertools" header: http://docs.python.org/library/macostools.html#module-findertools "The finder's Apple Events interface" as rendered uses the wrong-direction single quote. -- assignee

[issue26510] [argparse] Add required argument to add_subparsers

2019-10-04 Thread Adam Stewart
Change by Adam Stewart : -- pull_requests: +16178 pull_request: https://github.com/python/cpython/pull/16588 ___ Python tracker <https://bugs.python.org/issue26

[issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode

2019-10-07 Thread Adam Williamson
Adam Williamson added the comment: Well, now our (Fedora QA's) automated testing of FreeIPA is showing what looks like a problem with preexec_fn (rather than fork) being disallowed: https://bugzilla.redhat.com/show_bug.cgi?id=1759290 Login to the FreeIPA webUI is failing, and at the ti

[issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode

2019-10-07 Thread Adam Williamson
Adam Williamson added the comment: It's this function: https://github.com/freeipa/freeipa/blob/master/ipalib/install/kinit.py#L66 The function `run` is imported from `ipapython.ipautil`, it's defined here: https://github.com/freeipa/freeipa/blob/master/ipapython/ipautil.py#L391 a

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-05-13 Thread Adam Liddell
Change by Adam Liddell : -- nosy: +aaliddell ___ Python tracker <https://bugs.python.org/issue42130> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-05-13 Thread Adam Liddell
Adam Liddell added the comment: Some discussion leading up to that change is here https://github.com/MagicStack/asyncpg/pull/548 and in the issues it links. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-05-13 Thread Adam Liddell
Adam Liddell added the comment: Wrapping every resource allocating call like that is what we were trying to avoid, since it makes wait_for go from a simple one-line helper to something you have to be very careful with. Conceptually, a user should expect that wait_for should behave the exact

[issue44253] tkinter searches for tk.tcl in wrong directory

2021-05-27 Thread Adam Stewart
New submission from Adam Stewart : I'm trying to install Python with tkinter support using the Spack package manager. Spack adds the following flags to configure during install: ``` '--with-tcltk-libs=-L/Users/Adam/spack/opt/spack/darwin-catalina-x86_64/apple-clang-12.0.0/

[issue44253] tkinter searches for tk.tcl in wrong directory

2021-05-27 Thread Adam Stewart
Adam Stewart added the comment: Thanks, in that case it sounds like the problem is that Spack installs tcl and tk to separate directories, but since tk depends on tcl and not the other way around, tcl has no way of knowing where tk is installed. I'll see if I can convince the other

[issue44253] tkinter searches for tk.tcl in wrong directory

2021-05-27 Thread Adam Stewart
Adam Stewart added the comment: I think I FINALLY figured out the problem. We were setting `TCLLIBPATH` to `/lib/tk8.6` when it should be `/lib`. With this change, tkinter seems to work for me. Thanks for all of your help! -- ___ Python tracker

[issue44253] tkinter searches for tk.tcl in wrong directory

2021-05-28 Thread Adam Stewart
Adam Stewart added the comment: And... now it's not working again. Can you clarify exactly how tkinter finds tk/tcl? Does it rely on TCL_LIBRARY or TK_LIBRARY env vars? TCLLIBPATH? If I use all of these env vars, tkinter finds tcl/tk, but commands like: $ python -m tkinter $ pyth

[issue44253] tkinter searches for tk.tcl in wrong directory

2021-05-28 Thread Adam Stewart
Adam Stewart added the comment: Thanks, that does help. Spack uses both `--with-tcltk-includes` and `--with-tcltk-libs`, and actually RPATHs the libraries in place. According to otool, that is all working fine: $ otool -L /Users/Adam/spack/opt/spack/darwin-catalina-x86_64/apple-clang

[issue28474] WinError(): Python int too large to convert to C long

2021-08-23 Thread Adam Meily
Adam Meily added the comment: I can potentially take a stab at writing up a PR for this. I've also seen this affecting other locations that eventually call FormatMessage, including: - ctypes.format_error() - this original issue - os.strerror() - OSError(winerror=X) I will most likely

[issue27484] Some Examples in Format String Syntax are incorrect or poorly worded

2021-08-25 Thread Adam Meily
Change by Adam Meily : -- nosy: +meilyadam nosy_count: 5.0 -> 6.0 pull_requests: +26405 pull_request: https://github.com/python/cpython/pull/27959 ___ Python tracker <https://bugs.python.org/issu

[issue28474] WinError(): Python int too large to convert to C long

2021-08-25 Thread Adam Meily
Change by Adam Meily : -- keywords: +patch pull_requests: +26407 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27959 ___ Python tracker <https://bugs.python.org/issu

[issue45235] argparse does not preserve namespace with subparser defaults

2021-09-17 Thread Adam Schwalm
New submission from Adam Schwalm : The following snippet demonstrates the problem. If a subparser flag has a default set, argparse will override the existing value in the provided 'namespace' if the flag does not appear (e.g., if the default is used): import argparse

[issue45235] argparse does not preserve namespace with subparser defaults

2021-09-17 Thread Adam Schwalm
Change by Adam Schwalm : -- keywords: +patch pull_requests: +26832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28420 ___ Python tracker <https://bugs.python.org/issu

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick
New submission from Adam Yoblick : Repro steps: 1. Install Python 3.9 from the Microsoft Store 2. Try to create a virtual environment under the userappdata folder, using a command line similar to the following: "C:\Program Files\WindowsApps\PythonSoftwareFoundation.P

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick
Change by Adam Yoblick : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue45337> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45639] Support modern image formats in MIME types

2021-10-27 Thread Adam Konrad
New submission from Adam Konrad : Modern image types webp and avif are not recognized by the mimetypes module. Problem: Many tools are written in Python and running on macOS. Good example is the AWS CLI. Running commands like "s3 sync" will save files with .webp and .avif exten

[issue45639] Support modern image formats in MIME types

2021-10-27 Thread Adam Konrad
Change by Adam Konrad : -- keywords: +patch pull_requests: +27523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29259 ___ Python tracker <https://bugs.python.org/issu

[issue45864] unittest does not discover tests in PEP420 packages

2021-11-22 Thread Adam Johnson
New submission from Adam Johnson : unittest's test discovery does not descend into directories without `__init__.py`. This avoids discovering test modules that are otherwise valid and importable, after PEP 420. I've seen this more than once where there were valid looking test files

[issue45865] Old syntax in unittest

2021-11-22 Thread Adam Johnson
New submission from Adam Johnson : I often browse the unittest code in order to write extensions. It still uses some Python 2-isms like classes inheriting from object, it would be nice to clean that up. -- components: Tests messages: 406757 nosy: adamchainz priority: normal severity

[issue45865] Old syntax in unittest

2021-11-22 Thread Adam Johnson
Change by Adam Johnson : -- keywords: +patch pull_requests: +27934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29698 ___ Python tracker <https://bugs.python.org/issu

[issue45864] unittest does not discover tests in PEP420 packages

2021-11-22 Thread Adam Johnson
Adam Johnson added the comment: It's exactly that ticket. I missed that when searching for duplicates - I only searched for "pep420" and not "namespace packages". Mea culpa. -- resolution: -> duplicate ___ Python track

[issue45864] unittest does not discover tests in PEP420 packages

2021-11-22 Thread Adam Johnson
Change by Adam Johnson : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45864> ___ ___ Python-bugs-list

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-11-22 Thread Adam Johnson
Adam Johnson added the comment: I just reported https://bugs.python.org/issue45864 , and closed as duplicate of this. -- nosy: +adamchainz ___ Python tracker <https://bugs.python.org/issue23

[issue38839] Some unused functions in test suite

2019-11-18 Thread Adam Johnson
New submission from Adam Johnson : Whilst developing a new unused function check for flake8 ( https://github.com/PyCQA/pyflakes/pull/485 ) I ran it against the CPython source code and found some uncalled functions. -- messages: 356919 nosy: adamchainz priority: normal pull_requests

[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily
New submission from Adam Meily : I upgraded from Python 3.7.1 to 3.7.6 and began noticing a behavior that was breaking my code. My code detects if it's running in a virtualenv. This check worked in 3.7.1 but is broken in 3.7.6. >From the documentation, sys.prefix and sys.exec_prefi

[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily
Adam Meily added the comment: OK, that makes sense. For 3.7, I can create a PR for that corrects the order of arguments passed into _winapi.CreateProcess For 3.8 / master, the problem appears to be that the check in popen_spawn_win32.py to set the subprocess env is failing because

[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+

2020-01-23 Thread Adam Meily
Change by Adam Meily : -- pull_requests: +17543 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18157 ___ Python tracker <https://bugs.python.org/issu

[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily
Change by Adam Meily : -- pull_requests: +17544 pull_request: https://github.com/python/cpython/pull/18157 ___ Python tracker <https://bugs.python.org/issue39

[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily
Change by Adam Meily : -- pull_requests: +17545 pull_request: https://github.com/python/cpython/pull/18158 ___ Python tracker <https://bugs.python.org/issue39

[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily
Change by Adam Meily : -- pull_requests: +17546 pull_request: https://github.com/python/cpython/pull/18159 ___ Python tracker <https://bugs.python.org/issue39

[issue11395] print(s) fails on Windows with long strings

2020-04-12 Thread Adam Bartoš
Adam Bartoš added the comment: I've been hit by this issue recently. On my configuration, print("a" * 10215) fails with an infinite loop of OSErrors (WinError 8). This even cannot by interrupted with Ctrl-C nor the exception can be catched. - print("a" * 10214) is

[issue42967] Web cache poisoning - `;` as a query args separator

2021-01-19 Thread Adam Goldschmidt
New submission from Adam Goldschmidt : The urlparse module treats semicolon as a separator (https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L739) - whereas most proxies today only take ampersands as separators. Link to a blog post explaining this vulnerability: https

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-22 Thread Adam Goldschmidt
Change by Adam Goldschmidt : -- pull_requests: +23120 pull_request: https://github.com/python/cpython/pull/24297 ___ Python tracker <https://bugs.python.org/issue42

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-22 Thread Adam Goldschmidt
Adam Goldschmidt added the comment: I haven't noticed, I'm sorry. I don't mind closing mine, just thought it could be a nice first contribution. Our PRs are different though - I feel like if we are to implement this, we should let the developer choose the separator and not

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Adam Goldschmidt
Adam Goldschmidt added the comment: > I _didn't_ change the default - it will allow both '&' and ';' still. Eric > showed a link above that still uses semicolon. So I feel that it's strange to > break backwards compatibility in a patch update. M

<    1   2   3   4   5   6   7   >