[issue5673] Add timeout option to subprocess.Popen

2010-08-09 Thread Tim Golden
Changes by Tim Golden : -- nosy: +tim.golden ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue949667] setblocking() method on file objects

2010-08-09 Thread Tim Golden
Tim Golden added the comment: There are at least two ways to do non-blocking file IO on Windows: Overlapped I/O I/O Completion ports Don't know what's best here, but happy to see what might be achieved if it was thought worth pursuing. -- nosy: +

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-27 Thread Tim Peters
Tim Peters added the comment: I also don't see a good reason to keep this open now - adds complication for no quantifiable payoff. -- ___ Python tracker <http://bugs.python.org/is

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham
Tim Graham added the comment: Hi, this causes a regression in Django and I'm not sure if Django or cpython is at fault. For a simple model that uses super() rather than super(Model self) in save(): from django.db import models class Model(models.Model): def save(self, *args, **k

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham
Tim Graham added the comment: Thanks Nick. Your suggestion does fix the issue for Django: https://github.com/django/django/pull/7653. -- ___ Python tracker <http://bugs.python.org/issue23

[issue29016] negative numbers raised to power zero should be 1, not -1

2016-12-19 Thread Tim Peters
New submission from Tim Peters: They already are. >>> (-2)**0 1 You're probably doing this instead: >>> -2**0 -1 Exponentiation has higher precedence than unary minus, so that last example groups as -(2**0), and -1 is correct. -- nosy: +tim.peters resoluti

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-22 Thread Tim Smith
Tim Smith added the comment: I spoke prematurely; I recently rediscovered that the persistence of __PYVENV_LAUNCHER__ poisons the sys.executable of virtualenv interpreters launched as a subprocess of another Python interpreter: $ virtualenv -p python3 test $ test/bin/python3 -c 'impor

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-22 Thread Tim Smith
Tim Smith added the comment: Since __PYVENV_LAUNCHER__ is consulted in site.py, it seems likely that the latest it can be deleted is in site.py. The attached patch does that. -- Added file: http://bugs.python.org/file46004/delete-venev-launcher.diff

