Skip to content

Update vendored pyperclip to 1.5.8 #9693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jcjf
Copy link
Contributor

@jcjf jcjf commented Mar 20, 2015

Resolves #9263

Tested:

  • windows
  • macosx
  • linux

@jreback jreback added Output-Formatting __repr__ of pandas objects, to_string Unicode Unicode strings Windows Windows OS labels Mar 20, 2015
@jreback jreback added this to the 0.16.1 milestone Mar 20, 2015
@jreback
Copy link
Contributor

jreback commented Mar 20, 2015

add this to the first line of test_clipboard.py

# -*- coding: utf-8 -*-

@jcjf
Copy link
Contributor Author

jcjf commented Mar 20, 2015

Yeah, I took a look at Travis too... I forgot about those Python 2 peoples!

@jreback
Copy link
Contributor

jreback commented Mar 20, 2015

@jcjf further, what platform are you testing this on? (as this requires some 'manual' testing I think), pls check the appropriate box

@jcjf
Copy link
Contributor Author

jcjf commented Mar 21, 2015

Hmm... this might be related to asweigart/pyperclip#11

One alternative is to only update the win32 parts of pyperclip. We could take that from pyperclip itself or perhaps from https://github.com/pyreadline/pyreadline/blob/master/pyreadline/clipboard/win32_clipboard.py

@jcjf
Copy link
Contributor Author

jcjf commented Mar 27, 2015

@jreback Suggested path forward?

@jreback
Copy link
Contributor

jreback commented Mar 28, 2015

actually I think what u did is ok

the test is failing because xclip / xsel is not installed

iirc we were doing this in the install script somewhere

have a look in ci/install_conda.py

lmk

@jreback jreback modified the milestones: 0.17.0, 0.16.1 Apr 28, 2015
@jreback
Copy link
Contributor

jreback commented May 9, 2015

@jcjf can u update?

@jcjf
Copy link
Contributor Author

jcjf commented May 13, 2015

I've been very busy recently and haven't had time to take another look at
this.

On 10 May 2015 at 04:16, jreback [email protected] wrote:

@jcjf https://github.com/jcjf can u update?


Reply to this email directly or view it on GitHub
#9693 (comment).

@jcjf jcjf force-pushed the win-unicode-clipboard branch 2 times, most recently from 40338af to f90cde4 Compare June 9, 2015 16:32
@jcjf
Copy link
Contributor Author

jcjf commented Jun 18, 2015

So basically my earlier attempts forgot to maintain compatibility by raising a subclass of OSError.

I believe the CI builds don't actually test the GTK+ 2 clipboard properly. There isn't any setup that would make import gtk work on its own. However, I claim that this was broken before remains broken now, and most people will be using xclip / xsel / PyQt4 / PySide anyway.

@jreback
Copy link
Contributor

jreback commented Jun 23, 2015

ok, looks reasonable, can you add a release note for 0.17.0 with the referenced issue. We are claiming this is just a bug fix, yes? (e.g. it now supports unicode on windows).

squash.

Then need to have people tests this out on various system, e.g. some manual validation.

@jcjf jcjf force-pushed the win-unicode-clipboard branch from 426bdd6 to 9bc5390 Compare June 24, 2015 14:24
@jreback
Copy link
Contributor

jreback commented Aug 5, 2015

can you rebase?

@jcjf jcjf force-pushed the win-unicode-clipboard branch from 9bc5390 to ce5e4be Compare August 13, 2015 12:35
@jreback
Copy link
Contributor

jreback commented Aug 15, 2015

this looks reasonable. can people give this a whirl to make sure it works?

@jreback
Copy link
Contributor

jreback commented Aug 19, 2015

ok, this works on windows, but is failing on mac. any ideas? (I think working on linux as travis is passing)

@jreback jreback modified the milestones: Next Major Release, 0.17.0 Aug 31, 2015
@jreback
Copy link
Contributor

jreback commented Oct 11, 2015

@jcjf want to rebase this

@jcjf
Copy link
Contributor Author

jcjf commented Oct 14, 2015

pyperclip upstream has updated to 1.5.15 - maintain the change 1.5.11 only or try to update?

@jreback
Copy link
Contributor

jreback commented Oct 14, 2015

@jcjf that sounds fine. The main issue I think was testing on this.

@jcjf jcjf force-pushed the win-unicode-clipboard branch from ce5e4be to 73f0598 Compare October 19, 2015 14:59
@jreback
Copy link
Contributor

jreback commented Nov 23, 2015

can you rebase this

@jreback jreback modified the milestones: 0.18.0, Next Major Release Nov 30, 2015
@jreback
Copy link
Contributor

jreback commented Nov 30, 2015

ok, can you rebase & add a whatsnew note for 0.18.0

@jcjf jcjf force-pushed the win-unicode-clipboard branch from 73f0598 to 39f2409 Compare December 1, 2015 17:28
@jcjf
Copy link
Contributor Author

jcjf commented Dec 5, 2015

@jreback I've rebased this for the third time now. Can you please indicate whether this is still failing on mac and whether you intend to merge this soon?

@jreback
Copy link
Contributor

jreback commented Dec 5, 2015

This doesn't pass on macosx, not really sure why. Does this pass on windows?

======================================================================
FAIL: test_round_trip_frame_sep (pandas.io.tests.test_clipboard.TestClipboard)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jreback/pandas/pandas/io/tests/test_clipboard.py", line 71, in test_round_trip_frame_sep
    self.check_round_trip_frame(dt,sep=',')
  File "/Users/jreback/pandas/pandas/io/tests/test_clipboard.py", line 67, in check_round_trip_frame
    tm.assert_frame_equal(data, result, check_dtype=False)
  File "/Users/jreback/pandas/pandas/util/testing.py", line 1012, in assert_frame_equal
    '{0}, {1}'.format(right.shape[1], right.columns))
  File "/Users/jreback/pandas/pandas/util/testing.py", line 819, in raise_assert_detail
    raise AssertionError(msg)
AssertionError: DataFrame are different

DataFrame shape (number of columns) are different
[left]:  2, Index([u'en', u'es'], dtype='object')
[right]: 0, Index([], dtype='object')

seems the index is not matching on the nonascii

(Pdb) p data
        en       es
0       in       en
1  English  espa?ol
(Pdb) p result
Empty DataFrame
Columns: []
Index: [0       in       en, 1  English  espa?ol]
(Pdb) p read_clipboard(sep=sep)
           en       es
0  0       in       en
1  1  English  espa?ol
(Pdb) p read_clipboard(sep=sep,index_col=0)
Empty DataFrame
Columns: []
Index: [0       in       en, 1  English  espa?ol]

@jreback
Copy link
Contributor

jreback commented Dec 5, 2015

these seem to all pass on windows.

@jreback
Copy link
Contributor

jreback commented Dec 5, 2015

I will amend. These seem to pass on a vanlilla terminal in macosx, I have a weird xterm going.

@jreback
Copy link
Contributor

jreback commented Dec 5, 2015

merged via 925f62a

thanks!

@jreback jreback closed this Dec 5, 2015
@jcjf jcjf deleted the win-unicode-clipboard branch December 3, 2021 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string Unicode Unicode strings Windows Windows OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clipboard functions don't support Unicode on Windows
2 participants