[issue30829] 'Cannot serialize socket object' after ssl_wrap

2017-07-02 Thread Anderson

New submission from Anderson:

---
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/socketserver.py", line 317, in 
_handle_request_noblock
self.process_request(request, client_address)
  File "/opt/storage_server/server_tcp.py", line 121, in process_request
self.pipes[self.proc_turn][1].send((request, client_address))
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 206, in 
send
self._send_bytes(_ForkingPickler.dumps(obj))
  File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in 
dumps
cls(buf, protocol).dump(obj)
  File "/usr/local/lib/python3.6/socket.py", line 185, in __getstate__
raise TypeError("Cannot serialize socket object")
TypeError: Cannot serialize socket object
---

I am trying to send a ssl wrapped socket object (server side) into a pipe to 
another process using multiprocessing.

Btw, without ssl_wrap it works.

Basically this:

newsocket, fromaddr = self.socket.accept()

connstream = ssl.wrap_socket(newsocket, server_side=True, 
certfile=self.certfile, keyfile=self.keyfile)

pipe = multiprocessing.Pipe()
proc = multiprocessing.Process(target=proc_run, args=(pipe[0],), daemon=False)
proc.start()

#Error here
pipe[1].send((connstream, fromaddr))

I am sorry if this is intentional.

--
assignee: christian.heimes
components: SSL
messages: 297526
nosy: Anderseta, christian.heimes
priority: normal
severity: normal
status: open
title: 'Cannot serialize socket object' after ssl_wrap
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue30829>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30829] 'Cannot serialize socket object' after ssl.wrap_socket

2017-07-02 Thread Anderson

Changes by Anderson :


--
title: 'Cannot serialize socket object' after ssl_wrap -> 'Cannot serialize 
socket object' after ssl.wrap_socket

___
Python tracker 
<http://bugs.python.org/issue30829>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23933] Struct module should acept arrays

2015-04-13 Thread Anderson

New submission from Anderson:

Correct me if I'm wrong, the struct module does not work with array of ints, 
floats etc (just work with char in the form of strings). I think it should 
since this are valid elements in C structs. 

More specifically, consider I have this C struct

struct{
 int array[4];
};

I'm forced to do something like this:
  struct.pack('', v1,v2,v3,v4)  #'4i' is just the same as ''

I would like to do something like this:
  struct.pack('i[4]', [v1,v2,v3,v4])

Of course this is useful if I want to pack with zeros:
  struct.pack('i[4]', [0]*4)

--
messages: 240610
nosy: gamaanderson
priority: normal
severity: normal
status: open
title: Struct module should acept arrays
type: enhancement
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue23933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23933] Struct module should acept arrays

2015-04-13 Thread Anderson

Anderson added the comment:

@wolma, That would work in this simple example. But in a more complicated case 
this became inconvenient.

Actually I'm working with reading and writing in python an extremely C-oriented 
file-type (MDV). For that I represent C-structs as python dics (e.q 
{"array":[v1,v2,v3,v4]}), and because of this lack of arrays I'm forced to keep 
track if a key represents a single value or an array. It works, but I think 
everyone would benefit if struct could handle that simple task.

--

___
Python tracker 
<http://bugs.python.org/issue23933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46376] PyMapping_Check returns 1 for list

2022-01-14 Thread Ashley Anderson


Change by Ashley Anderson :


--
nosy: +aganders3

___
Python tracker 
<https://bugs.python.org/issue46376>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-24 Thread Ashley Anderson

Changes by Ashley Anderson :


--
nosy: +Ashley.Anderson

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-24 Thread Ashley Anderson

Ashley Anderson  added the comment:

I've recently joined the python-mentors mailing list because I love Python and 
want to get involved. I found this bug in the list of "Easy issues" and thought 
I'd try my hand. Anyway, this is my first patch, so please forgive me if I am 
breaking protocol or stepping on anyone's toes here. I also hope my code isn't 
embarrassing.

This adds a constructor to the date class that allows construction based on an 
ISO-8601 WWD string. Does this address the issue in a logical way?

--
keywords: +patch
Added file: http://bugs.python.org/file22101/12006.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-24 Thread Ashley Anderson

Ashley Anderson  added the comment:

Thanks, I think I understand the original post now. Upon reading the docs and 
code, however, it seems this is possible using the %W and %w directives. Is the 
issue just to support the different letters (%V and %u) specifically, or that 
they are not quite the same format as the corresponding ISO numbers?

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-25 Thread Ashley Anderson

Ashley Anderson  added the comment:

OK, here is my second attempt. I think it functions as desired, but a code 
review may reveal flaws in my implementation. I'm sure there are associated 
tests and documentation to write, but I have basically no experience with that 
yet. If this looks like the right direction, I can take it to the 
python-mentors list for help with the test/docs.

--
Added file: http://bugs.python.org/file22113/12006_2.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-25 Thread Ashley Anderson

Changes by Ashley Anderson :


Removed file: http://bugs.python.org/file22101/12006.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-25 Thread Ashley Anderson

Ashley Anderson  added the comment:

