[issue24154] pathlib.Path.rename moves file to Path.cwd() when argument is a string

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This would contradict to all other functions and commands. The current behavior is correct. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, Serhiy. I'll create a pull request. -- ___ Python tracker ___ ___

[issue29899] zlib missing when --enable--optimizations option appended

2017-03-26 Thread kyren
kyren added the comment: There's no build errors. The compiling and installing process is error-free. Take 3.5.3 as example, it's all good until you enter 3.5.3 python shell and type `import zlib`, it gives `No module name zlib`. I solved by make a `libz.so` link in my `/lib` dir to the

[issue27200] make doctest in CPython has failures

2017-03-26 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +727 ___ Python tracker ___ ___

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Jussi Piitulainen
Νίκος Βέργος writes: > print('''UPDATE visitors SET (pagesID, host, ref, location, useros, > browser, visits) VALUES (%s, %s, %s, %s, %s, %s, %s) WHERE host LIKE > "%s"''', (pID, domain, ref, location, useros, browser, lastvisit, > domain) ) > > prints out: > > UPDATE visitors SET (pagesID, host,

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Martin Panter
Martin Panter added the comment: The double equals "==" case for the “quopri” implementation in Python is now consistent with the others thanks to the fix in Issue 23681 (see also Issue 21511). According to Issue 20121, the quopri (Python) implementation only supports LF (\n) characters as

[issue29888] The link referring to "Python download page" is broken

2017-03-26 Thread Kinebuchi Tomohiko
Changes by Kinebuchi Tomohiko : -- pull_requests: +728 ___ Python tracker ___ ___

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 4:39:44 μ.μ. UTC+3, ο χρήστης MeV έγραψε: > On Sunday, March 26, 2017 at 6:34:30 AM UTC-7, Νίκος Βέργος wrote: > > with import cgitb; cgitb.enable() > > > > ProgrammingError(1064, "You have an error in your SQL syntax; check the > > manual that corresponds to your

[issue27827] pathlib is_reserved fails for some reserved paths on Windows

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for the estimation Eryk. Can you create a pull request for your patch? -- ___ Python tracker ___

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 5:04:27 μ.μ. UTC+3, ο χρήστης INADA Naoki This error came from MySQL. If there are no logs in error_log, it's > your configuration issue. > > See https://dev.mysql.com/doc/refman/5.7/en/update.html for Update > statement syntax. cur.execute('''UPDATE visitors SET

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 5:38:57 μ.μ. UTC+3, ο χρήστης alister έγραψε: > On Sun, 26 Mar 2017 07:24:49 -0700, Νίκος Βέργος wrote: > > > Τη Κυριακή, 26 Μαρτίου 2017 - 5:19:27 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > > > >> You need to change the placeholders back. The poster who told you to > >>

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
I see thank you for pointing that out. Now i'm receiving no error in error_log but when i'm running the script it displays this: ProgrammingError(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Steve D'Aprano
On Mon, 27 Mar 2017 12:52 am, Νίκος Βέργος wrote: > cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, > browser, visits) VALUES ({}, {}, {}, {}, {}, {}, {}) WHERE host LIKE > "{}"'''.format(pID, domain, ref, location, useros, browser, lastvisit, > domain) ) > > Same kind

[issue22062] Fix pathlib.Path.(r)glob doc glitches.

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you create a pull request on GitHub Mike? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue22962] ipaddress: Add optional prefixlen argument to ip_interface and ip_network

2017-03-26 Thread Gary van der Merwe
Gary van der Merwe added the comment: Indeed. Thanks to whoever fixed this. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

Re: why and how to run forever and debug when error in for proc in psutil.process_iter()?

2017-03-26 Thread Ho Yeung Lee
On Sunday, March 26, 2017 at 10:33:51 AM UTC+8, Deborah Swanson wrote: > Someone here can probably help you, but they'll need your Python > version, operating system, and full traceback. They get tired of saying > so. > > In this case, the full traceback is needed to see what went wrong and >

Re: why and how to run forever and debug when error in for proc in psutil.process_iter()?

2017-03-26 Thread Ho Yeung Lee
On Sunday, March 26, 2017 at 7:40:20 PM UTC+8, Ho Yeung Lee wrote: > On Sunday, March 26, 2017 at 7:32:12 PM UTC+8, Ho Yeung Lee wrote: > > On Sunday, March 26, 2017 at 10:33:51 AM UTC+8, Deborah Swanson wrote: > > > Someone here can probably help you, but they'll need your Python > > > version,

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
with import cgitb; cgitb.enable() ProgrammingError(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(pagesID, host, ref, location, useros, browser, visits) VALUES (1, 'cyta.gr', '' at line 1") that

[issue8488] Docstrings of non-data descriptors "ignored"

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the descriptor is classified as a routine (inspect.isroutine() returns True because inspect.ismethoddescriptor() returns True), pydoc outputs it in the "Methods defined here" section and uses the docroutine(). But docroutine() requires the __name__

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Ths is the whole snippert i'am trying so you can see what i'm tryong to do. [code] # if bot is contained in hostname update all previous database bot hostname entries with current bot hostname for bot in bots: if bot in host:

Re: Who are the "spacists"?

2017-03-26 Thread Wildman via Python-list
On Sun, 26 Mar 2017 15:18:06 +0200, Mikhail V wrote: > On 26 March 2017 at 06:16, Wildman via Python-list > wrote: >> On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote: >> >>> And on linux console, by default one does not even have good >>> possibilities for text-mode

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Steve D'Aprano
On Mon, 27 Mar 2017 01:24 am, Νίκος Βέργος wrote: > I MEAN HOW TO DIFFERENTIATE '%S' FROM LITERAL '%' character. Use %% for a literal percent character. py> '%s %% %s' % ('hello', 'world') 'hello % world' -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you create a pull request on GitHub Vajrasky? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27827] pathlib is_reserved fails for some reserved paths on Windows

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are 'COM\u0661' or 'COM\u2074' reserved names? -- nosy: +serhiy.storchaka ___ Python tracker ___

Re: Python question

2017-03-26 Thread Steve D'Aprano
On Sun, 26 Mar 2017 01:55 pm, c...@zip.com.au wrote: > 1: He BCCed the list, not us individually. Look at the headers. BCCed addresses aren't visible in the headers. That's why they're BLIND CC. The lack of personal email addresses in the headers doesn't prove they weren't there. All the headers

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, browser, visits) VALUES ({}, {}, {}, {}, {}, {}, {}) WHERE host LIKE "{}"'''.format(pID, domain, ref, location, useros, browser, lastvisit, domain) ) Same kind of output in the error-log even with this attempt. --

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread ppperry
Changes by ppperry : -- pull_requests: +729 ___ Python tracker ___ ___ Python-bugs-list

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread INADA Naoki
On Sun, Mar 26, 2017 at 10:34 PM, Νίκος Βέργος wrote: > with import cgitb; cgitb.enable() > > ProgrammingError(1064, "You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right syntax > to use near '(pagesID, host,

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 5:19:27 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > You need to change the placeholders back. The poster who told you to > replace them was misinformed. okey altered them back to cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, browser, visits)

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread alister
On Sun, 26 Mar 2017 07:24:49 -0700, Νίκος Βέργος wrote: > Τη Κυριακή, 26 Μαρτίου 2017 - 5:19:27 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > >> You need to change the placeholders back. The poster who told you to >> replace them was misinformed. > > okey altered them back to > > cur.execute('''UPDATE

Installation issue with Python 3.6.1 for 64 bit Windows

2017-03-26 Thread arjun.janah
Sent from my T-Mobile 4G LTE Device Hello, I am using an HP PC, brought in 2009, which currently has on it Windows 7 Ultimate, Service Pack 1. The processor is an AMD Turion 64 X2 Mobile Technology TL-62 2.10 GHz. Installed memory is 4.00 GB (3.75 GB usable) System type is 64-bit operating

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus currently the table of discrepancies looks as: quoprimime binascii quopri b'=' '' b'' b'=' b'= ' '' b'= ' b'= ' b'= \n' '' b'= \n' b'' b'=\r''' b'' b'=\r' b'==41'

[issue29909] types.coroutine monkey patches original function

2017-03-26 Thread R. David Murray
R. David Murray added the comment: Oops, I didn't meant to close this. -- resolution: not a bug -> stage: resolved -> status: closed -> open ___ Python tracker

[issue29909] types.coroutine monkey patches original function

2017-03-26 Thread R. David Murray
R. David Murray added the comment: Yes, that looks wrong to me. IMO it should be returning a new function object, not updating the __code__ of the existing object. I couldn't figure when that is actually triggered, though. There are also some other oddnesses, given the definition of

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 2:11 AM, Νίκος Βέργος wrote: > Τη Κυριακή, 26 Μαρτίου 2017 - 5:49:00 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > >> The database wrapper won't do substitution into the middle of a string >> like that. Either concatenate the literal %'s on in the SQL statement

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 6:28:12 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Mon, Mar 27, 2017 at 2:11 AM, Νίκος Βέργος wrote: > > Τη Κυριακή, 26 Μαρτίου 2017 - 5:49:00 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > > > >> The database wrapper won't do substitution into the

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 2:48 AM, Νίκος Βέργος wrote: >> > which you can see at http://superhost.gr >> >> Ah, Nikos, its been a long time! I thought I recognised your style of >> posting. > > > Howdy Steve! > Yes its me and yes its have been a long time! How are you?! > Irony

C-Python and Endianness

2017-03-26 Thread Ganesh Pal
Hello Team , I want to write the hexadecimal string that is passed from python as it is on disk in C , my problem is that the values are getting stored in little endian and the values are swapped it has been quite a pain for me to fix this , any suggestion on how to fix this (I am

[issue21301] pathlib missing Path.expandvars(env=os.environ)

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: expanduser() is path handling function, but not expandvars(). expandvars() is defined in posixpath and ntpath because different OSes use different syntax for interpolated strings, and we sometimes need to use a foreign syntax. It doesn't have any special

[issue29907] Unicode encoding failure

2017-03-26 Thread Paul Moore
Paul Moore added the comment: Also, you need to: 1. Ensure you are using characters that are available in the encoding that sys.stdout uses - in Python prior to 3.6, this would be your Windows *console* code page, and in 3.6+ would be UTF-8. 2. Declare the encoding of your source code if you

[issue1697943] msgfmt cannot cope with BOM

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Corresponding GNU gettext issue [1] was closed as "Not a Bug". [1] https://savannah.gnu.org/bugs/?18345 -- nosy: +serhiy.storchaka resolution: -> not a bug status: open -> pending ___ Python tracker

[issue7913] Enhance Cmd support for docstrings and document it.

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you create a pull request David? -- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.3 ___ Python tracker

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker ___

Re: Who are the "spacists"?

2017-03-26 Thread Mikhail V
On 26 March 2017 at 06:16, Wildman via Python-list wrote: > On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote: > >> And on linux console, by default one does not even have good >> possibilities for text-mode pseudographics, it was more relevant >> in DOS where one had

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread MeV
On Sunday, March 26, 2017 at 6:34:30 AM UTC-7, Νίκος Βέργος wrote: > with import cgitb; cgitb.enable() > > ProgrammingError(1064, "You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right syntax > to use near '(pagesID, host, ref,

[issue29907] Unicode encoding failure

2017-03-26 Thread Eryk Sun
Eryk Sun added the comment: I'm closing this issue since Python's encodings in this case -- 852 (OEM) and 1250 (ANSI) -- both correctly map U+0159: >>> u'\u0159'.encode('852') '\xfd' >>> u'\u0159'.encode('1250') '\xf8' You must be using an encoding that doesn't map U+0159. If

[issue12414] getsizeof() on code objects is wrong

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Martin. sys.getsizeof() should only count the memory that is not exposed as separate Python objects. In case of a code object this is the memory of the PyCodeObject structure and the memory of dynamic array co_cellvars (issue15456). Other

[issue29888] The link referring to "Python download page" is broken

2017-03-26 Thread Kinebuchi Tomohiko
Changes by Kinebuchi Tomohiko : -- pull_requests: +730 ___ Python tracker ___ ___

[issue12414] getsizeof() on code objects is wrong

2017-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not including the Python accessible referred-to objects is consistent with how sys.getsizeof() works elsewhere (i.e. for object instances, the size of __dict__ is not included). >>> import sys >>> class A: pass >>> a = A() >>>

[issue29888] The link referring to "Python download page" is broken

2017-03-26 Thread Kinebuchi Tomohiko
Changes by Kinebuchi Tomohiko : -- pull_requests: +726 ___ Python tracker ___ ___

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, this is the pull request: https://github.com/python/cpython/pull/822 -- ___ Python tracker ___

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
Τη Κυριακή, 26 Μαρτίου 2017 - 4:39:44 μ.μ. UTC+3, ο χρήστης MeV έγραψε: > On Sunday, March 26, 2017 at 6:34:30 AM UTC-7, Νίκος Βέργος wrote: > > with import cgitb; cgitb.enable() > > > > ProgrammingError(1064, "You have an error in your SQL syntax; check the > > manual that corresponds to your

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Ian Kelly
On Sun, Mar 26, 2017 at 7:39 AM, MeV wrote: > On Sunday, March 26, 2017 at 6:34:30 AM UTC-7, Νίκος Βέργος wrote: >> with import cgitb; cgitb.enable() >> >> ProgrammingError(1064, "You have an error in your SQL syntax; check the >> manual that corresponds to your MariaDB

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread INADA Naoki
I used space only for readability. It's not required. >>> '%%%s%%' % (42,) '%42%' On Sun, Mar 26, 2017 at 11:35 PM, Νίκος Βέργος wrote: > i have tried that 2 days ago. > > Problem is that you maintained space before and after '%s' which wont work > within like > > How

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread INADA Naoki
> I MEAN HOW TO DIFFERENTIATE '%S' FROM LITERAL '%' character. > >>> '%% %s %%s' % (42,) '% 42 %s' Use %% -- https://mail.python.org/mailman/listinfo/python-list

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Νίκος Βέργος
domain = '.'.join( host.split('.')[-2:] ) domain = '%' + domain + '%' domain = '%%%s%%' % domain domain = '%{}%'.format(domain) cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, browser, visits) VALUES (%s, %s, %s, %s, %s, %s, %s) WHERE host LIKE "%s" ''',

Re: Python question

2017-03-26 Thread Steve D'Aprano
On Sun, 26 Mar 2017 10:35 pm, Cameron Simpson wrote: > On 26Mar2017 20:55, Steve D'Aprano wrote: >>On Sun, 26 Mar 2017 01:55 pm, c...@zip.com.au wrote: >>> 1: He BCCed the list, not us individually. Look at the headers. >> >>BCCed addresses aren't visible in the

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Steve D'Aprano
On Mon, 27 Mar 2017 02:11 am, Νίκος Βέργος wrote: > I just tried: > > domain = '.'.join( host.split('.')[-2:] ) > domain = '%' + domain + '%' > > cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, > browser, visits) VALUES (%s, %s, %s, %s, %s, %s, %s) WHERE host LIKE "%s"

[issue29763] test_site failing on AppVeyor

2017-03-26 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +738 ___ Python tracker ___ ___

[issue19824] string.Template: Rewrite docs to emphasize i18n use case

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In that case issue20314 looks related. -- stage: -> needs patch type: -> enhancement ___ Python tracker ___

[issue29908] Inconsistent crashing with an access violation

2017-03-26 Thread Cameron Mckain
Cameron Mckain added the comment: The problem was fixed after updating to Django 1.11; apparently, Django 1.10 is not fully compatible with Python 3.6. Thanks for your time. -- resolution: -> out of date stage: -> resolved status: open -> closed

[issue29908] Inconsistent crashing with an access violation

2017-03-26 Thread Eryk Sun
Eryk Sun added the comment: Steve, I added 3.5 because the crash involved ucrtbase.dll. I'll remove it for now since the problem is only confirmed in 3.6. Offset 0x3bd9e in 32-bit ucrtbase.dll is in wdupenv_s [1]. It's probably from calling new_spawnve in pydev_monkey.py, as shown in the

[issue27425] Tests fail because of git's newline preferences on Windows

2017-03-26 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +737 ___ Python tracker ___ ___

[issue29907] Unicode encoding failure

2017-03-26 Thread Martin Panter
Martin Panter added the comment: I presume you are trying to print to the normal Windows console. I understand the console was not well supported until Python 3.6 (see Issue 1602). Have you tried that version? I’ll leave this open for someone more experienced to confirm, but I suspect what

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2017-03-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue23901] Force console stdout to use UTF8 on Windows

2017-03-26 Thread Martin Panter
Martin Panter added the comment: This seems to be discussing the same sort of stuff that ended up with the Issue 1602 implementation. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> windows console doesn't print or input

[issue23241] shutil should accept pathlib types

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this issue outdated since implementing a file system path protocol (PEP 519) in 3.6? -- nosy: +serhiy.storchaka status: open -> pending ___ Python tracker

<    1   2