[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Tim Golden
Tim Golden added the comment: Do you have any Python environment variables set? If you're not sure, try at a command prompt: SET PY -- ___ Python tracker <http://bugs.python.org/is

[issue29449] clear() should return prior state in threading.Event

2017-02-07 Thread Tim Peters
Tim Peters added the comment: I can't judge a use case for a thread gimmick in the absence of wholly specified examples. There are too many possible subtleties. Indeed, if I'd do anything with Event.clear() it would be to remove it - I've seen too much code that suffers s

[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Tim Golden
Tim Golden added the comment: Although I don't remember seeing a crash out as quick as this, common causes for this kind of thing are to do with environment variables pointing to still-existing or part-existing installations. Can you try: set PY from a command prompt, please, to see i

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Tim Golden
Tim Golden added the comment: Since the webmaster@ address tends to bear the brunt of these, can I make sure I understand the situation? * The only installers affected are those for x86/32-bit Windows 3.5.3 * By default [I just checked] the launcher checkbox is not checked * If it *is

[issue26955] Implement equivalent to `pip.locations.distutils_scheme` in distutils

2016-06-08 Thread Tim Smith
Tim Smith added the comment: As a Homebrew maintainer I'm happy to consider improving Homebrew's configuration if someone can point me to an extant package that uses this mechanism. -- nosy: +tdsmith ___ Python tracker <http://bu

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-08 Thread Tim Peters
Tim Peters added the comment: Didn't anyone here follow the discussion about the `secrets` module? PHP was crucified by security wonks for its horridly naive ways of initializing its PRNGs: https://media.blackhat.com/bh-us-12/Briefings/Argyros/BH_US_12_Argyros_PRNG_WP.pdf Please don&#

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-08 Thread Tim Peters
Tim Peters added the comment: Donald, it does matter. The code you found must be using some older version of Python, because the Python 3 version of randint() uses _randbelow(), which is an accept/reject method that consumes an _unpredictable_ number of 32-bit Twister outputs. That utterly

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: Donald, your script appears to recreate the state from some hundreds of consecutive outputs of getrandbits(64). Well, sure - but what of it? That just requires inverting the MT's tempering permutation. You may as well note that the state can be recreated

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: > Searching github pulls up a number of results of people > calling it, but I haven't looked through them to see > how/why they're calling it. Sorry, I don't know what "it" refers to. Surely not to a program exposing the output o

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: Ah! Yes, .getrandbits(N) outputs remain vulnerable to equation-solving in Python 3, for any value of N. I haven't seen any code where that matters (may be "a security hole"), but would bet some _could_ be found. There's no claim of absolut

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-10 Thread Tim Peters
Tim Peters added the comment: Raymond, while I'm in general agreement with you, note that urandom() doesn't deliver "random" bytes to begin with. A CSPRNG is still a PRNG. For example, if the underlying urandom() generator is ChaCha20, _it_ has "only" 512 bits

[issue27288] secrets should use getrandom() on Linux

2016-06-10 Thread Tim Peters
Tim Peters added the comment: It was a primary purpose of `secrets` to be a place where security best practices could be implemented, and changed over time, with no concern about backward compatibility for people who don't use it. So if `secrets` needs to supply a class with all the me

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-11 Thread Tim Peters
Tim Peters added the comment: Christian, you should really be the first to vote to close this. The title of this bug report is about whether it would be good to reduce the _number_ of bytes Random initialization consumes from os.urandom(), not whether to stop using os.urandom() entirely

[issue27288] secrets should use getrandom() on Linux

2016-06-11 Thread Tim Peters
Tim Peters added the comment: I think it's clear Guido would say "#1". The thrust of all his comments to date is that it was a mistake to change the semantics of os.urandom() on Linux (and one other platform? don't really care), and that in 3.6+ only `secrets` should _try

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: Re-opening at user's request on Paul Moore's advice. He's already nosy so can comment here if needed. It would be good to get independent verification. I'll try to install the rc for 2.7.12 to see if I can reproduce. -- resolution: t

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: James, which installer did you use (just so I can try to reproduce as closely as possible)? -- ___ Python tracker <http://bugs.python.org/issue27

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: Thanks, Paul. Adding Benjamin as 2.7 release manager. This looks like a release blocker to me. -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue27

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: I did wonder about that. It's good that we can reproduce the issue without pip, but it's probably going to be messy to debug! I've got VS 2008 on this machine but no time at the moment to build & debug. Don't know if Zach or Steve might be

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: I can reproduce with the download build but not with a freshly-built executable -- ___ Python tracker <http://bugs.python.org/issue27

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: The crash is actually happening in Modules/_ssl.c:_get_peer_alt_names. > _ssl.pyd!_get_peer_alt_names(x509_st * certificate) Line 810 + 0x2 bytes C _ssl.pyd!_decode_certificate(x509_st * certificate) Line 1187 + 0x8 bytes C _ssl.

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden
Tim Golden added the comment: Built 64-bit 2.7 but can't reproduce on tip, 2.7.12rc1 or 2.7.11 tags. -- ___ Python tracker <http://bugs.python.org/is

[issue27353] Add nroot function to math

2016-06-20 Thread Tim Peters
Tim Peters added the comment: Note that the very popular TI graphics calculators have had a distinct nth-root function at least since the TI-83. It's a minor convenience there. I'm +0 on adding it to Python's math module, which means not enough to do any work ;-) Note that if

[issue25548] Show the address in the repr for class objects

2016-06-22 Thread Tim Graham
Tim Graham added the comment: I'll echo what Peter said and say that this breaks 5 tests in Django's test suite which are checking error messages. If it stays, perhaps it could be added to the release notes instead of just NEWS. -- nosy: +

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Tim Golden
Tim Golden added the comment: As it happens, all the code I use which calls CoInitialise[Ex] does so with STA. But do I understand correctly that, if you implement this, there's no way for me to select MTA? If so I would consider that a major dra

[issue27440] Trigonometric bug

2016-07-02 Thread Tim Peters
Tim Peters added the comment: Python's floats are emphatically not doing symbolic arithmetic - they use the platform's binary floating point facilities, which can only represent a subset of rationals exactly. All other values are approximated. In particular, this shows the exact va

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread Tim Peters
Tim Peters added the comment: Note that the same is true in Python 2. I don't want to document it, though. In `math.floor(44/4.4)`, the subexpression `44/4.4` by itself wholly rules out that "[as if] with infinite precision [throughout the larger expression]" may be in play.

[issue27498] Regression in repr() of class object

2016-07-12 Thread Tim Graham
Changes by Tim Graham : -- nosy: +Tim.Graham ___ Python tracker <http://bugs.python.org/issue27498> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Note: this started on stackoverflow: https://stackoverflow.com/questions/38356584/python-multiprocessing-threading-code-exits-early I may be missing something obvious, but the only explanation I could think of for the behavior seen on Ubuntu is that the threads

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Changes by Tim Peters : -- components: +Library (Lib) type: -> behavior ___ Python tracker <http://bugs.python.org/issue27508> ___ ___ Python-bugs-list mai

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Curious: under Python 2.7.11 on Windows, the threads also terminate early (they run "forever" - as intended - under 3.5.2). -- ___ Python tracker <http://bugs.python.o

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Ah - good catch! I'm closing this as a duplicate of bug18966. The real mystery now is why the threads _don't_ terminate early under Windows 3.5.2 - heh. -- resolution: -> duplicate status: open -> closed superseder: -> Threads wit

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: This came up again today as bug 27508. In the absence of "fixing it", we should add docs to multiprocessing explaining the high-level consequences of skipping "normal" exit processing (BTW, I'm unclear on why it's skipped). I&#

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Devin, a primary point of `threading.py` is to provide a sane alternative to the cross-platform thread mess. None of these reports are about making it easier for threads to go away "by magic" when the process ends. It's the contrary: the

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: About ""No parents, no children", that's fine so far as it goes. But Python isn't C, a threading.Thread is not a POSIX thread, and threading.py _does_ have a concept of "the main thread". There's no conceptual problem _

[issue18966] Threads within multiprocessing Process terminate early

2016-07-14 Thread Tim Peters
Tim Peters added the comment: About: "The notion of categorically refusing to let a process end perhaps overreaches in certain situations." threading.py addressed that all along: if the programmer _wants_ the process to exit without waiting for a particular threading.Thread, t

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread Tim Peters
Tim Peters added the comment: FYI, I'm seeing the same kind of odd truncation Steve sees - but it goes away if I refresh the page. -- ___ Python tracker <http://bugs.python.org/is

[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters
Tim Peters added the comment: If you don't show us the regular expression, it's going to be darned hard to guess what it is ;-) -- nosy: +tim.peters ___ Python tracker <http://bugs.python.o

[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters
Tim Peters added the comment: Well, some backslash escapes are processed in the "replacement" argument to `.sub()`. If your replacement text contains a substring of the form \g not immediately followed by < that will raise the exception you're seeing. The pars

[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters
Changes by Tim Peters : -- stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue27586> ___ ___ Python-bugs-list

[issue12345] Add math.tau

2016-08-09 Thread Tim Peters
Tim Peters added the comment: Hmm. I'd test that tau is exactly equal to 2*pi. All Python platforms (past, present, and plausible future ones) have binary C doubles, so the only difference between pi and 2*pi _should_ be in the exponent (multiplication by 2 is exact). Else we screw

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2016-08-11 Thread Tim Graham
New submission from Tim Graham: Python 2.7: >>> from email.header import Header >>> Header(' ').encode() '' Python 3.2+ (I didn't check older versions of Python 3): >>> Header(' ').encode() Traceback (most recent call last):

[issue12345] Add math.tau

2016-08-11 Thread Tim Peters
Tim Peters added the comment: For those insisting that tau is somehow unnatural, just consider that the volume of a sphere with radius r is 2*tau/3*r**3 - the formula using pi instead is just plain impossible to remember ;-) -- ___ Python tracker

[issue12345] Add math.tau

2016-08-12 Thread Tim Peters
Tim Peters added the comment: Serhiy's objection is a little subtler than that. The Python expression `math.log(math.e)` in fact yields exactly 1.0, so IF it were the case that x**y were implemented as math.exp(math.log(x) * y) THEN math.e**500 would be computed as math.exp(math.log(m

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread Tim Peters
Tim Peters added the comment: Note that "iterable" covers a world of things that may not support indexing (let alone slicing). For example, it may be a generator, or a file open for reading. -- nosy: +tim.peters ___ Python trac

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread Tim Peters
Changes by Tim Peters : -- resolution: -> rejected stage: -> resolved ___ Python tracker <http://bugs.python.org/issue27751> ___ ___ Python-bugs-list

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Tim Peters
Tim Peters added the comment: A meta-note: one iteration of Newton's method generally, roughly speaking, doubles the number of "good bits" in the initial approximation. For floating n'th root, it would an astonishingly bad libm pow() that didn't get more than half

[issue27761] Private _nth_root function loses accuracy

2016-08-16 Thread Tim Peters
Tim Peters added the comment: Thanks, Mark! I had worked out the `floor_nroot` algorithm many years ago, but missed the connection to the AM-GM inequality. As a result, instead of being easy, proving correctness was a pain that stretched over pages. Delighted to see how obvious it _can_ be

[issue27761] Private _nth_root function loses accuracy

2016-08-16 Thread Tim Peters
Tim Peters added the comment: Noting that `floor_nroot` can be sped a lot by giving it a better starting guess. In the context of `nroot`, the latter _could_ pass `int(x**(1/n))` as an excellent starting guess. In the absence of any help, this version figures that out on its own; an

[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Tim Peters
Tim Peters added the comment: Looks to me like this is what the docs are talking about when they say: """ As mentioned above, if a child process has put items on a queue (and it has not used JoinableQueue.cancel_join_thread), then that process will not terminate until all buff

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-08-26 Thread Tim Peters
Tim Peters added the comment: Note that `Pool` grew `starmap()` and `starmap_async()` methods in Python 3.3 to (mostly) address this. The signature difference from the old builtin `map()` remains regrettable. Note that the `Pool` version differs from the `concurrent.futures` version of `map

[issue27761] Private _nth_root function loses accuracy

2016-08-26 Thread Tim Peters
Tim Peters added the comment: I don't care about correct rounding here, but it is, e.g., a bit embarrassing that >>> 64**(1/3) 3.9996 Which you may or may not see on your box, depending on your platform pow(), but which you "should" see: 1/3 is no

[issue27761] Private _nth_root function loses accuracy

2016-08-26 Thread Tim Peters
Tim Peters added the comment: Serhiy, I don't know what you're thinking there, and the code doesn't make much sense to me. For example, consider n=2. Then m == n, so you accept the initial `g = x**(1.0/n)` guess. But, as I said, there are cases where that doesn't

[issue27761] Private _nth_root function loses accuracy

2016-08-27 Thread Tim Peters
Tim Peters added the comment: Adding one more version of the last code, faster by cutting the number of extra digits used, and by playing "the usual" low-level CPython speed tricks. I don't claim it's always correctly rounded - although I haven't found a specific c

[issue27761] Private _nth_root function loses accuracy

2016-08-28 Thread Tim Peters
Tim Peters added the comment: Victor, happy to add comments, but only if there's sufficient interest in actually using this. In the context of this issue report, it's really only important that Mark understands it, and he already does ;-) For example, it starts with float `**` beca

[issue27761] Private _nth_root function loses accuracy

2016-08-28 Thread Tim Peters
Tim Peters added the comment: That's clever, Serhiy! Where did it come from? It's not Newton's method, but it also appears to enjoy quadratic convergence. As to speed, why are you asking? You should be able to time it, yes? On my box, it's about 6 times slower than th

[issue27761] Private _nth_root function loses accuracy

2016-08-28 Thread Tim Peters
Tim Peters added the comment: Steven, you certainly _can_ ;-) check first whether `r**n == x`, but can you prove `r` is the best possible result when it's true? Offhand, I can't. I question it because it rarely seems to _be_ true (in well less than 1% of the random-ish test cas

[issue27761] Private _nth_root function loses accuracy

2016-08-28 Thread Tim Peters
Tim Peters added the comment: As I said, the last code I posted is "fast enough" - I can't imagine a real application can't live with being able to do "only" tens of thousands of roots per second. A geometric mean is typically an output summary statistic,

[issue27761] Private _nth_root function loses accuracy

2016-08-28 Thread Tim Peters
Tim Peters added the comment: Let's spell one of these out, to better understand why sticking to native precision is inadequate. Here's one way to write the Newton step in "guess + relatively_small_correction" form: def plain(x, n): g = x**(1.0/n) ret

[issue17208] add note/warning about daemon threads

2013-02-15 Thread Tim Golden
Tim Golden added the comment: +1 This is essentially the answer to the naive user's question: "Why would anyone *not* use daemon threads given that they're less hassle to manage?" -- nosy: +tim.golden ___ Python tracker <

[issue17257] re module shows unexpected non-greedy behavior when using groups

2013-02-20 Thread Tim Peters
Tim Peters added the comment: This is how it's supposed to work: Python's re matches at the leftmost position possible, and _then_ matches the longest possible substring at that position. When a regexp _can_ match 0 characters, it will match starting at index 0. So, e.g., >

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: netrick: can you confirm that the same thing occurs when you explicitly run your code via the pyw command. ie when you do this: pyw myprog.pyw Also, what happens when you run: py myprog.pyw ie when you use the Console launcher to launch the .pyw

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: I can't reproduce this running Python 3.3 on Win7. I'll try WinXP later. I'll also add Mark Hammond & Vinay as they implemented the PEP397 loader. -- ___ Python tracker <http://bugs

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Changes by Tim Golden : -- nosy: +mhammond, vinay.sajip ___ Python tracker <http://bugs.python.org/issue17290> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: Things may be a little more complicated, because one of two distinct mechanisms may be invoked to determine what to run when double-clicking: an Explorer-based mechanism, and a non-Explorer one. AFAICT, the former falls back to the latter. To check the latter, the

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: I can't reproduce this on XP either. I've tried various combinations of .py / .pyw, command line, double-click, etc. and I've not had a single problem. Let's hope someone else can suggest something -- __

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-06 Thread Tim Golden
Tim Golden added the comment: IIRC Nick Coghlan had put a bit of work into this a few months ago as an external module with a view to seeing if it got traction before putting anything into the stdlib. Might be worth pinging him, or looking to see what he'd done. Can't remember the k

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-06 Thread Tim Golden
Tim Golden added the comment: OK, sorry for the noise then; I had the idea that it was doing something with iterators/generators. -- ___ Python tracker <http://bugs.python.org/issue11

[issue17366] os.chdir win32

2013-03-07 Thread Tim Golden
Tim Golden added the comment: Dave, you seem to misunderstand what's happening here: the os.chdir function doesn't have access to the characters which are typed in the script or in the interpreter. It receives a Python string object. The parser etc. which constructs the string object

[issue17379] Zen amendment

2013-03-07 Thread Tim Peters
Tim Peters added the comment: As I just clarified on the members list, the "Zen" is about the design of Python-the-language. It's hard to imagine that a programming language _could_ be barbaric or rude, Perl notwithstanding ;-) -- ___

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: That's because IDLE uses a completely different input loop from the console interpreter. I'll try to get to this but I'm chock-a-block with other work at the moment. If anyone else wants to dig, please do so. if the worst came to the worst we co

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: +1 Richard - are you in a position to commit / push? -- ___ Python tracker <http://bugs.python.org/issue17619> ___ ___ Python-bug

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: Attached is a q&d script to produce the list of extension -> mimetype maps for a version of the mimetypes module. -- Added file: http://bugs.python.org/file29900/mt.py ___ Python tracker <http://bugs.

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: Three outputs produced by mt.py: tip as-is; tip without registry; tip with new approach to registry. The results for 2.7 are near-enough identical. Likewise the results for an elevated prompt. -- Added file: http://bugs.python.org/file29901/mt-tip.txt Added

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: There seems to be a consensus that the current behaviour is undesirable, indeed "broken" for any meaningful use. The critical argument against the current Registry approach is that it returns unexpected (or outright incorrect) mimetypes for ver

[issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails

2013-04-24 Thread Tim Golden
Tim Golden added the comment: Essentially: no. The permissions system in Windows is very different from that of Unix. The CRT attempts to mimic it, but for things like read-onlyness, it does so by setting the (old-style DOS) attributes. These are only just meaningful for files, and are

[issue17930] Search not needed in combinations_with_replacement

2013-05-07 Thread Tim Peters
New submission from Tim Peters: Each time thru, CWR searches for the rightmost position not containing the maximum index. But this is wholly determined by what happened the last time thru - search isn't really needed. Here's Python code: def cwr2(iterable, r): pool = tupl

[issue17930] Search not needed in combinations_with_replacement

2013-05-07 Thread Tim Peters
Tim Peters added the comment: Oops! Last part should read "since the indices vector is non-decreasing, if indices[j] was n-2 then indices[j-1] is also at most n-2" That is, the instances of "r-2" in the original s

[issue17930] Search not needed in combinations_with_replacement

2013-05-08 Thread Tim Peters
Tim Peters added the comment: There's another savings to be had when an index becomes the maximum: in that case, all the indices to its right are already at the maximum, so no need to overwrite them. This isn't as big a savings as skipping the search, but still buys about 10% m

[issue17980] CVE-2013-2099 ssl.match_hostname() trips over crafted wildcard names

2013-05-16 Thread Tim Peters
Tim Peters added the comment: Wildcard matching can easily be done in worst-case linear time, but not with regexps. doctest.py's internal _ellipsis_match() shows one way to do it (doctest can use "..." as a wildcard marker). --

[issue18044] Email headers do not properly decode to unicode.

2013-05-23 Thread Tim Rawlinson
New submission from Tim Rawlinson: In Python 3.3 decoding of headers to unicode is supposed to be automatic but fails in several cases, including one shown as successful in the documentation: >>> msg = message_from_string('Subject: =?utf-8?q?=C3=89ric?=\n\n', policy=

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2014-10-11 Thread Tim Smith
Tim Smith added the comment: I'm attaching an updated patch; it passes tests for me locally with a framework build. -- Added file: http://bugs.python.org/file36885/dont-realpath-venv-dirname.diff-1 ___ Python tracker <http://bugs.py

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2014-10-11 Thread Tim Smith
Tim Smith added the comment: Er, because the test has been modified by taking Vinay's suggestion to test that the directories are physically identical instead of doing a string comparison. -- ___ Python tracker <http://bugs.python.org/is

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2014-10-12 Thread Tim Smith
Tim Smith added the comment: We would like to refer to python3 as /usr/local/opt/python3/bin/python3, where /usr/local/opt/python3 is a symlink to ../Cellar/python3/3.4.2, and /usr/local/Cellar/python3/3.4.2/bin/python3 is a symlink to /usr/local/Cellar/python3/3.4.2/Frameworks

[issue22739] "There is no disk in the drive" error

2014-10-27 Thread Tim Golden
Tim Golden added the comment: I very much doubt that this is a Python issue as such. Other things being equal, I would expect Harddisk\DR1 to be a CD-ROM or some other removable disk. Using something like winobj.exe from sysinternals should show what it expects to be on a given machine. It&#

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham
New submission from Tim Graham: I noticed some failing Django tests on Python 3.2.6 the other day. The regression is caused by this change: https://github.com/python/cpython/commit/572d9c59a1441c6f8ffb9308824c804856020e31 Behavior before that commit (and on other version of Python even after

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham
Tim Graham added the comment: I wasn't sure if it was expected behavior or not. I'm attaching a file with the list of failing tests on Django's master. Perhaps more useful is a reference to the problematic usage in Django: https://github.com/dja

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham
Tim Graham added the comment: Thank-you Georg; I believe I was able to fix some of the failures by patching Django as you suggested. However, I think I found another issue due to #16611 (support for httponly/secure cookies) not being backported to Python 3.2. The issue is that any cookies

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Tim Graham
New submission from Tim Graham: Expected: >>> import pickle >>> from http.cookies import SimpleCookie >>> pickle.loads(pickle.dumps(SimpleCookie('hi=there'),2)) # Actual Patch is based on the suggestion from Georg Brandl in #22758 (I added the &quo

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Tim Graham
Tim Graham added the comment: By the way, this is my first patch for Python and I submitted a CLA 2 days ago. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-31 Thread Tim Graham
Tim Graham added the comment: FYI, I created #22775 and submitted a patch for the issue that SimpleCookie doesn't pickle properly with HIGHEST_PROTOCOL. -- ___ Python tracker <http://bugs.python.org/is

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-01 Thread Tim Graham
Tim Graham added the comment: Updated patch to test pickling of all protocols. -- Added file: http://bugs.python.org/file37100/cookie-pickling-all-protocols.diff ___ Python tracker <http://bugs.python.org/issue22

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Tim Graham
Tim Graham added the comment: Updated patch per comments. -- Added file: http://bugs.python.org/file37114/cookie-pickling-all-protocols-2.diff ___ Python tracker <http://bugs.python.org/issue22

<    16   17   18   19   20   21   22   23   24   >