Thanks everyone, please take your time if there are more pressing issues; I'll 
get to work on tests and documentation in the mean time. I agree that 
'_calc_julian_from_V' is a bit strange. I was mimicking a similar helper 
function's name ('_calc_julian_from_U_or_W'), but perhaps that is no defense.

Also, I know the functionality is there with 'toisocalendar' and 
'toisoweekday', but maybe %V and %u should be implemented for 'strftime' for 
completeness. Any thoughts?

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-26 Thread Ashley Anderson

Ashley Anderson  added the comment:

When trying to add cases for %V and %u in the tests, I ran into an issue of 
year ambiguity. The problem comes when the ISO year does not match the 
Gregorian year for a given date. I think this should be fixed by implementing 
the %G directive (ISO year, which is present in strftime) as well.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-26 Thread Ashley Anderson

Ashley Anderson  added the comment:

The example that triggered the issue in testing was January 1, 1905. The ISO 
date for this day is 1904 52 7. This is reported correctly if you use 
datetime.isocalendar() or datetime.strftime('%G'), but you get 1905 if you use 
datetime.strftime('%Y'). When it's read back in it causes the test to fail 
because ISO '1904 52 7' is different from ISO '1905 52 7'.

Likewise if you consider a year starting on a Tuesday, Wednesday, or Thursday, 
there will be several days at the end of the previous year that will have an 
ISO year ahead of their Gregorian representation.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-05-26 Thread Ashley Anderson

Ashley Anderson  added the comment:

I disagree, I think %G is necessary in strptime(). Take Monday, December 31, 
2001 as an example. The ISO date is 2002 01 1.

Now, given only the Gregorian year (2001) for this date, and the ISO week and 
weekday (01 1), there is an ambiguity with Monday, January 1, 2001, which has 
an ISO date of 2001 01 1. The ISO week/weekday combination of (01 1) occurs 
twice in the year 2001, and can only be differentiated by the corresponding ISO 
year.

We can, of course, debate on what the behavior in this case should be. The way 
I see it, we can:
1) Assume the year taken in by %Y is equivalent to the ISO year, which it often 
is. Assuming %Y is the ISO year IFF %V is used accomplishes the same result.
2) Default the year to some value, currently 1900 is used when %Y is absent. 
This is how it is handled now.
3) Report an error/exception that insufficient data was provided, and maybe 
mention %G should be used instead of %Y for this case.

I'm attaching a patch now that includes some minor changes, includes %G and 
adds some tests. I am also working on the documentation but it's not quite 
ready.

--
Added file: http://bugs.python.org/file22137/12006_3.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %V or %u directive from libc

2011-06-03 Thread Ashley Anderson

Ashley Anderson  added the comment:

Attaching a patch for the documentation just in time for the weekend!

--
Added file: http://bugs.python.org/file22240/12006_doc.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3646] MacOS X framework install to non-standard directory fails

2010-05-05 Thread Amos Anderson

Amos Anderson  added the comment:

I believe I applied the patch correctly to my Python-2.6.5.tar.bz2, on my OSX 
10.6.3 machine, configured with:
./configure --enable-framework=/Users/amos/triad/trunk/src/python

but "make install" now fails with this error at the end:

ln: /usr/local/bin/python2.6: Permission denied
ln: /usr/local/bin/pythonw2.6: Permission denied
ln: /usr/local/bin/idle2.6: Permission denied
ln: /usr/local/bin/pydoc2.6: Permission denied
ln: /usr/local/bin/python2.6-config: Permission denied
ln: /usr/local/bin/smtpd2.6.py: Permission denied
make[1]: *** [altinstallunixtools] Error 1
make: *** [frameworkaltinstallunixtools] Error 2


everything else appears ok...


p.s. I tried:
./configure --enable-universalsdk --with-universal-archs=intel 
--enable-framework=/Users/amos/triad/trunk/src/python
and got the same error.

--
nosy: +Amos.Anderson
versions: +Python 2.6 -Python 2.7, Python 3.2
Added file: http://bugs.python.org/file17233/buildpython.script

___
Python tracker 
<http://bugs.python.org/issue3646>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2661] Mapping tests cannot be passed by user implementations

2008-04-19 Thread David Anderson

New submission from David Anderson <[EMAIL PROTECTED]>:

Some test cases in Lib/test/mapping_tests.py are problematic for users
wishing to test their own implementations of the mapping protocol: 

 - TestHashMappingProtocol.test_repr() requires the user implementations
to look like a dict when repr() is applied. It is unclear why this is
required of conforming mapping protocol implementations.
 - TestMappingProtocol.test_fromkeys() cannot pass for any
implementation that uses its constructor in fromkeys(), because baddict1
defines a constructor accepting no arguments. It should accept *args,
**kwargs to be sane for user implementations that handle passing data
sources to the constructor.
 - TestHashMappingProtocol.test_mutatingiteration(), for some faulty
implementations, makes the iteration degrade into an infinite loop.
Making the test more strict (eg. keeping an explicit iteration count and
failing if it goes >1) would be more helpful to buggy implementations.

These all seem like trivial issues. If it is agreed that the repr_test
should be removed from the ABC tests, I can provide a patch implementing
these three corrections.

--
components: Library (Lib)
messages: 65639
nosy: danderson
severity: normal
status: open
title: Mapping tests cannot be passed by user implementations
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2661>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43495] Missing frame block push in compiler_async_comprehension_generator()

2021-03-14 Thread Thomas Anderson


New submission from Thomas Anderson :

The runtime pushes a frame block in SETUP_FINALLY, so the compiler needs to 
account for that, otherwise the runtime block stack may overflow.

--
components: Interpreter Core
messages: 388696
nosy: tomkpz
priority: normal
severity: normal
status: open
title: Missing frame block push in compiler_async_comprehension_generator()
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43495>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-03-14 Thread Thomas Anderson


Thomas Anderson  added the comment:

IIRC, some transpilers for functional languages create deeply nested code.  In 
particular for things like haskell's do notation.

Anyway, when I wrote the PR, it was initially to reduce the frame size.  Then 
once I had dynamic block stack sizing working, I realized there was no longer a 
need to keep the limit of 20 blocks.  It was just compile.c that had the 
artificial limit, so I removed it.  I can add the limit back in the PR, but I'm 
not sure what benefit that would give.

--

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson

New submission from Carl Anderson :

Fraction works with a regular slash:

>>> from fractions import Fraction
>>> Fraction("1/2")
Fraction(1, 2)

but there are other similar slashes such as (0x2044) in which it throws an 
error:

>>> Fraction("0⁄2")
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/anaconda3/lib/python3.7/fractions.py", line 138, in __new__
numerator)
ValueError: Invalid literal for Fraction: '0⁄2'


This seems to come from the (?:/(?P\d+))? section of the regex 
_RATIONAL_FORMAT in fractions.py

--
components: Library (Lib)
messages: 388865
nosy: weightwatchers-carlanderson
priority: normal
severity: normal
status: open
title: Fraction only handles regular slashes ("/") and fails with other similar 
slashes
type: enhancement
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue43520>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson

Carl Anderson  added the comment:

from https://en.wikipedia.org/wiki/Slash_(punctuation) there is

U+002F / SOLIDUS
U+2044 ⁄ FRACTION SLASH
U+2215 ∕ DIVISION SLASH
U+29F8 ⧸ BIG SOLIDUS
U+FF0F / FULLWIDTH SOLIDUS (fullwidth version of solidus)
U+1F67C 🙼 VERY HEAVY SOLIDUS

In XML and HTML, the slash can also be represented with the character entity 
/ or / or /.[42]

there are a couple more listed here:

https://unicode-search.net/unicode-namesearch.pl?term=SLASH

--

___
Python tracker 
<https://bugs.python.org/issue43520>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson

Carl Anderson  added the comment:

I guess if we are doing slashes, then the division sign ÷ (U+00F7) should be 
included too. 

There are at least 2 minus signs too (U+002D, U+02D7).

--

___
Python tracker 
<https://bugs.python.org/issue43520>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43520] Make Fraction(string) handle non-ascii slashes

2021-03-22 Thread Carl Anderson


Carl Anderson  added the comment:

>Carl: can you say more about the problem that motivated this issue?

@mark.dickinson

I was parsing a large corpus of ingredients strings from web-scraped recipes. 
My code to interpret strings such as "1/2 cup sugar" would fall over every so 
often due to this issue as they used fraction slash and other visually similar 
characters

--

___
Python tracker 
<https://bugs.python.org/issue43520>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43520] Make Fraction(string) handle non-ascii slashes

2021-03-23 Thread Carl Anderson

Carl Anderson  added the comment:

>The proposal I like is for a unicode numeric normalization functions that 
>return the ascii equivalent to exist.

@Gregory P. Smith 
this makes sense to me. That does feel like the cleanest solution. 
I'm currently doing s = s.replace("⁄","/") but it would be good to have a 
well-maintained normalization method that contained the all the relevant 
mappings as an independent preprocess step to Fraction would work well.

--

___
Python tracker 
<https://bugs.python.org/issue43520>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45894] exception lost when loop.stop() in finally

2021-11-24 Thread Amos Anderson


New submission from Amos Anderson :

I found a case where an exception is lost if the loop is stopped in a `finally`.


```
import asyncio
import logging


logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger()


async def method_that_raises():
loop = asyncio.get_event_loop()
try:
logger.info("raising exception")
raise ValueError("my exception1")
# except Exception as e:
# logger.info("in catcher")
# logger.exception(e)
# raise
finally:
logger.info("stopped")
loop.stop()
# await asyncio.sleep(0.5)

return


async def another_level():
try:
await method_that_raises()
except Exception as e:
logger.info("trapping from another_level")
logger.exception(e)


if __name__ == "__main__":
logger.info("start")
try:
asyncio.run(another_level())
except Exception as e:
logger.exception(e)
logger.info("done")
```

gives this output in python 3.10.0 and 3.8.10 (tested in Ubuntu Windows 
Subsystem Linux) and 3.8.11 in Windows:

```
INFO:root:start
DEBUG:asyncio:Using selector: EpollSelector
INFO:root:raising exception
INFO:root:stopped
INFO:root:done
```
i.e., no evidence an exception was raised (other than the log message included 
to prove one was raised)

If I remove the `return`, then the exception propagates as expected.

I believe the exception should be propagated regardless of whether there's a 
`return` in the `finally` block.

--
components: asyncio
messages: 406957
nosy: Amos.Anderson, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: exception lost when loop.stop() in finally
type: behavior
versions: Python 3.10, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45894>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45894] exception lost when loop.stop() in finally

2021-11-24 Thread Amos Anderson


Amos Anderson  added the comment:

If I do this instead:
```
try:
logger.info("raising exception")
raise ValueError("my exception1")
finally:
logger.info("stopped")
loop.stop()
await asyncio.sleep(0.5)
```

i.e., do an `await` instead of a `return`, then the original exception is also 
lost:

```
INFO:root:start
DEBUG:asyncio:Using selector: EpollSelector
INFO:root:raising exception
INFO:root:stopped
ERROR:root:Event loop stopped before Future completed.
Traceback (most recent call last):
  File "test.py", line 37, in 
asyncio.run(another_level())
  File "/home/amos/miniconda3/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/home/amos/miniconda3/lib/python3.8/asyncio/base_events.py", line 614, 
in run_until_complete
raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.
INFO:root:done
```

it's also a bit surprising that my handler in `another_level` didn't see either 
exception, but I'm not really sure what I'd expect in that case.

--

___
Python tracker 
<https://bugs.python.org/issue45894>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45894] exception lost when loop.stop() in finally

2021-11-24 Thread Amos Anderson


Amos Anderson  added the comment:

Ah, thank you, Serhiy. I didn't know that, but I see that in the documentation:
https://docs.python.org/3/reference/compound_stmts.html#the-try-statement

But what about the 2nd case I presented where a `RuntimeError` was raised? 
That's the actual case I'm working on. Based on this:

> If the finally clause raises another exception, the saved exception is set as 
> the context of the new exception.


My expectation is that the two exceptions would be chained.

--

___
Python tracker 
<https://bugs.python.org/issue45894>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


Change by Collin Anderson :


--
components: IO
nosy: collinanderson
priority: normal
severity: normal
status: open
title: Avoid calling isatty() for most open() calls
type: performance
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue45944>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


Change by Collin Anderson :


--
keywords: +patch
pull_requests: +28096
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29870

___
Python tracker 
<https://bugs.python.org/issue45944>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


New submission from Collin Anderson :

isatty() is a system call on linux. Most open()s are files, and we're already 
getting the size of the file. If it has a size, then we know it's not a atty, 
and can avoid calling it.

--

___
Python tracker 
<https://bugs.python.org/issue45944>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38833] Issue with multiprocessing.Pool & multiprocessing.Queue

2019-11-17 Thread Charles Anderson


New submission from Charles Anderson :

When calling mp.Pool().apply_async(), and passing a mp.Queue() instance as an 
argument the execution halts.

This is contrasted by using mp.Manager().Queue() which when passed to 
apply_async() works as expected.

--
components: Library (Lib)
files: python_mp_pool_queue_issue.py
messages: 356822
nosy: bigbizze
priority: normal
severity: normal
status: open
title: Issue with multiprocessing.Pool & multiprocessing.Queue
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48719/python_mp_pool_queue_issue.py

___
Python tracker 
<https://bugs.python.org/issue38833>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-11-25 Thread Bo Anderson


Bo Anderson  added the comment:

For what it's worth, this is having an impact on some real code: 
https://github.com/Homebrew/homebrew-core/pull/45110

Perhaps a simpler way to reproduce is:

% cd /tmp
% python3 -c 'import os; open(os.path.relpath("/tmp/test.txt"), "w")'
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory: '../../tmp/test.txt'

--
nosy: +Bo98

___
Python tracker 
<https://bugs.python.org/issue38295>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Bo Anderson


Bo Anderson  added the comment:

Indeed. The issue can be trivially reproduced with:

```
#include 
#include 
#include 
#include 

int main()
{
  char buf[255];
  printf("Current dir: %s\n", getcwd(buf, 255));

  int fd = open("../../tmp/test.txt", O_WRONLY | O_CREAT);
  if (fd < 0)
  {
printf("errno %d\n", errno);
return 1;
  }
  close(fd);
  printf("Success\n");
  return 0;
}
```

and running it in /private/tmp.

I filed FB7467762 at the end of November. Downstream projects meanwhile are 
working around the issue by resolving the file path before passing it into 
`open`.

--

___
Python tracker 
<https://bugs.python.org/issue38295>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Bo Anderson


Bo Anderson  added the comment:

> You don't even need a C program to reproduce

Indeed, touch is built upon the POSIX file API (unless Apple modified it). The 
idea for the Apple bug report was to show it happening at a low level and not 
specific to a given tool.

> And the "cd" is optional, I get the same error from my home directory

Yes, /private/tmp is just an example but I'd be cautious saying the same 
happens everywhere. You won't be able to reproduce the issue if your current 
directory is /usr.

/private/tmp, your home directory, etc. are all "firmlinked" to 
/System/Volumes/Data in Catalina. /System/Volumes/Data/private/tmp exists but 
/System/Volumes/Data/tmp doesn't exist. This shouldn't really be an issue as 
the idea of firmlinks is to make the /System/Volumes/Data invisible and thus 
you should be able to relatively go back up to the /System/Volumes/Data and be 
transported back to the root directory, where you can find the /tmp symlink 
(and indeed that works fine with `ls`). Evidently that doesn't seem to work 
properly for file operations.

--

___
Python tracker 
<https://bugs.python.org/issue38295>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-12 Thread Thomas Anderson


New submission from Thomas Anderson :

Currently the block stack size is hardcoded to 20.  Similar to how the value 
stack is dynamically sizable, we should make the block stack dynamically 
sizable.  This will reduce space on average (since the typical number of blocks 
for a function is well below 20) and allow code generators to generate code 
with more deep nesting.  Note: the motivation is not necessarily to reduce 
memory usage, but to make L1 cache misses less likely for stack objects.

--
components: Interpreter Core
messages: 384991
nosy: tomkpz
priority: normal
severity: normal
status: open
title: Block stack size for frame objects should be dynamically sizable
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-15 Thread Thomas Anderson


Thomas Anderson  added the comment:

> Reducing the size of the frame object seems like a worthwhile goal, but 
> what's the point in increasing the maximum block stack?

No point for humans, but it may be useful for code generators.

--

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-03 Thread Tore Anderson


New submission from Tore Anderson :

In https://docs.python.org/3/library/sqlite3.html, the following example code 
is found:

> # Do this instead
> t = ('RHAT',)
> c.execute('SELECT * FROM stocks WHERE symbol=?', t)
> print(c.fetchone())

However this fails as follows:

> Traceback (most recent call last):
>   File "./test.py", line 8, in 
> print(c.fetchone())
> AttributeError: 'sqlite3.Connection' object has no attribute 'fetchone'

I believe the correct code should have been (at least it works for me):

> # Do this instead
> t = ('RHAT',)
> cursor = c.execute('SELECT * FROM stocks WHERE symbol=?', t)
> print(cursor.fetchone())

Tore

--
assignee: docs@python
components: Documentation
messages: 388078
nosy: docs@python, toreanderson
priority: normal
severity: normal
status: open
title: Non-existent method sqlite3.Connection.fetchone() used in docs
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43396>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Tore Anderson


Tore Anderson  added the comment:

You're looking in the wrong place, the buggy ones are at 
https://github.com/python/cpython/blame/e161ec5dd7ba9355eb06757b9304019ac53cdf69/Doc/library/sqlite3.rst#L74-L76

Tore

--

___
Python tracker 
<https://bugs.python.org/issue43396>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Tore Anderson


Tore Anderson  added the comment:

You're right. I got it confused with the conn object in the code I was working 
on, because it turns out that it has an execute() method:

>>> import sqlite3
>>> c = sqlite3.connect('test.db')
>>> c.execute('SELECT * FROM tbl')


Closing, apologies for the noise!

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43396>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32151] -mvenv vs minor python version updates

2017-11-27 Thread Ric Anderson

New submission from Ric Anderson :

When a site updates python3 from 3.5 to 3.6 (based on 
https://docs.python.org/3/faq/general.html#how-does-the-python-version-numbering-scheme-work,
 this is would be a minor version update),pre-upgrade venv setups created with 
"python3 -menv ..." break because "python3" in the venv is really 3.5, and 
needs the system libpython3.5m.so.1.0, which is no longer in the library search 
list.

Should "python -mvenv ..." copy the libpython3.5m.so.1.0 to the venv 
directory/lib, or add the system path to libpython3.5m.so.1.0 to 
LD_LIBRARY_PATH, or should the minor version number (.5 ,or .6) be excluded 
from the library name, so that minor version updates don't break existing venv 
setups or ???

--
components: Installation, Interpreter Core, Library (Lib)
messages: 307072
nosy: Ric Anderson
priority: normal
severity: normal
status: open
title: -mvenv vs minor python version updates
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 
<https://bugs.python.org/issue32151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32151] -mvenv vs minor python version updates

2017-11-30 Thread Ric Anderson

Ric Anderson  added the comment:

Okay, are virtual env's expected to not be compatible as well?  

E.g., I built a venv under 3.5; venv copied in the 3.5 python executable, but 
not the needed library; should not -mvenv also copy libpython3.5 into the 
virutal setup or at least include the LD_LIBRARY_PATH to libpython3.5 in 
bin/activate, so that myenv/bin/python3.5 can find its needed library?

--

___
Python tracker 
<https://bugs.python.org/issue32151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32151] -mvenv vs minor python version updates

2017-12-01 Thread Ric Anderson

Ric Anderson  added the comment:

well then, I guess y'all can close this ticket

--

___
Python tracker 
<https://bugs.python.org/issue32151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34510] Add add HTTPConnection.settimeout()

2018-08-26 Thread Collin Anderson


Change by Collin Anderson :


--
components: Library (Lib)
nosy: collinanderson
priority: normal
pull_requests: 8422
severity: normal
status: open
title: Add add HTTPConnection.settimeout()
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue34510>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20805] Error in 3.3 Tutorial

2014-02-28 Thread Gene Anderson

New submission from Gene Anderson:

In the tutorial for Python 3.3 the content for 9.3.4 Method Objects seems to 
have an error.  In the following lines:

xf = x.f
while True:
print(xf())

... it seems to me that based on the x object's method f(), the command should 
be 

print(x.f())

At least it did when I tried to run it without the endless loop.  I'm pretty 
new at this Python stuff, though, so I could be wrong.

--
messages: 212421
nosy: Andesheng
priority: normal
severity: normal
status: open
title: Error in 3.3 Tutorial
versions: Python 3.3

___
Python tracker 
<http://bugs.python.org/issue20805>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20805] Error in 3.3 Tutorial

2014-02-28 Thread Gene Anderson

Gene Anderson added the comment:

I failed to mention that the associated web address for the documentation is:

http://docs.python.org/3.3/tutorial/classes.html#method-objects

--

___
Python tracker 
<http://bugs.python.org/issue20805>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29574] python-3.6.0.tgz permissions borked

2017-02-15 Thread Dave Anderson

New submission from Dave Anderson:

Downloaded https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz

Extracted on CentOS6 with sudo tar -xf Python-3.6.0.tgz

Result: 

[vagrant@developer tmp]$ ls -l Python-3.6.0
ls: cannot access Python-3.6.0/Tools: Permission denied
ls: cannot access Python-3.6.0/config.guess: Permission denied
ls: cannot access Python-3.6.0/pyconfig.h.in: Permission denied
ls: cannot access Python-3.6.0/config.sub: Permission denied
ls: cannot access Python-3.6.0/configure.ac: Permission denied
ls: cannot access Python-3.6.0/Python: Permission denied
ls: cannot access Python-3.6.0/Objects: Permission denied
ls: cannot access Python-3.6.0/PCbuild: Permission denied
ls: cannot access Python-3.6.0/Include: Permission denied
ls: cannot access Python-3.6.0/aclocal.m4: Permission denied
ls: cannot access Python-3.6.0/configure: Permission denied
ls: cannot access Python-3.6.0/Misc: Permission denied
ls: cannot access Python-3.6.0/Makefile.pre.in: Permission denied
ls: cannot access Python-3.6.0/setup.py: Permission denied
ls: cannot access Python-3.6.0/Lib: Permission denied
ls: cannot access Python-3.6.0/PC: Permission denied
ls: cannot access Python-3.6.0/Doc: Permission denied
ls: cannot access Python-3.6.0/README: Permission denied
ls: cannot access Python-3.6.0/Programs: Permission denied
ls: cannot access Python-3.6.0/install-sh: Permission denied
ls: cannot access Python-3.6.0/LICENSE: Permission denied
ls: cannot access Python-3.6.0/Modules: Permission denied
ls: cannot access Python-3.6.0/Grammar: Permission denied
ls: cannot access Python-3.6.0/Parser: Permission denied
ls: cannot access Python-3.6.0/Mac: Permission denied
total 0
-? ? ? ? ?? aclocal.m4
-? ? ? ? ?? config.guess
-? ? ? ? ?? config.sub
-? ? ? ? ?? configure
-? ? ? ? ?? configure.ac
d? ? ? ? ?? Doc
d? ? ? ? ?? Grammar
d? ? ? ? ?? Include
-? ? ? ? ?? install-sh
d? ? ? ? ?? Lib
-? ? ? ? ?? LICENSE
d? ? ? ? ?? Mac
-? ? ? ? ?? Makefile.pre.in
d? ? ? ? ?? Misc
d? ? ? ? ?? Modules
d? ? ? ? ?? Objects
d? ? ? ? ?? Parser
d? ? ? ? ?? PC
d? ? ? ? ?? PCbuild
d? ? ? ? ?? Programs
-? ? ? ? ?? pyconfig.h.in
d? ? ? ? ?? Python
-? ? ? ? ?? README
-? ? ? ? ?? setup.py
d? ? ? ? ?? Tools
[vagrant@developer tmp]$

Same operation with Python 3.5.2 tgz file downloaded from same location:

[vagrant@developer tmp]$ ls -l Python-3.5.2
total 1008
-rw-r--r--  1 1000 1000   8464 Jun 25  2016 aclocal.m4
-rwxr-xr-x  1 1000 1000  42856 Jun 25  2016 config.guess
-rwxr-xr-x  1 1000 1000  35740 Jun 25  2016 config.sub
-rwxr-xr-x  1 1000 1000 474932 Jun 25  2016 configure
-rw-r--r--  1 1000 1000 155069 Jun 25  2016 configure.ac
drwxrwxr-x 18 1000 1000   4096 Jun 25  2016 Doc
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 Grammar
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 Include
-rwxr-xr-x  1 1000 1000   7122 Jun 25  2016 install-sh
drwxrwxr-x 46 1000 1000  12288 Jun 25  2016 Lib
-rw-r--r--  1 1000 1000  12767 Jun 25  2016 LICENSE
drwxrwxr-x  8 1000 1000   4096 Jun 25  2016 Mac
-rw-r--r--  1 1000 1000  58449 Jun 25  2016 Makefile.pre.in
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 Misc
drwxrwxr-x 11 1000 1000   4096 Jun 25  2016 Modules
drwxrwxr-x  4 1000 1000   4096 Jun 25  2016 Objects
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 Parser
drwxrwxr-x  4 1000 1000   4096 Jun 25  2016 PC
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 PCbuild
drwxrwxr-x  2 1000 1000   4096 Jun 25  2016 Programs
-rw-r--r--  1 1000 1000  41897 Jun 25  2016 pyconfig.h.in
drwxrwxr-x  3 1000 1000   4096 Jun 25  2016 Python
-rw-r--r--  1 1000 1000   8060 Jun 25  2016 README
-rw-r--r--  1 1000 1000  99778 Jun 25  2016 setup.py
drwxrwxr-x 22 1000 1000   4096 Jun 25  2016 Tools
[vagrant@developer tmp]$

--
components: Build
messages: 287891
nosy: Dave_Anderson
priority: normal
severity: normal
status: open
title: python-3.6.0.tgz permissions borked
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue29574>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29574] python-3.6.0.tgz permissions borked

2017-02-15 Thread Dave Anderson

Dave Anderson added the comment:

Sorry, should have shown sudo ls -l output for 3.6:

[vagrant@developer tmp]$ sudo ls -l Python-3.6.0
total 1016
-rw-r--r--  1 caturra games  10910 Dec 22 18:21 aclocal.m4
-rwxr-xr-x  1 caturra games  42856 Dec 22 18:21 config.guess
-rwxr-xr-x  1 caturra games  35740 Dec 22 18:21 config.sub
-rwxr-xr-x  1 caturra games 481627 Dec 22 18:21 configure
-rw-r--r--  1 caturra games 158661 Dec 22 18:21 configure.ac
drwxr--r-- 18 caturra games   4096 Dec 22 18:23 Doc
drwxr--r--  2 caturra games   4096 Dec 22 18:21 Grammar
drwxr--r--  2 caturra games   4096 Dec 22 18:21 Include
-rwxr-xr-x  1 caturra games   7122 Dec 22 18:21 install-sh
drwxr--r-- 33 caturra games   4096 Dec 22 18:21 Lib
-rw-r--r--  1 caturra games  12767 Dec 22 18:21 LICENSE
drwxr--r--  8 caturra games   4096 Dec 22 18:21 Mac
-rw-r--r--  1 caturra games  58829 Dec 22 18:21 Makefile.pre.in
drwxr--r--  2 caturra games   4096 Dec 22 18:21 Misc
drwxr--r-- 13 caturra games   4096 Dec 22 18:21 Modules
drwxr--r--  4 caturra games   4096 Dec 22 18:21 Objects
drwxr--r--  2 caturra games   4096 Dec 22 18:21 Parser
drwxr--r--  5 caturra games   4096 Dec 22 18:21 PC
drwxr--r--  2 caturra games   4096 Dec 22 18:21 PCbuild
drwxr--r--  2 caturra games   4096 Dec 22 18:21 Programs
-rw-r--r--  1 caturra games  41250 Dec 22 18:21 pyconfig.h.in
drwxr--r--  3 caturra games   4096 Dec 22 18:21 Python
-rw-r--r--  1 caturra games   8434 Dec 22 18:21 README
-rw-r--r--  1 caturra games 101041 Dec 22 18:21 setup.py
drwxr--r-- 24 caturra games   4096 Dec 22 18:21 Tools
[vagrant@developer tmp]$

--

___
Python tracker 
<http://bugs.python.org/issue29574>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23038] #python.web irc channel is dead

2014-12-12 Thread Collin Anderson

New submission from Collin Anderson:

Can we remove references to #python.web? I assume it was a flourishing channel 
at some point.

https://docs.python.org/3/howto/webservers.html#other-notable-frameworks

--
assignee: docs@python
components: Documentation
messages: 232550
nosy: collinanderson, docs@python
priority: normal
severity: normal
status: open
title: #python.web irc channel is dead
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 
<http://bugs.python.org/issue23038>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-07-28 Thread Ashley Anderson

Ashley Anderson added the comment:

Wow, I can't believe this issue is so old now! I'm motivated to finally come
back and address the remaining issues to get this merged. Sorry for seemingly
abandoning this; I'm embarrassed I didn't push to finish it earlier.

It sounds like the consensus is to raise a ValueError in cases where ambiguity
may arise, with specific suggestions for resolving the ambiguity in each case.
This is in contrast to certain other cases where strptime uses some default
value for missing data (e.g. month/day = 1, year = 1900).

Ambiguous or incomplete cases I have identified are:
1. ISO week (%V) is specified, but the year is specified with %Y instead of %G
2. ISO year (%G) and ISO week (%V) are specified, but a weekday is not
3. ISO year (%G) and weekday are specified, but ISO week (%V) is not
4. ISO year is specified alone (e.g. time.strptime('2015', '%G'))
5. Julian/ordinal day (%j) is specified with %G, but not %Y

Hopefully that covers it...let me know if I need to add any cases or change
behavior in any cases. I can have a patch (at least an initial attempt) ready
for this in the next few days.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-07-31 Thread Ashley Anderson

Ashley Anderson added the comment:

Here is an updated patch with implementation as outlined in msg247525.

--
Added file: http://bugs.python.org/file40085/issue12006_7_complete.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-08-02 Thread Ashley Anderson

Ashley Anderson added the comment:

Thanks for the review and the good suggestions. Hopefully this new patch is an 
improvement.

I didn't know about the context manager for assertRaises - I was just following 
the format for another ValueError test a few lines above.

The frozenset and re-wrapped comment were left from playing around with another 
way to do the checks, and I've corrected them.

I think the conditionals around calculating the julian and year are clearer now 
as well.

Please (obviously) let me know if there are further changes. Also please let me 
know if this is not the proper way to respond to the code review!

--
Added file: http://bugs.python.org/file40113/issue12006_8_complete.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Ashley Anderson

Ashley Anderson added the comment:

Haha, thanks Erik. It seems you know my tastes enough to not offer a 
chocolate-based reward. =)

I was actually set to "ping" to request a patch review today, as it's been one 
month since my last submission. Please let me know if I need to update the 
patch against the current `tip`.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Ashley Anderson

Ashley Anderson added the comment:

Another *ping* for a patch review since it's been almost a month since the last 
one.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Ashley Anderson

Ashley Anderson added the comment:

Thanks Alexander, but I think the latest patch is still mine. It seems strange 
to review my own patch. I'll do it if that's common, but since this will 
(hopefully, eventually) be my first accepted patch I would appreciate the 
feedback from another reviewer.

--

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Ashley Anderson

Changes by Ashley Anderson :


Added file: http://bugs.python.org/file40660/issue12006_10_complete.patch

___
Python tracker 
<http://bugs.python.org/issue12006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25228] Regression in cookie parsing with brackets and quotes

2016-02-10 Thread Collin Anderson

Collin Anderson added the comment:

The issue I'm currently running into, is that although browsers correctly 
ignore invalid Set-Cookie values, they allow 'any CHAR except CTLs or ";"' in 
cookie values set via document.cookie.

So, if you say document.cookie = 'key=va"lue; path=/', the browser will happily 
pass 'key=va"lue;' to the server on future requests.

So, I like the behavior of this patch, which skips over these invalid cookies 
and continues parsing. I've cleaned the patch up a little, but it should be the 
same logically.

--
nosy: +collinanderson
Added file: http://bugs.python.org/file41889/cookie-bracket-quotes.diff

___
Python tracker 
<http://bugs.python.org/issue25228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25228] Regression in cookie parsing with brackets and quotes

2016-03-08 Thread Collin Anderson

Collin Anderson added the comment:

It should be safe to hard split on semicolon. `name="some;value"` is not valid, 
even though it's quoted. I think raw double quotes, commas, semicolons and 
backslashes are _always_ invalid characters in cookie values.

>From https://tools.ietf.org/html/rfc6265:

{{{
 cookie-value  = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
 cookie-octet  = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
   ; US-ASCII characters excluding CTLs,
   ; whitespace DQUOTE, comma, semicolon,
   ; and backslash
}}}

--

___
Python tracker 
<http://bugs.python.org/issue25228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26688] unittest2 referenced in unittest.mock documentation

2016-04-01 Thread Ashley Anderson

New submission from Ashley Anderson:

I noticed a few references to `unittest2` in the documentation in the 
`unittest.mock` "getting started" section:

https://docs.python.org/3.6/library/unittest.mock-examples.html#patch-decorators

I am attaching a patch that just changes these occurrences from `unittest2` to 
`unittest`.

--
assignee: docs@python
components: Documentation
files: unittest2.patch
keywords: patch
messages: 262767
nosy: aganders3, docs@python
priority: normal
severity: normal
status: open
title: unittest2 referenced in unittest.mock documentation
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42346/unittest2.patch

___
Python tracker 
<http://bugs.python.org/issue26688>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Marc Adam Anderson


Change by Marc Adam Anderson :


--
nosy:  -marcadam

___
Python tracker 
<https://bugs.python.org/issue1154351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5993] python produces zombie in webbrowser.open

2013-03-19 Thread Marc Adam Anderson

Marc Adam Anderson added the comment:

Unable to reproduce this bug on Mac OS X 10.8.3 (12D78) using Python 3.4.0a0 
and the following browsers:

- Google Chrome 25.0.1364.172
- Firefox 13.0.1
- Safari 6.0.3 (8536.28.10)

--
nosy: +marcadam

___
Python tracker 
<http://bugs.python.org/issue5993>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8862] curses.wrapper does not restore terminal if curses.getkey() gets KeyboardInterrupt

2013-03-19 Thread Marc Adam Anderson

Marc Adam Anderson added the comment:

Tested patch using Python 3.4.0a0 on Mac OS X 10.8.3 (12D78). Patch appears to 
fix the bug.

--
nosy: +marcadam

___
Python tracker 
<http://bugs.python.org/issue8862>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1154351] add get_current_dir_name() to os module

2013-03-20 Thread Marc Adam Anderson

Marc Adam Anderson added the comment:

This enhancement has been implemented. The code is based on hoffman's code. 
Tests for this enhancement, as well as tests for os.getcwd() have also been 
added. The docs have been updated and tested locally.

--
keywords: +patch
nosy: +marcadam
Added file: http://bugs.python.org/file29522/get_current_dir_name.patch

___
Python tracker 
<http://bugs.python.org/issue1154351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com